cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to pass RMAN send command via a config file

JK1972
Not applicable

Hi,

I'd like to know the best way to read the RMAN SEND command that is in a config file instead of hardcoding into scripts. would a similar setup like below work with netbackup?

allocate channel t1 type 'sbt_tape' parms 'ENV=(NETBACKUP_CONF=/home/oracle/netbackup/nb.conf)' maxpiecesize 10G; Here is the rman section that is being run

connect target /;
show all;
run
{allocate channel t1 type 'sbt_tape' parms 'ENV=(NETBACKUP_CONF=/home/oracle/netbackup/nb.conf)' maxpiecesize 10G;

backup current controlfile;
 } 

 

contents of nb.conf file are:

SEND 'NB_ORA_SERV=media_server, NB_ORA_CLIENT=my_client, NB_ORA_POLICY=ORACLE, NB_ORA_PC_STREAMS=4';

1 ACCEPTED SOLUTION

Accepted Solutions

Marianne
Level 6
Partner    VIP    Accredited Certified

I think you are referring to a "cmdfile"? 

I have seen Oracle dba's using this in the past and found the following in the NBU Sample scripts:

@REM If you are getting an error that the input line is too long, you will need
@REM to put the RMAN run block in a separate file.  Then use the "cmdfile"
@REM option of RMAN.  For more information on the "cmdfile" options please
@REM refer to the RMAN documentation. 

I found this Oracle web site that explains the use of a CMDFILE: 
http://docs.oracle.com/cd/B28359_01/backup.111/b28273/rcmsynta040.htm 

Also see 'Command Files' over here: http://www.oracle.com/technetwork/issue-archive/2009/09-sep/o59recovery-085185.html 

View solution in original post

1 REPLY 1

Marianne
Level 6
Partner    VIP    Accredited Certified

I think you are referring to a "cmdfile"? 

I have seen Oracle dba's using this in the past and found the following in the NBU Sample scripts:

@REM If you are getting an error that the input line is too long, you will need
@REM to put the RMAN run block in a separate file.  Then use the "cmdfile"
@REM option of RMAN.  For more information on the "cmdfile" options please
@REM refer to the RMAN documentation. 

I found this Oracle web site that explains the use of a CMDFILE: 
http://docs.oracle.com/cd/B28359_01/backup.111/b28273/rcmsynta040.htm 

Also see 'Command Files' over here: http://www.oracle.com/technetwork/issue-archive/2009/09-sep/o59recovery-085185.html