checking sqldba return status

From: Scott Holt <scott_at_prism.gatech.EDU>
Date: 22 May 92 18:44:35 GMT
Message-ID: <58670_at_hydra.gatech.EDU>


We run backup scripts for our oracle databases which, after making a backup of all database files, attempt to restart the database. In the code of these scripts we have statments like the following:

	if sqldba command=startup
	then
		echo "Database restarted" > /dev/console
	else
		echo "Database restart failed - inform DBA" > /dev/console
	fi

Well, this doesn't seem to work. Apparently sqldba always returns an exit status 0 - even if the startup (or whatever command we give it) fails. This seems like a rather pin headed thing to do - especially since many example procedural scripts provided by oracle do exactly the same type of operations.

Does anyone have an alternative method for determining if sqldba operations complete successfully? Simply checking for the existance of an sgadef file will not cut it.

-- 
This is my signature. There are many like it, but this one is mine.
Scott Holt                 		Internet: scott_at_prism.gatech.edu
Georgia Tech 				UUCP: ..!gatech!prism!scott
Office of Information Technology, Technical Services
Received on Fri May 22 1992 - 20:44:35 CEST

Original text of this message