How to issue SharePlex sp_ctrl commands from OS command line on local host, on remote host, or from a scripts file.
Below are several examples of SharePlex sp_ctrl commands that can be issued from a command line:
Assuming SharePlex $prodir/bin/ is in the environment PATH.
1. Return "qstatus" output on local host.
a. sp_ctrl qstatus on <localhost>
2. Return "qstatus" output on remote host
a. sp_ctrl qstatus on <remote_hostname>
b. login: <OS_User_Account>
c. password: <********>
3. Or combine step a, b, and c from option 2:
a. sp_ctrl qstatus on <OS_User_Account/********@remote_hostname>
For example: sp_ctrl qstatus on splex/splex@remote_hostname>
NOTE: If the source and target environment are in a TRUSTED environment, there is no need to specify OS_User_Account/PASSWORD. A quick test to see if the trusted environment is working properly, do "rsh <remote_host> ls -l /tmp/".
4. Here is an example of a script:
sp_ctrl << EOF
Refer to KB article SOL45226 "How to run the sp_ctrl commands in batch mode in Windows" for an example in a Windows envrionment