-
Did I once hear from another DBA that Oracle puts a file somewhere in $ORACLE_HOME signaling the instance/database is started and the absence of the file means it's down? Or was I just dreaming?
If it was a dream, then I can check
ps -ef | grep smon
Is there any other creative ideas from the O/S showing the state of the dB? This must also work if the instance is shut.
thank you!
Don't blame me, I'm from Red Sox Nation.
-
Depends on what you are trying to check. If you check the presence of smon, that only guarantees the instance has been started. It may be in nomount state, but it has been started.
If you want an end-to-end check for the ability of a user to logon, you have to write a script that tries to logon to the database. If that fails, you know some part of your "database" is down.
Jeff Hunter
-
in Oracle 7, you could rely on sgadef, but this file being here no longer means something ...
checking smon (or pmon) or looking for memory segments using ipcs -a | grep oracle is a way to know if the instance is started, but to know is it's open, you'll have to test a connection ...
-
Can anybody explain me more in dept about this command? and How I would use it and interpret the info
ipcs -a | grep oracle
Thanks
Jigar
[Edited by jlakhani on 12-14-2001 at 12:20 PM]
"High Salaries = Happiness = Project Success."
-
Thank you pipo - i didn't dream of it after all!!!
After a little experimentation, here's what I came up with (oracle 9i);
1. ps -ef | grep ora_smon_{dB_name}
2. if the instance is started (NOMOUNT) then the following query will still work because v$instance is available in NOMOUNT:
sqlplus /nolog << END | tee -a $LOG
connect / as sysdba
select status from v$instance;
END
3 values of STATUS
STATUS = STARTED ( this means NOMOUNT)
STATUS = MOUNT
STATUS = OPEN
Thanks again.
Don't blame me, I'm from Red Sox Nation.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|