You can set the default editor that sp_ctrl runs when you issue a command that requires input to an ASCII text file, such as a configuration file. By default, sp_ctrl runs vi on Unix and Linux.
The default text editors are tested and proven to work with SharePlex. If you change the default editor, the new editor must be a native ASCII text editor. Do not use a word processing program or other non-ASCII program, even if you can save a file to ASCII from that program.
Change the editor on Unix or Linux
Set the EDITOR variable in either of these ways:
- Before you start sp_ctrl. This sets the editor only for that session of sp_ctrl.
- In the shell startup script on the local machine. This sets the editor permanently, until changed in the startup script. You can override this setting on a per-session basis.
Syntax - ksh shell
export EDITOR=name_of_editor
Syntax - csh shell
setenv EDITOR name_of_editor
Change the editor on Windows
To change the text editor for sp_ctrl on a Windows system, you must add the EDITOR variable in the Windows Registry.
Important! Incorrect Registry settings can adversely affect the operation of SharePlex. Consult a System Administrator if you need help with this procedure.
- Shut down the SharePlex service.
- Open the Run dialog. The location varies with the Windows version.
- In the Run dialog, type regedit to run the Registry Editor.
- Expand the SharePlex node:
\HKEY_LOCAL_MACHINE\Software\Wow6432node\Quest Software\SharePlex
- Right click the port number of the SharePlex instance to which you want to add a variable, then select New, then String Value.
- Under the Name column, right click the new variable, then select Rename.
- Type the correct name.
- Double click the new variable.
- Under Value Data, enter the string for the new variable and then click OK.
- Exit the Registry.
Observe the following when issuing commands:
- To issue commands for a machine, sp_cop must be running on that machine.
- Enter the syntax exactly as shown in the command description in theSharePlex Reference Guide.
- The maximum string length of a SharePlex command is 255 characters, including spaces. To work around this operating-system limitation, use the edit command.
-
Use the redo command to execute the previous command again without having to retype it. This command is useful when you are making frequent status checks with the information commands, for example using the qstatus command to monitor changes in queue volume.
-
To view descriptions and syntax for SharePlex commands from within the sp_ctrl interface, issue the help command. To view just the syntax for a command, issue the usage command.
-
Use the usage command to view the syntax for a SharePlex command. You can enter the entire command or just the first few keywords. For example, type usage compare to view syntax for both the compare using and compare commands.
- Use the edit command to edit a previously issued command.
-
Use the authlevel command to determine your authorization level for issuing SharePlex commands on a system.
For more information, see About the SharePlex Security Groups.
To issue a command that will affect a remote machine and to script commands that include a login name, password, port number, or combination of those items, use one of the [onhost] command options. These options are available for most commands.
The following table describes the command options for remote connection using the [onhost] options.
These options enable you to issue the command on a remote machine and to script commands that include a login name, password, port number, or combination of those items.
on host |
Execute the command on a remote system (one other than the one where the current sp_ctrl session is running). You are prompted for login credentials for the remote system. If used, must be the last component of the command syntax.
Example: sp_ctrl(sysB)>status on SysA |
on host:portnumber |
Execute the command on a remote system when a remote login and port number must be provided. If used, must be the last component of the command syntax.
Example: sp_ctrl(sysB)>status on SysA:8304 |
on login/password@host |
Execute the command on a remote system when a remote login, password, and host name must be provided. If used, must be the last component of the command syntax.
Example:sp_ctrl(sysB)>status on john/spot5489@SysA |
on login/password@host:portnumber |
Execute the command on a remote system when a remote login, password, host name, and port number must be provided. If used, must be the last component of the command syntax.
Example: sp_ctrl(sysB)>status on john/spot5489@SysA:8304 |
Issue Commands for Clustered Systems
To issue sp_ctrl commands on clustered systems, use the name set with the SP_SYS_HOST_NAME parameter as the host in the [on host] options when connecting from a remote system, or set it as the default for sp_ctrl by using the host command. For more information about configuring SharePlex within a cluster, see the SharePlex Installation and Setup Guide.