Written by

Question Phillip Wu · Nov 1, 2022

IRIS database file [IRIS.DAT] check mirror attribute

Hi,

I'm often required to copy the database from production to test.

This is to 'refresh' the database on test.

To achieve this I copy all required IRIS.DAT files from production to test.

The nodes are mirrored on production.

The nodes are not mirrored on test.

Each of the database files IRIS.DAT has a mirror attribute.

Is there a way of checking if the mirror attribute is set for the database file? eg. an objectScript program

Product version: IRIS 2022.1

Comments

Eduard Lebedyuk · Nov 2, 2022

Sure:

set db = ##Class(SYS.Database).%OpenId(dir,,.sc)
write db.Mirrored

where dir is a directory with IRIS.DAT.

0
Phillip Wu  Nov 2, 2022 to Eduard Lebedyuk

Thanks.

I cannot get this to work.

I have a Linux server which has IRIS database.

This file exists - /trak/base/tc/db/ct/IRIS.DAT

However:

BASETC:%SYS>set db=##Class(SYS.Database).%OpenID("/trak/base/tc/db/ct",,.sc)

SET db=##CLASS(SYS.Database).%OpenID("/trak/base/tc/db/ct",,.sc)
^
<METHOD DOES NOT EXIST> *%OpenID,SYS.Database

Do you have any idea why I'm getting this as %OpenID method is documented here:
https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic…

0
Julius Kavay  Nov 2, 2022 to Phillip Wu

You are just one letter away from solution...

set db=##Class(SYS.Database).%OpenId("/trak/base/tc/db/ct",,.sc)
//................................^^^  Id, not ID!
0
Phillip Wu  Nov 3, 2022 to Julius Kavay

Thanks.

Works good!

0