Question
· Jan 11

Databases only appear in Classes Section of Management Portal

I have some databases in my cache instance that were created from an online backup file (.cbk). I would like to see the information for these databases in the Databases and SQL sections of Management Portal, but they only appear in the Classes section. I can navigate to the files in my cache instance terminal and see the CACHE.DAT files, and a check in the terminal shows that they are mounted.

This is what I see in the terminal for each database when I check to see if the databases are mounted:

%SYS>set db="/path/for/mydatabase"
%SYS>w ##class(SYS.Database).%OpenId(db).Mounted                     
1

I am VERY new to Cache, so I am not sure what is missing. Possibly a namespace or user permissions issue? None of the available namespaces have the database information. I did try compiling the classes, but that did not work. I looked through the Cache documentation, but unfortunately was unable to find a solution there.

What do I need to do to get these mounted databases available in the System>Databases and System>SQL sections of the Cache Management Portal?

Product version: Caché 2018.1
$ZV: 2018.1.5 (Build 659U)
Discussion (10)1
Log in or sign up to continue

That is a good question. I think so. I have searched stack exchange and Intersystems Documentation for a way to list databases associated with a namespace and have only found instructions on listing namespaces, changing namespaces, and creating/managing namespaces. Nothing for showing the databases associated with the namespace...

These are the namespaces listed when I list them all (using $SYS.Namespace.ListAll()):
result("%SYS")=""
result("DOCBOOK")=""
result("SAMPLES")=""
result("USER")=""
result("^^/path/of/my/database1")=""
result("^^/usr/cachesys/mgr/")=""
result("^^/usr/cachesys/mgr/user/")=""

The thing is that there are 5 databases I am interested in, and only one of the five is listed there.

Also, there is a lot of documentation for configuring Cache databases from the Local Databases page in the Management console, but none of my restored databases are listed there. Are they perhaps considered external databases?

Databases listed in the System>Databases table in the Management Portal:

  • CACHESYS    /usr/cachesys/mgr/
  • CACHELIB /usr/cachesys/mgr/cachelib/
  • CACHETEMP   /usr/cachesys/mgr/cachetemp/ 
  • CACHE       /usr/cachesys/mgr/cache/
  • CACHEAUDIT  /usr/cachesys/mgr/cacheaudit/
  • DOCBOOK     /usr/cachesys/mgr/docbook
  • SAMPLES     /usr/cachesys/mgr/samples
  • USER        /usr/cachesys/mgr/user/

How can I check which databases are found in which namespaces? And if they are not associated with a namespace how can I set that? If you could point me at some documentation that would be great.

Thanks Robert! This is great and definitely a step in the right direction. I created a new Namespace and then created local databases for each of my CACHE.DAT files.

I just have one follow up question: How do I check which namespace a local database is associated with? I would like all of my databases to share the namespace I created. The only way I could find to make an association is to select default global and routine databases for the namespace.

Should I create a new namespace for each of my restored databases and have the defaults set to each database respectively?

I feel that I might not have provided enough info initially, so here is the entire set of databases from the restore.

  • MYDATASYS          /opt/npc/cachesys/mgr/cache/
  • MYDATAAUDIT      /opt/npc/cachesys/mgr/cacheaudit/
  • MYDATA1               /npc/cachedb/<instance number>_live/mydata1/
  • MYDATA2               /npc/cachedb/<instance number>_live/mydata2/
  • MYDATA1TEMP    /npc/cachedb/<instance number>_live/mydata1temp/
  • MYDATA2TEMP    /npc/cachedb/<instance number>_live/mydata2temp/
  • MYDATA3              /npc/cachedb/<instance number>_live/mydata3/

In a simple configuration, one namespace uses one database.
But often, a namespace is a combination of a code database(=Routines), a data database (=Globals), and a bunch of mappings to other databases.

Looking at the names of your databases, it could well be the case that you need e.g. a namespace MYDATA1 which points for code and data to the database MYDATA1, and has Global Mappings for a list of specific globals to the database MYDATA1TEMP.

(You can see this list If you go to the portal -> explorer -> Globals, and select in the first combo 'databases' and the second 'MYDATA1TEMP', you should see a limited amount of globals that will probably hold temporary data which is stored seprately from you other live data.)


Ideally, the backup should also backup the file cache.cpf to get a list of the configuration of namespaces, databases, and mappings.