How can one make CACHE aware of a local database (cache.dat FILE)

2 views
Skip to first unread message

Wolfgang

unread,
Jul 12, 2013, 10:20:44 AM7/12/13
to InterSy...@googlegroups.com

Hi All,
appreciate if anybody can give a hint making me my problem solved.

Problem in few words: How can I make CACHE aware of a local database (cache.dat file)

Situation:
For an educational research I have received a database (cache.dat file) containig of GLOBALS. These data are obseverations of phzsical measurments. (table , x rows * y columns, probably scalar values but might also be binary!?, no. of columns is known).
For the time being I would like to extract these data and export/use them further. I am using Cache on WindowsXP and Windows7.

Problem:
After studying the manual, my understanding is now that in order to connect CACHE with my external LOCAL DATABASE (cache.dat), I need to generate a ODBC-SQL-GATEWAY.
And, in order to create the gateway I need to create a namespace or use one the initially provided ones.
But creation of a namespace needs the database to be already known/existing. Here I am again at my starting point!!   

Thanks in advance!
W.

Michael Cohen

unread,
Jul 12, 2013, 11:02:21 AM7/12/13
to InterSy...@googlegroups.com

The good news is that accessing the data should be easy.

 

If you have a cache.dat file you have a Caché database.  If it is on the same machine that is running Caché, then it is a local database.

 

To make Caché aware of this database, you would open the Caché Management Portal and create a new database, but point to the OS directory holding this cache.dat file.  The system will ask you to confirm that you wish to use the existing cache.dat file.

 

If the database in MultiValue enabled, then you need to do another step to make it MV enabled here.  From %SYS namespace:

MV

ATTACH.ACCOUNTS

 

Now the data in the database is available to all of Caché.

 

If classes are already defined for the data, then you will already have COS and SQL access to the data.  If it is already MV data with DICTs, then you will have MV access as well.

 

If not, more work would be needed, depending on what you are trying to accomplish.

 

If you want to access the data from another system via ODBC, then, in addition to class(es), you would need to add an ODBC DSN pointing to your namespace.

 

Let us know in more detail what you want to do with the data.

 

/Michael

--
You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
---
You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to InterSystems-...@googlegroups.com.
To post to this group, send email to InterSy...@googlegroups.com.
Visit this group at http://groups.google.com/group/InterSystems-MV.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Wolfgang

unread,
Jul 14, 2013, 8:16:33 AM7/14/13
to InterSy...@googlegroups.com
Dear Michael,
Your notes helped me understanding Cache/MV further and I think they advised further in the "right dirction".

However it did not work yet as simply nothing happens, refer below comandlines form the Terminal. What do I need to do or add?
 
Node: 626762b4b, Instance: TRYCACHE
 
%SYS>MV
 
*                              MultiValue Shell                              *
* Cache for Windows (x86-32) 2013.1.1 (Build 501.0U_SU) Mon Jun 24 2013 14:39:07 EDT*
 
[150] Two digit years default to the years 1900 to 1999.
SYSPROG:ATTACH.ACCOUNTS
SYSPROG:
 

Now, the local database pannel is still showing the database status as "unavailable" and, the fields Size, Resource, Encrypted and Journal are empty. Instead of Globals I get a dash!!

Maybe the below notes may be helpful:

- cache.dat file size is approx 6 giga byte and a cvs-sheet with column headers was also handed over to me.

Q: Do I need a to refer a namespace to the database before submitting ATTACH.ACCOUNTS? If yes, do I thereby need to copy namespace mappings from of %SYS ?

Thanks and regards
W.
Reply all
Reply to author
Forward
0 new messages