Tags: agent, beacuse, connection, database, dies, fail, mysql, oracle, overs, prompt, running, server, solaris, sql
How to check that the database is up and running from solaris prompt
I have an agent that fail overs to other server but it dies beacuse it does not get the connection from the database as the database is in the process of startup. Is there any way i can check the status of the database that it is up and running from solaris prompt.
The database that i am using is 9.2 and solarirs 9.
Leave a comment...
- 6 Comments
- Why do not check if pmon process exists (and/or smon...) ?
Nicolas.#1; Fri, 22 Feb 2008 23:19:00 GMT
- I have checked the procesess (smon and pmon ) they start even the database is in nomount mode...#2; Fri, 22 Feb 2008 23:20:00 GMT
- In this case, you can connect and query v$instance table :
E:\Documents and Settings\GASPAROTTO>set ORACLE_HOME=e:\oracle\ora92
E:\Documents and Settings\GASPAROTTO>set ORACLE_SID=DEMO9I
E:\Documents and Settings\GASPAROTTO>%ORACLE_HOME%\bin\sqlplus /nolog
SQL*Plus: Release 22.214.171.124.0 - Production on Fri Sep 9 20:37:50 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> conn / as sysdba
SQL> select status from v$instance;
You can make make a script which catch the result.
Nicolas.#3; Fri, 22 Feb 2008 23:21:00 GMT
- Maybe the skript from Orafaq is of some help#4; Fri, 22 Feb 2008 23:22:00 GMT
- Thanks Jens,
I am a little ridiculous with my previous post ;-).
Nicolas.#5; Fri, 22 Feb 2008 23:23:00 GMT
- Thanks guys its workin#6; Fri, 22 Feb 2008 23:24:00 GMT