Networker

Re: [Networker] How to make unique save set names for Oracle backups?

2007-05-07 16:39:28
Subject: Re: [Networker] How to make unique save set names for Oracle backups?
From: Davina Treiber <DavinaTreiber AT PEEVRO.CO DOT UK>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Mon, 7 May 2007 21:37:23 +0100
George Sinclair wrote:
> Hi,
> 
> Is is possible to create unique save set names with Oracle backups using
> NMO and RMAN?
> 
> Our save set names are always the name of the rman script itself. For
> example, when we run our level 1
> backups, mminfo reports something like this:
> 
> vol001    client    05/07/07 257 KB    full 
> RMAN:/oracle/rman/level1_test.rcv
> vol001    client    05/07/07 9473 KB  full 
> RMAN:/oracle/rman/level1_test.rcv
> vol001    client    05/07/07 2561 KB  full 
> RMAN:/oracle/rman/level1_test.rcv
> vol001    client    05/07/07  83 MB    full 
> RMAN:/oracle/rman/level1_test.rcv
> vol001    client    05/07/07 8705 KB  full 
> RMAN:/oracle/rman/level1_test.rcv
> vol001    client    05/07/07 257 KB    full 
> RMAN:/oracle/rman/level1_test.rcv
> vol001    client    05/07/07 290 KB       9  index:client
> 
> How do we change it so the save set names are unique?
> 

You need to use the format command within the RMAN script.

Here is a simple RMAN script as an example:

connect target rman/[email protected]
connect rcvcat rman/[email protected]

run {
set command id to 'something.offline';
#
allocate channel t1 type 'SBT_TAPE'
parms
'ENV=(NSR_SERVER=myserver,NSR_DATA_VOLUME_POOL=7day,NSR_SAVESET_EXPIRATION=7
days)';
allocate channel t2 type 'SBT_TAPE'
parms
'ENV=(NSR_SERVER=myserver,NSR_DATA_VOLUME_POOL=7day,NSR_SAVESET_EXPIRATION=7
days)';
#
backup
  filesperset 4
  skip inaccessible
  tag 'something.offline'
  format 'something.offline_%n.%u'
  (database);
#
release channel t1;
release channel t2;
}

To sign off this list, send email to listserv AT listserv.temple DOT edu and 
type "signoff networker" in the body of the email. Please write to 
networker-request AT listserv.temple DOT edu if you have any problems with this 
list. You can access the archives at 
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER