Written by

Question Phillip Wu · Jan 21, 2023

IRIS.DAT file get information about DB

Hi,

Is there a way of printing out information about IRIS.DAT file eg. database name?

The reason is that I've "refreshed" TEST system from LIVE system and I'm not sure I've the copied the correct file to the correct place

on the file tree. The file tree structure shows the database that IRIS.DAT represents. 

eg. /db/HMF/IRIS.DAT should be the HMF database

Product version: IRIS 2022.2

Comments

Enrico Parisi · Jan 21, 2023

I don't think is possible, ANY IRIS.DAT can be mounted and named as desired when mounted (configured) in an IRIS instance.

If the database is mounted, then it's possible to find out the name and path of the IRIS.DAT that correspond to a mounted database: System Management Portal -> System Operations - Databases, there you have the list of configured databases with name and corresponding path.

If you have a "spare" unmounted/unconfigured database then you can mount it (add it to the IRIS configuration) and check the content and see what it contains to understand what was used for.

Enrico

0
Robert Cemper · Jan 21, 2023

As @Enrico Parisi pointed out: IRIS.DAT is an independent structure
The link between file and Namespace is in the ConfigFile (??.CPF) in your install directory.
The file could be located anywhere.
 

0
Lucas Fernandes · Jan 23, 2023

Another suggestion,

If you use an exclusive Resource in your database (example %DB_<database-name>), you can use it as a reference. It is included in the .DAT and you can check it even with the database not created, just the physical file.

Example:

w ##class(SYS.Database).%OpenId("/usr/irissys/mgr/test1/").ResourceName

The SYS.Database class also gets other information, but nothing relevant for identification.

--

Or (perhaps not recommended) you can extract the original path directly from the .DAT, for example:

$ strings /usr/irissys/mgr/test2/IRIS.DAT | head -3
Cache DB
/usr/irissys/mgr/test1/
%DB_TEST1

0
Phillip Wu  Jan 24, 2023 to Lucas Fernandes

Super. Thanks for that great tip!!

0