· Jun 7, 2023

how can i import IRIS.DAT file into iris system

how can i import IRIS.DAT file into iris system. I am told that it is database file that will be import into iris db.

Product version: IRIS 2023.1
Discussion (2)1
Log in or sign up to continue

Am going to make some assumptions that you have been given an IRIS.DAT file and you want to mount that Database file on a new instance for some evaluation activity.

This is likely to not be exactly the situation but can serve as an example to help understand what you need to achieve.

A Namespace is a CODE and DATA context that database processes normally operate in.

To use the Database file it is "mounted" as a Database configuration.

The Database configuration is used by a Namespace, either as the DEFAULT for code and routines OR the data is MAPPED for use by a namespace.

As an example I create a copy of an empty database at: C:\InterSystems\somewhere\db\empty2
  This directory contains the IRIS.DAT.
In System Management Portal I can "Create a Database" (System Administration->Configuration->System Configuration->LocalDatabases)
  Use the path of new IRIS DAT file: "C:\InterSystems\somewhere\db\empty2"
  There will be a warning:  "Database file, IRIS.DAT, already exists in directory."

If you then navigate with System Explorer -> Globals

  And use "Lookin : Database" for the example is "EMPTY2"
  Here I added the Global Test

If the IRIS.DAT has both code (eg: SQL Table definitions) and Data, possibly you might want to create a new namespace and make the mounted database from earlier as the default database for routine and code for that namespace.
  So "Namespaces -> Create New Namespace

Alternatively, you may want to apply the new Data with code in another existing database for example SQL Table definitions. Here you could decide what data you want to map from the new database file to an existing namespace. (See: Explorer for Globals above)
  Navigate to Namespaces (System Administration->Configuration->System Configuration->Namespaces)
  Select "Global Mappings" of the namespace you want to "access data from the new Dat file".

Example to map the whole of global "Test" to existing namespace. Note this is will "hide" any data in "Test" that might exist in the default database of the pre-existing namespace.

Hint: Be sure to have database files unmounted or instance shut down when first learning to copy / swap database files around.

There are advanced ways of doing things. Occasionally you might get an IRIS database file from an operating system with a different Endian composition. The tool cvendian can help translate this to a target operating system endian mode. When moving big DAT files about it can be useful to run an SHA-1 or MD5 checksum hash on the database file before and after copying to ensure there is no corruption.

Hope this gave some ideas and helps progress the direction needed for your specific situation.