ORA-1727 - where does the error go?

From: joel garry <joel-garry_at_home.com>
Date: Mon, 9 Feb 2009 09:24:00 -0800 (PST)
Message-ID: <ba257a00-e631-4962-9db8-b5bc8b89062e_at_s9g2000prg.googlegroups.com>, hp-ux 11.23

I have a slightly odd script that does an alter database backup controlfile to '$OBACKUP/backupcontrolfile.ctl'

Of course, I had forgotten to export the OBACKUP, since, well, there is an alter to trace which happens to work ok, and everything else works ok since all the data copying is local to the ksh script.

Now I understand that sqlplus must be creating a subprocess to do this, as when I do it manually in sqlplus I see the error, as well as in the log: ORA-7217 signalled during: alter database backup controlfile to '$OBACKUP/backupcontrolfile.ctl'...

$ sqlplus /nolog

SQL*Plus: Release - Production on Mon Feb 9 09:14:52 2009

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

_at_> connect / as sysdba

SYS_at_XXXX> alter database backup controlfile to '$OBACKUP/ backupcontrolfile.ctl';
alter database backup controlfile to '$OBACKUP/backupcontrolfile.ctl' *
ERROR at line 1:
ORA-07217: sltln: environment variable cannot be evaluated.

It works without error echoing the command into sqlplus -s manually: unset OBACKUP
echo "
connect sys as sysdba
alter database backup controlfile to '$OBACKUP/backupcontrolfile.ctl'; "|sqlplus -s /nolog

And I understand since I'm echoing all these sqlplus commands into sqlplus -s /nolog that there shouldn't be any normal output. Where there should be error output is debateable, I suppose, but I can understand the viewpoint that there shouldn't be.

I just don't quite understand why such an error should be suppressed from the alert log or anywhere in a cron script with a redirected standard and error output. Curly braces ${OBACKUP} seem to make no difference.

Bug or misfeature? I'm thinking at least sqlplus -s working different in a script must be a bug. Silent fail of backup controlfile can't be minor... can it? Or have I just missed something obvious?



_at_home.com is bogus.
http://www3.signonsandiego.com/stories/2009/feb/08/lz1e8patridge232829-medicinal-or-illegal/?uniontrib http://www3.signonsandiego.com/stories/2009/feb/08/lz1e8kreit232828-no-headline/?uniontrib
Received on Mon Feb 09 2009 - 11:24:00 CST

Original text of this message