Re: Windows, RMAN, Environmeent Variables - Help!

  • From: Norman Dunbar <oracle@xxxxxxxxxxxxxxx>
  • To: Ingrid Voigt <giantpanda@xxxxxxx>
  • Date: Wed, 20 Apr 2016 09:10:30 +0100

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.

Other related posts: