Home » RDBMS Server » Backup & Recovery » How to create Rman backup script for database,controlfile and archivelog in one script
How to create Rman backup script for database,controlfile and archivelog in one script [message #257057] Tue, 07 August 2007 08:45 Go to next message
aslamkhalife
Messages: 42
Registered: July 2007
Location: India
Member
Hi

I am working on Oracle 10g Rel 2 Rman.

I am unable to create script for backing up database, archive log and control file in one single script

Please guide for this query

Thanks & Regards
Re: How to create Rman backup script for database,controlfile and archivelog in one script [message #257060 is a reply to message #257057] Tue, 07 August 2007 08:48 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hi,

Can you show us what is your script for RMAN BACKUP
where your script is fail.

Are you search on google or documentation ?


Regards
Taj

PS: Don't forget to mention OS Platform.
Re: How to create Rman backup script for database,controlfile and archivelog in one script [message #257061 is a reply to message #257060] Tue, 07 August 2007 08:52 Go to previous messageGo to next message
aslamkhalife
Messages: 42
Registered: July 2007
Location: India
Member
Hi

I am trying to search on Google, i got script for backing up database and conrtolfile.

SCRIPT

run {
allocate channel dev1 type disk;
backup full tag = 'full backup' database include current controlfile format = 'F:\rman-bkp\db_t%t_s%s_p%p';
release channel dev1;
}

but unable to find for archivelog+database+controlfile


Re: How to create Rman backup script for database,controlfile and archivelog in one script [message #257068 is a reply to message #257061] Tue, 07 August 2007 09:10 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hi,

For just reference.

Control file backup
SQL>alter database backup controlfile to trace;

check $ORACLE_HOME/admin/<sid>/udump/<sid>_ora_xxxx.trc CREATE TEXT FILE.

SQL>alter database backup controlfile to 'c:\ctl.bak';

Above statement create binary control file.



or set
C:\> RMAN TARGET=SYS
PASSWORD: XXXXXXX

RMAN> configure controlfile autobackup on;


Whenever you take database backup above statement take CONTROL FILE and SPFILE backup automatically



Database files + archive log files
RUN
{
DELETE NOPROMPT OBSOLETE;
CROSSCHECK BACKUP;
CROSSCHECK ARCHIVELOG ALL;
DELETE NOPROMPT EXPIRED BACKUP;
DELETE NOPROMPT EXPIRED ARCHIVELOG ALL;
ALLOCATE CHANNEL C1 DEVICE TYPE DISK MAXPIECESIZE 100M;
ALLOCATE CHANNEL C2 DEVICE TYPE DISK MAXPIECESIZE 100M;
ALLOCATE CHANNEL C3 DEVICE TYPE DISK MAXPIECESIZE 100M;
BACKUP INCREMENTAL LEVEL 0 DATABASE TAG Weekly_Friday_0_Hotdb02_bkp;
SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
BACKUP DATABASE ARCHIVELOG ALL DELETE ALL INPUT TAG Weekly_Friday_0_Hotdb02_bkp;
BACKUP VALIDATE DATABASE;
BACKUP VALIDATE DATABASE ARCHIVELOG ALL;
}



Note: you have to also set RETENTION POLICY.

Above all just example and reference ...now you must visit below URL and read / understand then create you own script for RMAN backup.


http://download.oracle.com/docs/cd/B14117_01/server.101/b10734/toc.htm


Regards
Taj

Re: How to create Rman backup script for database,control file and archive log in one script [message #257077 is a reply to message #257068] Tue, 07 August 2007 09:20 Go to previous messageGo to next message
aslamkhalife
Messages: 42
Registered: July 2007
Location: India
Member
Hi Taj

Thanks very much for your guidance.

Really its helped me out.

Thanks very much

Re: How to create Rman backup script for database,control file and archive log in one script [message #257097 is a reply to message #257077] Tue, 07 August 2007 10:22 Go to previous message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
Oracle BACKUP Scripts
=====================

http://www.dbasupport.com/oracle/scripts/Backup_Recovery/RMAN_Backup/
Previous Topic: how to take Rman Backup
Next Topic: Recovery Catalog Database Creation
Goto Forum:
  


Current Time: Wed Dec 07 04:30:21 CST 2016

Total time taken to generate the page: 0.11727 seconds