Using Multiple Instances of InterSystems IRIS
You can install and run multiple instances of InterSystems IRIS® data platform on a single host system. Each instance is a unique, independent InterSystems IRIS environment.
Managing InterSystems IRIS Instances
There are many ways to connect to and manage an InterSystems IRIS instance, which may be one of several installed on a given system. Two of the most common methods are as follows:
The Windows launcher
Each InterSystems IRIS instance installed on a Windows system has its own launcher in the system tray, which among other options lets you:
Connect to the instance by opening the Management Portal, the InterSystems Terminal, and the Studio developer client.
Start, stop and restart the instance.
Open the user and developer documentation.
From the launcher, you can also manage multiple remote InterSystems IRIS instances, including but not limited to, running remote backups, editing configuration settings, and creating and compiling remote objects and routines. See the chapter “Connecting to Remote Servers” in this guide for more detailed information.
The iris command
Executing the iris command on the operating system command line gives you management access to an InterSystems IRIS instance, which among other options lets you:
Connect to the instance using the InterSystems Terminal.
Start, stop, and restart the instance.
Display information about the instance, and about other instances installed on the system.
To use the iris command on a remote server, use a Telnet or SSH client; to use it with a containerized instance, use it inside the container, or use the docker exec command to run it from outside the container.
Connecting to an InterSystems IRIS Instance
The InterSystems Terminal is a command line you can use in any namespace of an InterSystems IRIS instance. Open the Terminal for a running instance using the command iris terminal instname, where instname is the name you gave the instance at installation. A containerized instance is typically named IRIS.
The Using The Terminal video on the InterSystems online learning website describes how to use the InterSystems Terminal.
Log in using one of the predefined user accounts, with the password you provided during installation, or an account you created. The prompt that displays indicates the login namespace, for example:
# iris terminal IRIS Node: intersystems2588, Instance: IRIS27 Username: admin Password: ******** USER>
To exit the Terminal and close the window, enter the command halt.
When using the docker exec command to open the Terminal for a containerized instance (as described in Interact Using the InterSystems Terminal in Deploy and Explore InterSystems IRIS), you are automatically logged in as irisowner and do not need to authenticate.
On a Windows system, you must execute the command from its location, the install-dir\bin directory of an InterSystems IRIS instance, or include the full path in the command, for example c:\InterSystems\IRIS27\bin\iris terminal IRIS4. You can execute the binary of a given instance to connect to that instance or another; the instance name is required either way.
Controlling an InterSystems IRIS Instance
The iris command supports a number of functions beyond terminal, and is invoked in the format iris function instname arguments, where instname is the instance name that you chose during the installation and arguments depends on the platform and function. As previously noted, on Windows, run the command from the install-dir\bin directory (or include the full path with the command).
Typical uses of the iris command are shown in the following table.
The iris help command displays all the command functions and arguments; the file IRISHelp.html is in the install-dir\Help directory. Some platform-specific functions of the iris command are not listed in this table, but are shown in the help display; functions that are internal to InterSystems do not appear there.
The iris command often displays error information in a message box. You can suppress this message box by adding quietly as the final argument to the iris command, which runs the command non-interactively with minimal dialog. This argument is also useful with other commands, such as iris stop and iris stopstart when you want shut the instance down without having to confirm the command.
|Command and Description||Arguments|
|iris start instname [arguments] — Starts the instance.
You may be prompted to start in “Emergency Mode;” if so, see Emergency Access in the “System Management and Security” chapter of the Security Administration Guide for more information.
[full pathname of .cpf file] — Starts InterSystems IRIS instance instname, optionally using the specified name.cpf file. If a name.cpf file is not specified, the InterSystems IRIS instance uses the iris.cpf file.
nostu — On all platforms except Windows, starts the specified instance without running ^STU.
|iris startnostu instname — On Windows, starts the specified instance without running ^STU.|
|iris stop instname [arguments] — Shuts down the instance. An optional /nofailover argument can be specified for stop. Specifying this option prevents triggering a mirror failover.||
restart — On all platforms except Windows, starts the instance after shutting it down.
|iris stopstart instname — On Windows, starts the instance after shutting it down. An optional /nofailover argument can be specified for stopstart. Specifying this option prevents triggering a mirror failover.|
|iris stopnoshut instname — Shuts down the named instance using INTNOSHUT^SHUTDOWN. An optional /nofailover argument can be specified for stoponshut. Specifying this option prevents triggering a mirror failover.
Only the instance owner and irisusr can run INTNOSHUT^SHUTDOWN without logging into the Terminal.
|iris force instname — Forces down the instance .|
iris list instname — Lists the following information for the specified instance, or fall all installed instances if none is specified:
|iris qlist — Lists essentially the same information for each instance as iris list, plus the JDBC Gateway port, but without labels and all on one line, separated by carets (^), in the following order. You can specify a single instance on the command line to display information for that instance only.
|iris all —
Lists the following information for all installed instances, one instance per line:
If you need complete information, such as for parsing or reporting purposes, use iris list.
|iris allw — Lists the same information for each instance as iris all, without wrapping long field values. Lines longer than 80 characters may result.|
|iris qall — On platforms other than Windows, lists the same information for each instance as iris all, except that long lines are truncated to 78 characters plus a terminating tilde (~).|
|iris stat instname — Retrieves system statistics, except on Windows systems. The same as the irisstat utility (see the appendix “Monitoring InterSystems IRIS Using the irisstat Utility” in the C Monitoring Guide), which is available on Windows.|
|iris rename instname newname — Renames the instance (not available on Windows systems).|
|iris terminal instname — Opens the InterSystems Terminal for the instance.||
-B — Enables system administrator emergency login to the Terminal (see Administrator Terminal Session in the “Licensing” chapter).
-b partition_size — Specifies the maximum partition size (in KB) for the process.
"[label[+offset]]^routine" — Specifies the name of an ObjectScript program to run in user mode. In addition to the specified formats, you can pass parameter lists consisting of string and/or numeric literals, as well as omitted (void) parameters, as follows:
where, for example, parameter-list is specified in the form "string literal",,-+-000123.45600E+07, and omitted parameters are passed to the target as $Data(parameter)=0.
Whitespace and shell meta characters must be quoted in an operating-system dependent form.
-U namespace — Specifies the Terminal login namespace.
namespace — Used with routine, runs the routine in the indicated namespace (Windows only).
The namespace and -U arguments have no effect if you are starting InterSystems IRIS with a user account whose Startup Namespace is specified (see Properties of Users in the “Users” chapter of the Security Administration Guide).
|iris console instname — Opens the InterSystems Terminal in an operating system command window rather than a Terminal window.||Same arguments as iris terminal.|
|iris run instname — Runs InterSystems IRIS in programmer mode with no input/output device for $Principal (Windows only).||Same arguments as iris terminal.|
|iris runw instname routine — Runs the named InterSystems IRIS routine in application mode with no input/output device for $Principal (Windows only). When run from a batch script, the command waits for the InterSystems IRIS process to terminate before returning the exit code from the process.||namespace — Runs the routine in the specified namespace.
The namespace argument has no effect if you are starting InterSystems IRIS with a user account whose Startup Namespace is specified (see Properties of Users in the “Users” chapter of the Security Administration Guide).
|iris help — Displays the most recent information about the iris command.||start, stop, force — Display function-specific help for the start, stop, and force functions.|
Configuring Multiple InterSystems IRIS Instances
You can install and simultaneously run multiple instances of InterSystems IRIS on a single machine. Install InterSystems IRIS as for a single installation, giving each instance a unique name, a unique installation directory, and a unique port number for the superserver, web server, and Telnet.
The special considerations for multiple instances are:
Installing multiple instances is limited by components where only one exists on a system. For example, typically there is only one web server on a system; and as such, the InterSystems IRIS installation configures the Web Gateway for the most recent installation. InterSystems IRIS client components stored in the registry encounter the same issue. InterSystems IRIS stores its ODBC driver in the registry using one name for each. Currently, the last installation updates these components to point to the last instance installed.
InterSystems makes an effort to move common components to a common directory that can be shared across InterSystems IRIS instances.
Multiple instances can share the same multiserver key, but if they do, they must use the same license server or set of license servers. Each system running an instance of InterSystems IRIS under the auspices of one or more license servers must have a local copy of the authorizing license key file installed in every instance.
Multiple instances can be networked.
Protection is included against simultaneous database use (that is, each instance must have its own databases and cannot access or modify another instance’s databases).
Each instance must have unique port numbers. See the next section for information on how to Set Port Numbers.
Set Port Numbers
For a standard, single instance of InterSystems IRIS, the superserver port number is 1972 by default. For multiple instances of InterSystems IRIS on a single machine, each must have a unique port number. During installation, subsequent instances are assigned a port if you choose to set it automatically, or you can manually enter port numbers during the installation. A standard installation sets the following port numbers for your InterSystems IRIS instance as follows:
Superserver port number — 1972 if available. Otherwise, the port is set to 51773 or the first available subsequent number.
Web server port number — 52773 or the first available subsequent number.
Telnet port number — 23
You most likely do not need to change the superserver or web server port numbers because of the way the InterSystems IRIS installation assigns them. However, you do need to assign each instance a unique Telnet port number. You can change the superserver port value after installation from the Memory and Startup page (System Administration > Configuration > System Configuration > Memory and Startup) of the Management Portal, and you can change the web server and Telnet port values after installation from the Startup Settings page (System Administration > Configuration > Additional Settings > Startup) and the Telnet Settings page (System Administration > Configuration > Device Settings > Telnet Settings), respectively, of the Management Portal.
If you frequently use and manage multiple instances of InterSystems IRIS on one machine, verify that each is assigned unique port numbers. The assignment of unique port numbers avoids confusion when using the InterSystems IRIS launcher tools on multiple instances from one Windows client.