文章
· 九月 17, 2022 阅读大约需 7 分钟

第三十五章 在 Windows 上使用 IRIS(二)

第三十五章 在 Windows 上使用 IRIS(二)

IRIS 启动器

Microsoft Windows 平台上的主要IRIS 界面是 IRIS 启动器。从 IRIS 启动器,可以启动所有 IRIS 配置和管理工具。还可以从快捷方式或命令行调用每个启动器命令。

相应地,可以从 Windows 程序菜单中启动许多 IRIS 工具,方法是指向 IRIS 文件夹,然后指向启动 IRIS 以获得适当的 IRIS 实例名称。

当在基于 Windows 的系统上启动 IRIS 时, IRIS 启动器图标会出现在任务栏的系统托盘中。

当单击 IRIS 启动器时,会出现一个菜单,其中包含使用 ObjectScript 实用程序和编程环境的命令。

下表描述了 IRIS 启动器菜单中可用的命令。

IRIS 启动器命令 描述
Getting Started 显示教程、发行说明、文档和其他相关信息的链接
Start IRIS 启动菜单项后方括号中指定的默认实例,例如 [ii2081]。如果 IRIS 服务器已经启动,这个选项会变暗——它不可用。
Stop InterSystems 关闭或重新启动本地 IRIS 实例。如果 IRIS 服务器已停止,此选项将显示为灰色——它不可用。
Studio 创建、编辑、删除和编译 IRIS 类定义和例程。
Terminal 调用 IRIS 的命令行解释器。
Management Portal 执行常见的系统管理任务。创建数据库和命名空间,并调整所有 IRIS 配置设置。显示类、全局变量和例程,以及用于管理它们的函数。显示表和视图,执行查询和 SQL 管理功能。
Documentation 显示 IRIS 在线文档。
Preferred Server [server name] 显示远程服务器列表并使用子菜单上的“添加/编辑”命令维护服务器连接。首选服务器出现在括号中,并且在服务器列表中旁边有一个复选标记。
About 显示 IRIS 版本和构建信息。
Exit 从系统托盘中删除IRIS 启动器图标;这不会停止 IRIS。当实例重新启动时,启动器会重新出现。

启动 IRIS

要启动 IRIS,请在系统级别运行启动程序。此过程使用默认配置文件或指定的配置文件运行。

注意:如果在启动 IRIS 时遇到任何问题,请按照“监控指南”的“监控日志文件”部分中的说明查看 messages.log 文件。

要在 Windows 平台上启动 IRIS,请从 IRIS 启动器中选择启动 IRIS。这将使用指定的配置文件启动 IRIS 实例。当 IRIS 未运行时, IRIS 启动器图标显示为灰色。

如果 IRIS 启动器不在系统托盘中,请从 Windows 程序菜单中选择 IRIS 文件夹并为该实例启动 IRIS。要将启动器返回到系统托盘,请转到 install-dir/bin 目录并双击 iristray.exe 文件。

或者,可以从“开始”菜单上“运行”命令的“打开”框中的 install-dir/bin 目录输入这些命令。例如,要从 MyIris\bin 目录启动名为 MyIris 的实例,请输入以下命令:

c:\MyIris\bin\iris start iris

停止 IRIS

通常让 IRIS 系统保持运行。但是,如果操作系统需要重新启动,请在关闭系统之前停止 IRIS。诸如备份和数据库修复实用程序等维护任务不需要停止 IRIS

IRIS 启动器菜单中单击停止 以关闭或重新启动本地 IRIS 实例。默认情况下,此选项使用默认关闭例程立即关闭(或重新启动) IRIS。但是,它还提供了设置延迟关闭的计时器、运行用户定义的关闭例程、向服务器上的用户广播警告消息以及关闭而不进行故障转移的选项。可以从 Windows 程序菜单运行相同的过程。为该实例名称选择 IRIS 文件夹并停止 IRIS。一旦倒计时达到 0 并且关机程序已开始,将无法取消关机。

image

重要提示:InterSystems 建议运行 Stop IRIS 来关闭 IRIS 以确保其正确关闭。

删除 Stop InterSystems 命令

为防止意外执行 Stop InterSystems 命令,可以通过从相应 IRIS 实例的 install-dir/bin 目录中删除 irisstop.exe 文件来从 IRIS 启动器中删除该命令。还可以从“开始”菜单中的相应 IRIS 实例中删除停止 InterSystems 快捷方式。指向 Programs 和 IRIS 实例名称,然后右键单击 Stop 并单击 Delete

从命令提示符控制 IRIS

可以通过运行 install-dir\bin 目录中的 iris.exe 程序从 Windows 命令提示符控制 IRIS 实例。

要显示此命令的最新帮助信息,请从 IRIS install-dir\bin 目录调用 iris 帮助。例如:

C:\InterSystems\IRISHealth\bin>iris help
usage:
       iris start <instance> [<cpf_file>]
           to start instance <instance>, optionally using the specified .cpf file.

           An optional /EmergencyId=Username,Password can be used to start
           InterSystems IRIS in emergency mode.  When the EmergencyId argument
           is supplied, the system starts up in emergency mode in which only the
           baseline databases are mounted and access to InterSystems IRIS is
           governed by InterSystems IRIS login using that username and password.
           Emergency mode is supplied to give access in the event that privileged
           users are not available or their password is forgotten.  Emergency
           startup is only available from an administrator account.

           When InterSystems IRIS is started in emergency mode, the IRIS control
           service is not used. This means that if you log out of Windows, all
           the InterSystems IRIS processes will immediately exit.

   or: iris startnostu <instance>
           to start instance <instance> without running ^STU.

   or: iris stop <instance>
           to shut down instance <instance>.

   or: iris stopnoshut <instance>
           to shut down instance <instance> without running user shutdown routines.

   or: iris stopstart <instance>
           to shut down and restart instance <instance>.

Note:  An optional /nofailover argument can be specified for stop,
       stopnoshut, or stopstart to not trigger a mirror failover.

   or: iris force <instance>
           to force down instance <instance>.

   or: iris [ run OR console OR terminal ] <instance>
           to run InterSystems IRIS in programmer mode with
           [ no-device OR console OR terminal ] for $Principal.

   or: iris [ run OR console OR terminal ] <instance> <Rou>
           to run InterSystems IRIS routine <Rou> in application mode with
           [ no-device OR console OR terminal ] for $Principal.

   or: iris [ run OR console OR terminal ] <instance> <Rou> <namespace>
           to run InterSystems IRIS routine <Rou> in <namespace> in application
           mode with [ no-device OR console OR terminal ] for $Principal.

   or: iris runw <instance> <Rou> [<namespace>]
           to run InterSystems IRIS routine <Rou> in application mode with
           no input/output device for $Principal using the optional namespace.
       When run from a batch script, iris will wait for the InterSystems IRIS
       process to terminate before returning. The exit code from the InterSystems
       IRIS process will be returned by iris.

Note:  An optional /Title="Title string" can specify the console
       or terminal title bar text.

   or: iris iristraystart <instance>
           to start IRISTray for instance <instance>.

   or: iris iristraystop <instance>
           to stop IRISTray for instance <instance>.

   or: iris licmanagerstop <instance>
           to stop licmanager running in instance <instance>.

   or: iris all [> outputfile]
           to list all installed instances.

   or: iris allw [> outputfile]
           to list (wide format) all installed instances.

   or: iris list [<instance>] [> outputfile]
           to list information about all installed instances or the
           specified instance.

   or: iris qlist [<instance>] [> outputfile]
           to display a quick list of information about all installed
           instances or the specified instance, in a format suitable
           for parsing in command scripts.
   The record for an instance contains fields separated by "^" (carats):
           Field 1: instance name
           Field 2: instance directory
           Field 3: version identifier
           Field 4: current status for the instance
           Field 5: configuration file name last used
           Field 6: SuperServer port number
           Field 7: WebServer port number
           Field 8: JDBC Gateway port number
           Field 9: Instance status (e.g., ok, warn, alert)
           Field 10: Product name of the instance
           Field 11: Mirror Member Type (e.g., Failover, Disaster Recovery)
           Field 12: Mirror Status (e.g., Primary, Backup, Connected)

   or: iris serverlist [> outputfile]
           to list information about all defined servers.

Note:  When  [> outputfile] is present, output is redirected
       to the file instead of being displayed on the terminal.

   or: iris telnetstop <instance>
           to stop the InterSystems IRIS TELNET daemon.

   or: iris telnettrace <instance>
           to toggle the TELNET trace state.

   or: iris iristrmdstop <instance>
           to stop the InterSystems IRIS terminal daemon.

Note:  iris often displays error information in a message box.
       You can suppress the message box containing error information
       by adding "quietly" (without the quotation marks) as the
       final argument to the iris command.

   or: iris help [display]
           to show this help. If display is specified the help
           is displayed in a browser window.

iris help 命令将在终端中显示最新的帮助信息。还可以通过将 >outputfilename 添加到 iris 帮助命令,将帮助信息保存到 intsall-dir\bin 目录中的文件中。例如:

C:\MyIris\bin>iris help>helpinformation

在命令行上连接到 IRIS

可以使用 iris 终端命令在命令行上登录 IRIS 实例。

讨论 (0)1
登录或注册以继续