Home » Infrastructure » Windows » How can I test if a database is running on Windows (SQL*Plus 10.1.0.5.0, Windows Version 5.1.2600)
How can I test if a database is running on Windows [message #475539] Wed, 15 September 2010 09:03 Go to next message
wtolentino
Messages: 390
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 #475543 is a reply to message #475539] Wed, 15 September 2010 09:27 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Which part of the Posting Guidelines ( http://www.orafaq.com/forum/t/88153/0/ ) did you NOT read & follow?
Was it the part about using SEARCH ( http://www.orafaq.com/forum/s/136107/ ) or GOOGLE ( http://google.com ) before posting?

http://www.orafaq.com/scripts/win/isdbup.txt
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 Go to previous message
wtolentino
Messages: 390
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

Previous Topic: can't find the session of a Thread ID
Next Topic: Install oracle 11G in windows XP (32 bit)
Goto Forum:
  


Current Time: Thu Mar 28 12:34:54 CDT 2024