Export from Intersystems Caché database

4.2k views Asked by At

I have a product based on Intersystems Caché database, I can see no classes, no schemas, no tables, only globals. Is there any smart way to export data from these globals and get "human-readable structure"?

7

There are 7 answers

0
user613387 On

First question is... what version of Caché? Second question is... what tools do you have access to? Terminal, Studio, Management Portal??

If the data is in tables/classes, you should be able to access it via ODBC, at least. If there aren't any tables/classes, the data is probably in Globals.

If the data is in Globals (persistent sparse array storage) they can look a bit wierd if you aren't used to the common patterns.

Even if it is in Globals, it may be possible to define classes with custom mapped storage to make them appear in a table-like way via SQL.

Cache is EXTREEMELY flexible, but can be a steep learning curve. :-(

0
mccrackend On

Are you able to view the Cache SMP or connect to the database using Cache Studio? I would think you'd find code somewhere in there (at least a bunch of routines if they're not using classes). Using the SMP to browse the globals is a good way to get familiar with the datasets they contain. From a terminal session, you can use the zw command to take a look at global node contents:

USER> zw ^GlobalName

http://docs.intersystems.com/cache20082/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_czwrite

Can you give a little more information about your situation?

0
SSH On

Globals in Intersystems Cache is schemaless type of storage, so the best "human-readable" format you can have is that one in System Management Portal.

Other options are: * zw command in terminal * d ^%G command in terminal

0
mighty mac On

You can use a system utility called D ^%GO which is Global Output. You specify the global(s) and the file you want them exported to. There’s also a ^%GI for global imports from this file

0
Luigi Saggese On

My experience is to use Navicat Tool and export database Caché into a MySQL schema or Postgres to understand DB Model, using import Tool via ODBC.

0
Jonathan On

ODBC works with cache. You can use the ODBC connection to export the data to another strucutre such as a set of free tables or text files.

0
kazamatzuri On

Depending on the structure of your globals you could create classes for them and edit the storagemapping to point to them. Based on that you then could go ahead and create reports/(zen/csp)webpages to display the contents. However, depending on the complexity of your data this could take you anywhere between hours and months :/