Re: [Networker] Oracle backup query
2007-09-10 11:35:19
On Mon, 10 Sep 2007, Vince Howard wrote:
> I'm led to believe that it's a good idea to backup an Oracle DB's
> control file to disk so that it is backed up as a flat file by NetWorker
> (instead of, or as well as, backing it up via NMO). While I do have a
> RMAN script to backup a DB via NetWorker, I am not sure how to include a
> section to backup the control file to the local disk.
You can do that by invoking the "alter database backup controlfile"
command from your RMAN script (see below). The file that is created
will have to be backed up separately with a later saveset, as RMAN/NMO
won't know about it.
> run {
> set command id to 'DBTRAIN1_INCR';
>
> allocate channel t1 type 'SBT_TAPE';
> allocate channel t2 type 'SBT_TAPE';
>
> backup incremental level = 1
> filesperset 2
> format '%d_INCR_%s_%t'
> (database include current controlfile);
sql "alter database backup controlfile to ''/path/to/backup/controlfile''"
(Note the double-quotes and doubled single-quotes on the sql line :
the manual says that is the only way to pass a quoted filename as
part of the command.)
> release channel t1;
> release channel t2;
> }
--
Philippe Levan - Frontier/epix Systems
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
|
|
|