script to check if db is up and exit if it not [message #584481] |
Tue, 14 May 2013 12:27 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/4315fc2f9f117202310ac5e4ea1f9130?s=64&d=mm&r=g) |
sbk785
Messages: 5 Registered: May 2013
|
Junior Member |
|
|
hi
i have a script that first checks if the db is open:
if yes ... i have other conditions to run through.
But if the db is not open or available
i dont want to read the remaining lines in the script and exit immediately
environment variables exported ..
can someone help me with a way to stop and exit the script if my first condition fails.
here is what im trying:
log=/opt/oracle
sqlplus -s system/{pwd.} << EOF >$log
select open_mode from v\$database;
EOF
condiiton 2 ..3.. ,,
regards
sk
[Updated on: Tue, 14 May 2013 12:28] Report message to a moderator
|
|
|
|