Return Code from SQLDBA Session?

From: Richard L. Rhodes <rhodesr_at_watt.oedison.com>
Date: 1995/12/05
Message-ID: <4a1e8n$1gs_001_at_go-rlr.oedison.com>#1/1


I'm writing a script that needs to run a SQLDBA session and I want the script to check whether the SQLDBA session worked. The one example below is straight from the admin book - backing up the control file.

Example:

	echo "\n==> Control File Backup - Begin"
	$ORACLE_HOME/bin/sqldba lmode=y <<eof
	connect system/manager
	alter database backup controlfile to 
		'$root/control.file.backup' 	reuse;
	exit
	eof

	if [[ <check for some type of return code> ]]; then
		send error
		exit
	fi

Is there a way in the script to check whether the alter command worked? I went through DBA Handbook and Oracle Reference and didn't find anything obvious.

If there is is a way to do this, will it work for a SQLPLUS session also?

THANKS! rick  


Richard L. Rhodes            rhodesr_at_watt.oedison.com
Ohio Edison Co.              phone: 216-384-4904
                             fax:   216-384-5445
Received on Tue Dec 05 1995 - 00:00:00 CET

Original text of this message