Using Caché on Windows
Managing a Caché instance on the Microsoft Windows platform is straightforward. You can perform most tasks using the Management Portal and the Caché Launcher. You can also control a Caché instance from a command prompt. This chapter discusses the following topics:
This chapter refers to the Caché installation directory as install-dir — you can find the current default directory in the Default Caché Installation Directory section of the Caché Installation Guide.
Do not use Windows file compression on Caché CACHE.DAT database files. (Files are compressed by right-clicking a file or folder in Windows Explorer and selecting Properties, then Advanced, then Compress contents to save disk space; once compressed a folder name or filename is rendered in blue in WIndows Explorer.) If you compress a CACHE.DAT file, the instance to which it belongs will fail to start, with misleading errors.
The primary Caché interface on Microsoft Windows platforms is the Caché Launcher. From the Caché Launcher, you can start all of the Caché configuration and management tools. You can also invoke each Launcher command from a shortcut or command line.
Correspondingly, you can initiate many of the Caché tools from the Start menu by pointing to Programs, Caché, and then to the appropriate Caché instance name.
When you start Caché on a Windows-based system, the Caché Launcher appears in the system tray of the taskbar.
When you click the Caché Launcher, a menu appears with commands to use the Caché utilities and programming environments.
The following table describes the commands available from the Caché Launcher menu.
|Caché Launcher Command||Description|
|Getting Started||Displays links to tutorials, release notes, documentation, and other related information.|
Starts the default instance specified in the square brackets after the menu item, for example [CACHE]. If the Caché server is already started, this option appears dimmed—it is unavailable.
For information about how to prevent an instance from starting automatically, see the Memory and Startup Settings section of the “Configuring Caché” chapter of this guide.
|Stop Caché||Shuts down or restarts the local Caché instance. If the Caché server is stopped, this option appears dimmed—it is unavailable.|
|Studio||Creates, edits, deletes, and compiles Caché class definitions, CSP (Caché Server Pages) pages, Caché Basic routines, and ObjectScript routines. See Using Studio for more information.|
|Terminal||Invokes the command line interpreter in the Caché programming environment. See the Using Terminal guide for more information.|
|Management Portal*||Performs common system management tasks. Creates databases and namespaces, and adjusts all Caché configuration settings. Displays classes, globals, and routines, and functions for managing each. Displays tables and views, perform queries and SQL management functions. See the “Using the Management Portal” chapter for more information.|
|Documentation||Displays Caché online documentation.|
|Preferred Server [server name]||Shows a list of remote servers and maintains server connections by using the Add/Edit command on the submenu. The preferred server appears in brackets and has a check mark next to it in the server list. See the Define a Remote Server Connection section of the “Connecting to Remote Servers” chapter for more information.|
|About||Displays Caché version and build information.|
|Exit||Removes the Caché Launcher icon from the system tray; this does not stop Caché.|
* Replaces the functions of Caché Explorer, SQL Manager, Control Panel, and Configuration Manager in Caché 5.0.
To start Caché, run the startup procedure at the system level. This procedure runs using either the default configuration file or a configuration file you specify.
If you have any trouble starting Caché, view the cconsole.log file as described in the Monitoring Log Files section of the Caché Monitoring Guide.
To start Caché on the Windows platform, select Start Caché from the Caché Launcher. This starts the Caché instance using the specified configuration file. When Caché is not running, the Caché Launcher icon appears dimmed.
If the Caché Launcher is not in the system tray, from the Start menu point to Programs, Caché, the Caché instance name, and click Start Caché. To return the Launcher to the system tray, go to the install-dir/Bin directory and double-click the csystray.exe file.
Alternatively, you can enter these commands from the install-dir/Bin directory in the Open box of the Run command on the Start menu. For example, to start the instance named cache from the MyCache/bin directory, enter the following command and click OK.
c:\mycache\bin\ccontrol start cache
These methods of starting Caché call the ccontrol start command. See Controlling Caché from the Command Prompt for more options and information on the ccontrol command.
Normally you leave your Caché system running. However, if your operating system requires a restart, stop Caché before you shut down your system. The Caché maintenance tasks, such as backups and database repair utilities, do not require you to stop Caché.
From the Caché Launcher menu click Stop Caché to shut down or restart the local Caché instance. By default, this option shuts down (or restarts) Caché immediately, using the default shutdown routine. However, it also provides options for setting a timer for a delayed shutdown, for running a user-defined shutdown routine, for broadcasting a warning message to users on the server, and for shutting down without failing over. You can run this same process from the Start menu. Point to Programs, Caché, the Caché instance name, and click Stop Caché. You cannot cancel a shutdown once the countdown reaches 0 and the shutdown procedures have started.
InterSystems recommends that you run Stop Caché to shut down Caché to ensure that it closes properly.
These methods of stopping Caché call the ccontrol stop command. See Controlling Caché Instances for more options and information on the ccontrol command.
To prevent unintentional execution of the Stop Caché command, you can remove the command from the Caché Launcher by deleting the cstop.exe file from the install-dir/Bin directory of the corresponding Caché instance. You can also remove the Stop Caché shortcut from the appropriate Caché instance from the Start menu. Point to Programs, Caché, the Caché instance name, then right-click Stop Caché and click Delete.
Removing the Launcher from the System Tray
You can choose to temporarily or permanently remove the Launcher from the system tray; this only affects the Launcher and not Caché as a whole.
If you click on the Launcher in the system try and choose Exit, the Launcher stops and its icon no longer appear in the system tray. The Launcher reappears when the system is rebooted or you start Caché from the Start menu (see Starting Caché in this chapter).
On your Windows boot disk, go to the directory,
Documents and Settings\All Users\Start Menu\Programs\Startup\Caché
Delete the directory that bears the instance name whose Launcher you wish to eliminate from the system tray.
Controlling Caché from the Command Prompt
You can control a Caché instance from the Windows command prompt by running the ccontrol.exe program in the install-dir\Bin directory. For information about the ccontrol command, see Controlling Caché Instances in the “Using Multiple Instances of Caché” chapter of this guide.
To display the most current help file for running the ccontrol command, invoke ccontrol help from the Caché install-dir\Bin directory. For example:
The command displays the CcontrolHelp.html file in your browser; the file is in the install-dir\Help directory.
Connecting to Caché on the Command Line
You can log into a Caché instance on the command line using the csession command. See Connecting to a Caché Instance in the “Using Multiple Instances of Caché” chapter of this guide for more information on csession.