Caché Programming Orientation Guide
Mapping a Global
[Home] [Back] [Next]
InterSystems: The power behind what matters   
Class Reference   
Search:    

Mapping a Global
When you map a global to database ABC, you configure a given namespace so that Caché writes this global to and reads this global from the database ABC, which is not the default database for your namespace. When you define this global mapping, Caché does not move the global (if it already exists) to the designated database; instead the mapping instructs Caché where to read and write the global in the future.
To map a global:
  1. If the global already exists, move it to the desired database. See Moving Data from One Database to Another,” later in this chapter.
  2. Access the Management Portal.
  3. Select Global Mappings in the row for the namespace in which you want to define this mapping.
  4. For Global database location, select the database that should store this global.
  5. Enter the Global name (omitting the initial caret from the name). You can use the * character to choose multiple globals.
    The global does not have to exist when you map it (that is, it can be the name of a global you plan to create).
    Note:
    Typically you create mappings for data globals for persistent classes, because you want to store that data in non-default databases. Often you can guess the name of the data globals, but remember that Caché automatically uses a hashed form of the class name if the name is too long. It is worthwhile to check the storage definitions for those classes to make sure you have the exact names of the globals that they use. See Storage,” earlier in this book.
  6. Select OK.
  7. To save the mappings, select Save Changes.
For more information, see the Caché System Administration Guide.
You can also define global mappings programmatically; see the Globals entry in the InterSystems Programming Tools Index.
The following shows an example global mapping, as seen in the Management Portal, which does not display the initial caret of global names:
This mapping means the following: