Views:

Summary



Though most environmental variables for RMAN jobs can be placed in the .bex configuration file, some variables need to be set before the RMAN job is launched.

Resolution



Environmental variables, such as the location of a non-default .bex configuration file for an RMAN job can be passed within the RMAN script itself.

When connecting to a database using a tns Alias, the RMAN SEND or PARMS commands can be used to specify environmental variables. Instead of setting the variable in the shell, you can set it in the individual RMAN script after the channels are allocated and before the backup command.

The following example uses the myinstance.bex file instead of the default sbt11cfg.bex configuration file. This command should be added to the RMAN script, or entered at the command line, after the channels are allocated and before the backup command:

send 'SSOBEX_CONFIG_FILE=/usr/local/BackEx/myinstance.bex';

 

Oracle 9i is used in the above example. Check Oracle documentation for the usage of SEND and/or PARMS specific to the version being used, since RMAN syntax often changes.