Start and Stop the PSUB Service
The Installer automatically installs the PSUB service on the database server. You must start it using the instructions below.
Instructions for stopping PSUB manually are included in the Oracle Clinical Administrator's Guide.
For more information, see:
- Start and Stop PSUB Automatically in UNIX and Windows
- Start PSUB Manually in UNIX
- Start PSUB Manually in Windows
Parent topic: Set Up the Parametrized Submission Process
Start and Stop PSUB Automatically in UNIX and Windows
On UNIX and Windows systems, you can automate the process of starting and stopping PSUB.
For more information, see:
- Start PSUB Automatically in UNIX
- Stop PSUB Automatically in UNIX
- Start PSUB Automatically in Windows
Parent topic: Start and Stop the PSUB Service
Start PSUB Automatically in UNIX
The following example shell scripts for Sun Solaris show how to make the process start automatically at system startup:
# File: /etc/init.d/dbora ORA_HOME=/u01/app/oracle/product/19.3.0.0/dbhome_1 ORA_OWNER=oracle if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ] then echo 'Oracle startup: cannot start' exit fi case "$1" in 'start') echo 'Starting Oracle...' su - $ORA_OWNER -c $ORA_HOME/bin/dbstart su - $ORA_OWNER -c "lsnrctl start" su - opapps -c start_psub ;; 'stop') echo 'Stopping Oracle...' su - opapps -c stop_psub su - $ORA_OWNER -c $ORA_HOME/bin/dbshut ;; esac # File: start_psub # Start database 1 start_psubdb_name1 code_environment wallet_alias
# Start database 2 start_psubdb_name2 code_environment wallet_alias
For example:
# Start database 1 start_psub venus 541 venus # Start database 2 start_psub pluto 541 pluto
where the database names are venus and pluto and your code environment is 541.
Parent topic: Start and Stop PSUB Automatically in UNIX and Windows
Stop PSUB Automatically in UNIX
You can automate the shutdown of the PSUB service on UNIX so that it does not require the entry of a password.
The following example shell scripts for Sun Solaris show how.
# File: /etc/init.d/dbora
ORA_HOME=/u01/app/oracle/product/19.3.0.0/dbhome_1
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]
then
echo 'Oracle startup: cannot start'
exit
fi
case "$1" in
'start')
echo 'Starting Oracle...'
su - $ORA_OWNER -c $ORA_HOME/bin/dbstart
su - $ORA_OWNER -c "lsnrctl start"
su - opapps -c start_psub
;;
'stop')
echo 'Stopping Oracle...'
su - opapps -c stop_psub
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut
;;
esac
# File: stop_psub
# Stop database 1
set TNS_ADMIN= opapps_home_dir export TNS_ADMIN stop_psub venus 541wallet_alias
# Stop database 2
stop_psub pluto 541wallet_alias
where the database names are venus and pluto and your code environment is 541.
Parent topic: Start and Stop PSUB Automatically in UNIX and Windows
Start PSUB Automatically in Windows
The batch file is required in large databases that take so much time to come up during a server reboot so that the system tries to start PSUB before the database is fully up. In this case the PSUB service does not start and an error like the following appears in the PSUB log file (found in the drive:\opapps\oc\541\log directory):
ERROR:Daemon error while connecting:/@devoc ORA-1033: ORACLE initialization or shutdown in progress
Perform the following actions:
- Create a System Environment Variable
- Schedule the Batch File and Testing the Setup
- Create a Batch File
- Add a Shortcut
Parent topic: Start and Stop PSUB Automatically in UNIX and Windows
Create a System Environment Variable
You can specify that the PSUB service starts automatically when the Windows PSUB server re-boots. The service parameters are read from a system environment variable whose name concatenates PSUBSERVICE
with the database name.
To create a system environment variable in Windows:
Parent topic: Start PSUB Automatically in Windows
Schedule the Batch File and Testing the Setup
To schedule batch file execution:
Parent topic: Start PSUB Automatically in Windows
Create a Batch File
Note:
- "PSUB Service database_id" is the PSUB service name that appears in the Services window (under Administrative Tools from the Control Panel).
- You can repeat the following command for different databases if needed:
cmd /c net start "PSUB Service database_id" > psub_start1.log
- The 'ping localhost' command introduces a time delay to ensure that the database is up before starting PSUB. You can increase this value—set to 180 seconds (3 minutes) in the example above—if required.
Parent topic: Start PSUB Automatically in Windows
Add a Shortcut
For convenience add a shortcut for psub_start1.bat on the desktop to manually start PSUB by double-clicking the icon.
Parent topic: Start PSUB Automatically in Windows
Start PSUB Manually in UNIX
To start the PSUB service on UNIX:
Parent topic: Start and Stop the PSUB Service
Start PSUB Manually in Windows
To start the PSUB service on Windows:
- Log in as opapps. (You set up the PSUB service to start as the opapps user, but in Windows you can start the service when logged on as another user.)
- Set the PSUB service parameters:
- In the Start menu, navigate to Administrative Tools, then Services.
- From the list of services in the Services dialog box, double-click the name of the database for this service. It is in this form:
PSUB Service database
- Enter values for the Log On parameters:
database code_environment
[verbose | noverbose]
value-of-RXC_ROOT
wallet_alias
For example:
prod 541 verbose c:\\opapps\\oc\\541 <
wallet_alias
>
where prod is the connect string for the database instance to which the PSUB service connects;
where 541 is the name of the code environment;
where wallet_alias is the name of the Wallet specified during installation.
Note:
If your entry requires a backslash (\), you must enter two (\\). Alternatively, you can enter the path using single forward slashes, for example, c:/opapps/oc/541.
- Click Start.
- Exit from the Services dialog box.
- Check the PSUB service log file in <RXC_ROOT>\log for any warning or error messages.
Parent topic: Start and Stop the PSUB Service