Re: Windows, RMAN, Environmeent Variables - Help!

From: Norman Dunbar <oracle_at_dunbar-it.co.uk>
Date: Wed, 20 Apr 2016 09:10:30 +0100
Message-ID: <D4C1FBEB-8425-4D69-813B-50C3013CAE51_at_dunbar-it.co.uk>



Thanks Neil and Ingrid.

I tried both options and Ingrid's version worked perfectly. I now have a working generic RMAN backup script.

Neil's solution gave the same errors as it still didn't expand %BACKUP_LOCATION%, so it went off into %ORACLE_HOME%\DATABASE again.

I note from the log file that within the allocate channel, &1 is already expanded while %ORACLE_SID% is not. I suspect that the latter gets expanded when the file is created as it is being created with the correct SID in the path, but I also suspect it's Oracle that's doing the expansion as opposed to the OS, perhaps. Maybe? ;-)

My script has:

run {

    allocate channel ..... format '&1\%ORACLE_SID\%U';     ...

And the log file shows the command as:

run {

    allocate channel .... format 'h:\backups\%ORACLE_SID%\%U';

Anyway, back to the grind, thanks again everyone. As ever Oracle-l proves most helpful.

Cheers,
Norm.

--

Sent from my Android device with K-9 Mail. Please excuse my brevity.

--

http://www.freelists.org/webpage/oracle-l Received on Wed Apr 20 2016 - 10:10:30 CEST

Original text of this message