- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- oracle 9.2.0.6 startup/shutdown/monitor script for...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2006 05:52 AM
02-11-2006 05:52 AM
can anyone provide me the oracle 9.2.0.6 startup/shutdown/monitor script for service guard on hp-ux 11i.
Thanking you in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2006 06:05 AM
02-11-2006 06:05 AM
Re: oracle 9.2.0.6 startup/shutdown/monitor script for service guard
I'm going to let you in on a little secret. Process monitoring is how this is done and its not a good way to work.
You do a ps -ef | grep for oracle.
This gets you a list of important processes.
Then you use code like this:
smonproc=$(ps -ef | grep SMON |wc -l)
if [ $smonprod -le 1 ]
then
echo "Oracle problem..."
# put your code here.
fi
The problem is that its quite possible for the oracle processes to be present in a SG environment with the database being down or the database being mounted on the secondary node.
So the real way to monitor oracle is to use sqlplus to see if its running. The sqlplus command will undoubtedly fail if the database is not running.
sqlplus manager/manager1@systemname <<-EOF >> /tmp/sql_log
select * from v$database
EOF
You use the sqlplus statement you want, perhaps read from dual.
The problem I've run into in SG here is that sometimes the sqlplus statement takes a long time to execute and the cluster does not work really well.
Here are some online resources.
http://docs.hp.com/en/B5736-90046/ch03s02.html
http://www.oracle.com/technology/docs/deploy/availability/pdf/OPFS_8.0.6_install.pdf
http://www.filibeto.org/sun/lib/nonsun/oracle/9.2.0.1.0/oracle-real-app-clust-A95979_02.pdf
http://www.google.co.il/group/uvic.mlist.hpux-admin/browse_thread/thread/b10475b4205dc45/284847cd8b048778%23284847cd8b048778?sa=X&oi=groupsr&start=0&num=2
http://www.bmc.com/products/documents/84/06/28406/28406.pdf
Lots of good stuff up there, probably the very scripts you need.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2006 02:04 AM
02-13-2006 02:04 AM
SolutionIn the package control script:
SERVICE_NAME[0]="oraclemon"
SERVICE_CMD[0]="/etc/cmcluster/oracle/Perl/oraclemon.pl"
SERVICE_RESTART[0]=""
In the Perl dir, we have a file called:
# cat oracle_procs
ora_smon 0
ora_pmon 0
ora_dbw0 0
ora_reco 0
ora_ckpt 0
ora_lgwr 0
ora_arc0 0
LISTENER 1
extproc_listener 1
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2006 12:36 AM
03-03-2006 12:36 AM
Re: oracle 9.2.0.6 startup/shutdown/monitor script for service guard
For startup database:
1.- read enviarables (profile_bdNAME for ORACLE_HOME, ORACLE_SID, export PATH for $ORACLE_HOME/bin and others)
2.- Startup database
su - oracle -c '
. /home/oracle/oraBDNAME/conf/profile_BDNAME
sqlplus /nolog <
startup pfile=/oracle1/oraBDNAME/initBDNAME.ora
exit;
EOF
'
For shutdown database:
su - oracle -c '
. /home/oracle/oraBDNAME/conf/profile_BDNAME
sqlplus /nolog <
shutdown immediate
exit;
EOF
'
Define functions run and halt oracle in script for run/halt Sguard Pkg.
ran
ran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2006 03:34 AM
03-03-2006 03:34 AM
Re: oracle 9.2.0.6 startup/shutdown/monitor script for service guard
Within the MC/SG control script there are two functions that need entries for starting and shutting down the Oracle database server. Assuming you are familiar with the package control script.
Start commands for Oracle go in function customer_defined_run_cmds, and stop commands go in function customer_defined_halt_cmds.
=======================================================
function customer_defined_run_cmds
{
# startup the Oracle database server
su - oracle -c ${ORACLE_HOME}/bin/sqlplus /nolog <
startup pfile=${PFILE}
EOF
# startup the listener process
su - oracle -c "${ORACLE_HOME}/bin/lsnrctl start"
}
function customer_defined_halt_cmds
{
# shutdown the listener process
su - oracle -c "${ORACLE_HOME}/bin/lsnrctl stop"
# shutdown the Oracle database server
su - oracle -c ${ORACLE_HOME}/bin/sqlplus /nolog <
shutdown immediate
exit
EOF
}
=======================================================
hope it helps!