Hi anyone has shell script to check the remote db is up or not ?
If all the login username and password are unknown... will it be too difficult to put the check in script ?
Your contribution is very much appreciated. Thank You.
Well the only realy way to check wheather the database is up or not would be to from a shell script taht can actually login into the databse and do somethin like seelect sysdate from dual;..other methods like checking for ps -ef |grep smon and might be useful..but what if the database is just mounted and not open..your pager would ring anyway :-)
Originally posted by hrishy Well the only realy way to check wheather the database is up or not would be to from a shell script taht can actually login into the databse and do somethin like seelect sysdate from dual;
No need to know any username and or password, no need to actually log into the database to know if it is up and running. Simply try to connect to the database using any existent or non existent database account. If the connection is successfull you know the database is up and running. If you get ORA-1031 "Invalid username or password" you know the database is up and running. In any other case you know the database (or at least one of the needed system components, like listener) is not up and running.
Jurij Modic ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
Bookmarks