How can I test if a database is running on Windows [message #475539] |
Wed, 15 September 2010 09:03  |
wtolentino
Messages: 375 Registered: March 2005
|
Senior Member |
|
|
I have a unix script that will check if the database is up and running. I need a similar script but this time in windows batch file.
this is the snippet of the code from the unix script:
#! /bin/sh
sqlplus -s /nolog > /dev/null 2>&1 <<EOF
whenever sqlerror exit failure
connect username/password@connect_identifier
exit success
EOF
[ $? -ne 0 ] && { echo "Connection failed"; exit 1; }
echo "Connection succeeded"
Thanks,
Warren
[Updated on: Wed, 15 September 2010 09:09] Report message to a moderator
|
|
|
|
Re: How can I test if a database is running on Windows [message #475552 is a reply to message #475543] |
Wed, 15 September 2010 10:01  |
wtolentino
Messages: 375 Registered: March 2005
|
Senior Member |
|
|
sorry if my english is not correct my apology. yes i have read the posting guidelines before and i am aware of it. and yes i have looked up the search and google before i posted my question. the search yield results most from unix topics and discussion this is the very reason why when i can't find the answers that i am looking for and i decide to post to rely on forums.
the link http://www.orafaq.com/scripts/win/isdbup.txt is helpful thanks so much.
[Updated on: Wed, 15 September 2010 14:00] Report message to a moderator
|
|
|