- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to check database status
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
Discussions
Discussions
Discussions
Forums
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
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-13-2005 02:32 PM
тАО02-13-2005 02:32 PM
I have a script that starts the oracle database. I want to enhanced this by checking first the database if it is up or down.
If it is up, the script executes. If not the script ends.
I was thinking of the background oracle process. Are there any effective way of checking the status that can be compare to and incorporated on the scrit?
Regds,
Paul
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2005 03:16 PM
- Tags:
- PS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2005 04:09 PM
тАО02-13-2005 04:09 PM
Re: how to check database status
rgds,
paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2005 04:28 PM
тАО02-13-2005 04:28 PM
Re: how to check database status
Yes.
That's all what I used to do when I need to shutdown the server for a cold backup.
Regards,
Syam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2005 04:29 PM
тАО02-13-2005 04:29 PM
Re: how to check database status
Not only pmon represent oracle DB, other processes like dbwr,logwr,smon also represent. check for these process also.
We prefer looking into listerner
#ps -aef|grep -i lsnr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2005 04:47 PM
тАО02-13-2005 04:47 PM
Re: how to check database status
I am mentioning a scenerio where you have a proper db shutdown. Log writer, data base writer and SMON will be stopped after issuing "shutdown immediate" in the 'SQL>" propmt. This case checking of PMON only also will do the purpose. Also you can check the processes related to your ORACLE_SID.
Paul, If you can share the purpose of the script, we can help you in a better way.
regards,
Syam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2005 05:26 PM
тАО02-13-2005 05:26 PM
Re: how to check database status
Actually this is the pre-exec of our DP5 backup. We have a failed backup before due to script error. The current pre-exec script shutdowns the database and the post-exec restart the database.
What we found out was when database is down and the backup starts and the pre-exec script that shutdown the database runs our DP5 backup fails.
Rgds,
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2005 05:26 PM
тАО02-13-2005 05:26 PM
Re: how to check database status
Actually this is the pre-exec of our DP5 backup. We have a failed backup before due to script error. The current pre-exec script shutdowns the database and the post-exec restart the database.
What we found out was when database is down and the backup starts and the pre-exec script that shutdown the database runs our DP5 backup fails.
Rgds,
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2005 06:15 PM
тАО02-13-2005 06:15 PM
Re: how to check database status
That means , the script is for backup related activity. In that case checking of only PMON will do your purpose.You can also check SMON but not necessory in an ideal condition.
All the data base related processes ( LOGWR,DBWR, and SMON) will be down in a normal scenerio, if the Process MONitor( PMON) is down. Also LOGWR and DBWR are not running as a daemon in unix.ie; you cant find it running/not using ps comand. At the same time SMON status cn be viewed using
#ps -ef|grep -i smon
regards,
Syam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2005 06:30 PM
тАО02-13-2005 06:30 PM
Re: how to check database status
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2005 03:55 AM
тАО02-14-2005 03:55 AM
Re: how to check database status
The listener won't tell you if the database is up and down.
ususally I would use (like others) the pmon process
ps -ef | grep [p]mon | grep
where
I had in the past issues with pre-exec script as they never finished and the backup timed out. The script does a "shutdown immediate" but I had some long operation(s) still running , hence the issue.
One possibility is to kill all the client processes beforehand, but again if this is a long operation the rollback may take sometimes.
Regards
Jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2005 05:13 AM
тАО02-14-2005 05:13 AM
Re: how to check database status
What I do, check for the 'pmon'
ps -ef | grep pmon
I will also SQL intop the database and do a short, simple select to ensure that I can get info from the database.
Example
SQL> select * from dba_users;
Use a table that you know is going to be short.
Do a login from a remote terminal to check the accessibility of database via the listener.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2005 05:18 AM
тАО02-14-2005 05:18 AM
Re: how to check database status
Also check out:
http://www.oracleutilities.com/OSUtil/ping.html
Rgds...Geoff