- Makes sure the user running the scripts is the "siebel" user to avoid running the processes under any other user (which unluckily happened to me many time)
- Loads Siebel Environment variables by running the "siebenv.sh" script (which is provided by Oracle)
- Runs the "start_server all", "start_ns", "stop_server all" or "stop_ns" commands.
Assumptions:
- There is only one enterpise in one siebel server
- All the scripts are put in folder "/CRM/Scripts" in my example
- "/siebel" is Siebel installation folder
- "siebel" is the user name used to install and configure Siebel
if [ $USER == "siebel" ]; then
cd /siebel/gtwysrvr
. ./siebenv.sh
/siebel/gtwysrvr/bin/start_ns
else
echo "Please login as user siebel to run this script."
fi
Shutdown The Gateway:
if [ $USER == "siebel" ]; then
cd /siebel/gtwysrvr
. ./siebenv.sh
/siebel/gtwysrvr/bin/stop_ns
else
echo "Please login as user siebel to run this script."
fi
Startup Siebel Server:
if [ $USER == "siebel" ]; then
cd /siebel/siebsrvr
. ./siebenv.sh
/siebel/siebsrvr/bin/start_server all
else
echo "Please login as user siebel to run this script."
fi
Shutdown Siebel Server:
if [ $USER == "siebel" ]; then
cd /siebel/siebsrvr
. ./siebenv.sh
/siebel/siebsrvr/bin/stop_server all
else
echo "Please login as user siebel to run this script."
fi
Startup the Gateway and then Siebel Server (They must be started in that order):
if [ $USER == "siebel" ]; then
. /CRM/Scripts/StartupGateway
. /CRM/Scripts/StartupSiebel
else
echo "Please login as user siebel to run this script."
fi
Shutdown the Siebel Server and then the Gateway (Again, they must be shutdown in this order):
if [ $USER == "siebel" ]; then
. /CRM/Scripts/ShutdownSiebel
. /CRM/Scripts/ShutdownGateway
else
echo "Please login as user siebel to run this script."
fi
That's it! It might look stupid, but this is the way I like it, keep it simple & stupid :)
No comments:
Post a Comment