Question
· Jan 10, 2023

Create namespace and split data from certain database to put in it

I need to split existing tables from database and put some parts of them into a new namespace. I dont know where to start, other than the installer.cls file. If you can provide clear instructions i would be greatful.

Example:

I have NAMESPACE=NEWTEST and DB

The i need to take TABLES from that DB pull specific data from them and bind it to NEWTEST

Product version: IRIS 2022.3
$ZV: 368U
Discussion (5)3
Log in or sign up to continue

Database is a physical file containing globals.

Namespace is a logical combination of one or more databases.

By default Namespace has two databases:

  • GLOBALS - default location for globals
  • ROUTINES - default location for code (classes/routines/includes)

In addition to that, namespace can have any amount of mappings. Mappings map specified globals/code from a specified database.

When you try to access a global, first global mappings are searched for this global, if no mappings are found, the GLOBALS database is used.

When you try to access some code, first package/routine mappings are searched for this code, if no mappings are found, the ROUTINES database is used.

To split data innto a separate DB:

  1. Create target DB.
  2. Make source DB RO (by forcefully logging users out for example and/or marking it as RO).
  3. Copy data/code from the source to target DB (for globals use ^GBLOCKCOPY).
  4. Create mapping from the target DB to your namespace.
  5. Confirm that data is present.
  6. Delete data from a source DB.