Article
· Apr 27, 2023 2m read

How to migrate data created based on class definition to another system

InterSystems FAQ rubric

Migrating data to another system takes two steps.

1. Migrating class definitions

To migrate the class definition to another system, export it to a file in XML format or UDL format (extension .cls).

The export procedure in Studio is as follows.

Tools > Export

> Select multiple classes you want to migrate with the [Add] button

> Check [Export to local file]

> Confirm that the file type is XML, enter a file name, and click [OK].

After this, import the exported XML and UDL files in the studio on another system. The import procedure in Studio is as follows.

Tools > Import from Local

> Specify the XML and UDL files output in the above procedure.  

2. Data migration

The next step is to move the actual data.

Object data is stored by default in global variables with the following naming convention:

Data : ^ Class name D
Index : ^ Class name I
Stream : ^ Class name S

Example: User.test class data is stored in the following three globals.

^User.testD, ^User.testI, ^User.testS

Export all of these global variables that exist from the System Management Portal (Explorer in Caché 5.0 and earlier).

The export procedure is as follows. [Version 2011.1~]

When using the Management Portal, export from the following menu.

[System Explorer] > [Globals] (Double-click [Globals] or press the move button)

> Select a namespace from the left pane
> Click [Export]
> Check the globals you want to export and specify the output file name [Version 2010.2 or earlier]

 When using the System Management Portal, export from the following menu.

Data Management → Globals

→ Select a namespace from the left pane
→ Click "Export"
→ Check the globals you want to export and specify the output file name

Then import the above file into another system.

The import procedure is as follows. [Version 2011.1~]

When using the Management Portal, import from the following menu.

System Explorer → Globals (Double-click "Global" or press the move button)

→ Select a namespace from the left pane
→ Click Import
→ Specify the exported file
→ Execute import [Version 2010.2 or earlier]

When using the System Management Portal, import from the following menu.

[Data Management] > [Globals]

> select a namespace from the left pane
> click import
> specify the exported file
> execute import

This completes the data migration.

Discussion (4)2
Log in or sign up to continue