Skip to main content

Configuring Namespaces

This page provides information on configuring namespaces in InterSystems IRIS® data platform. For background information, see Namespaces and Databases. Also see Adding Mappings to a Namespace.

You can configure namespaces on the Namespace page of the Management Portal, which you can navigate to by selecting System Administration on the home page, then Configuration, then System Configuration, then Namespaces.

The absolute limit to the number of namespaces within a single InterSystems IRIS instance is 2048. The size of the namespaces table is not configurable.

Rules for Namespace Names

The following rules apply to a namespace name:

  • It must be between one and 64 characters long.

  • It must start with an alphabetic character or a percent sign (%); the remainder can include alphanumeric characters, dashes, or underscores.

For information on system-supplied namespaces, see System-Supplied Namespaces.

Create/Modify a Namespace

To create a namespace, click Create New Namespace to display the New Namespace page, then do the following:

  1. Enter a Name for the namespace. See Rules for Namespace Names.

  2. You can Copy from an existing namespace, creating a duplicate of the selected namespace. In this case, all other options will be made unavailable except for the Web application check box described in step 6 below.

  3. Choose whether the default database for globals is local or remote.

  4. Select an existing database for Globals for the default Global mapping of this namespace or click Create New Database, which launches either the database wizard or the remote database wizard.

  5. Optionally, you can choose whether the default database for routines is local or remote, then either use the Select an existing database for Routines drop-down to choose a database for the default Routine mapping of this namespace, or click Create New Database, which launches either the database wizard or the remote database wizard.

  6. Select the Create a default Web application for this namespace check box if you are creating a web application that accesses this namespace.

  7. Optionally, you can clear the Enable namespace for interoperability productions check box. For more information, see Create an Interoperability-Enabled Namespace below.

  8. After entering the required information, click Save to add your namespace to the configuration.

Create an Interoperability-Enabled Namespace

When you create a namespace on an InterSystems IRIS instance, the Enable namespace for interoperability productions check box is displayed at the bottom of the New Namespace page and is automatically selected. To create a namespace that is not interoperability-enabled, clear this check box before clicking Save.

If you do not clear the check box and create an interoperability-enabled namespace, the system automatically performs additional configuration tasks for the new namespace, as follows:

  • If the default globals database for this namespace is an existing database, it upgrades and recompiles some classes in that database.

    Caution:

    If you are also using this database in other namespaces, you might consider this change undesirable. When you create a new namespace in an InterSystems IRIS instance, carefully consider whether it is appropriate for this namespace to reuse an existing database.

  • It defines global mappings, routine mappings, and package mappings that make the InterSystems IRIS system classes and data available to the namespace.

  • It adds nodes to the ^%SYS global.

  • It creates a web application for the namespace, using the application name required by InterSystems IRIS: /csp/namespace.

Create a Foundation Namespace for Healthcare Interoperability

To create a Foundation namespace and production for healthcare interoperability, use the InterSystems IRIS for Health Installer Wizard or the HealthShare® HealthConnect Installer Wizard, rather than the New Namespace page. Once you have activated a Foundation namespace in the Installer Wizard, if you later need to modify an option, such as the routine database, you can use the Namespaces page.

Rename a Namespace or Modify Default Mappings

You can rename a namespace, or change the databases to which your namespace is mapped without restarting InterSystems IRIS, using the following procedure:

  1. Go to the Namespaces page (System Administration > Configuration > System Configuration > Namespaces).

  2. On the Namespaces page, click the name of namespace you wish to modify.

  3. Change or replace the existing name to rename the namespace.

    Important:

    If you are renaming an interoperability-enabled namespace, you must take additional steps to complete the process.

    1. Open the InterSystems Terminal from the System Tray.

    2. Enter:

      do ##class(%Library.EnsembleMgr).EnableNamespace("<NewNamespace>",1)

      Where <NewNamespace> is the new name of the existing namespace.

    3. Go to the Web Applications page (System Administration > Security > Applications > Web Applications).

    4. Find the name of the application that corresponds to the old name of the namespace, and click Delete.

    5. Click the name of the application that corresponds to the new name of the namespace.

    6. Select Namespace Default Application and click Save.

    7. In the Terminal, enter:

      do ##class(%EnsembleMgr).DisableNamespace("<OldName>",1)
      

      Where <OldName> is the original name of the namespace that you are renaming.

  4. Choose the Default Database for Globals, the Default Database for Routines, and the Default Database for Temporary Storage from the list of defined databases.

    Note:

    Selecting a database that is configured not to journal globals (that is, the Journal globals property is set to No) from the Default Database for Temporary Storage drop-down list is not the same as selecting IRISTEMP; for more information, see Using Temporary Globals and IRISTEMP.

  5. Click Save.

Users directly accessing the database at the time of the change may need to log out of and then back into InterSystems IRIS to update their namespace mappings.

Delete a Namespace

You can delete a namespace, including all mappings associated with it:

  1. Navigate to the Namespaces page (System Administration > Configuration > System Configuration > Namespaces) and click Delete in the row of the namespace you want to delete.

  2. On the Delete Namespaces page, if you want to delete the Web Gateway pages from the physical path, select the check box.

  3. To delete the namespace and associated mappings, click Perform Action Now.

Programmatically Configure a Namespace

InterSystems IRIS also provides programmatic tools that are useful for automating namespace configuration. You can use the Config.NamespacesOpens in a new tab class to create and configure namespaces; see the InterSystems Class Reference for more information.

Another method for configuring namespaces is to include the CreateNamespace, ModifyNamespace, or DeleteNamespace operations in conjunction with configuration merge. Configuration merge allows you to customize an InterSystems IRIS instance by applying a declarative merge file, which specifies settings and operations to apply to that instance. For more information about this feature, see Using Configuration Merge to Deploy and Reconfigure InterSystems IRIS.

See Also

FeedbackOpens in a new tab