Saturday, February 12, 2011

Configuring rman catalog

Create the tablespace and user rman first inside the rman catalog database.

1. create tablespace rman ...
2. create user rmantoronto ...
3. grant the role recovery_catalog_owner to this new user.

Connect to rman using this user now.
Create the catalog.

Register the catalog and configure parameters.
Connect to the target using the catalog.

connected to target database: TORONTO (DBID=3278972211)
connected to recovery catalog database

Register the database.

database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

Also, do the following
1. set the retention
2. set the disk type
3. set auto backup control file
4. set format

Now do a full backup.

Starting backup at 12-FEB-11
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=34 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=4 RECID=1 STAMP=742863663
input archived log thread=1 sequence=5 RECID=2 STAMP=742903701
input archived log thread=1 sequence=6 RECID=3 STAMP=742940369
channel ORA_DISK_1: starting piece 1 at 12-FEB-11
channel ORA_DISK_1: finished piece 1 at 12-FEB-11
piece handle=/data/stage/toronto/backup/01m4gnmj_1_1 tag=TAG20110212T201930 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 12-FEB-11

Starting backup at 12-FEB-11
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/data/toronto/toronto/system01.dbf
input datafile file number=00002 name=/data/toronto/toronto/sysaux01.dbf
input datafile file number=00003 name=/data/toronto/toronto/undotbs01.dbf
input datafile file number=00004 name=/data/toronto/toronto/users01.dbf
channel ORA_DISK_1: starting piece 1 at 12-FEB-11
channel ORA_DISK_1: finished piece 1 at 12-FEB-11
piece handle=/data/stage/toronto/backup/02m4gnmr_1_1 tag=TAG20110212T201939 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:46
Finished backup at 12-FEB-11

Starting backup at 12-FEB-11
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=7 RECID=4 STAMP=742940426
channel ORA_DISK_1: starting piece 1 at 12-FEB-11
channel ORA_DISK_1: finished piece 1 at 12-FEB-11
piece handle=/data/stage/toronto/backup/03m4gnoc_1_1 tag=TAG20110212T202027 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 12-FEB-11

Starting Control File and SPFILE Autobackup at 12-FEB-11
piece handle=/u01/app/oracle/flash_recovery_area/TORONTO/autobackup/2011_02_12/o1_mf_s_742940430_6ogdgypg_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 12-FEB-11

RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 7 days
using channel ORA_DISK_1
no obsolete backups found

See the backed up files:

-rw-r----- 1 oracle oinstall 125314048 Feb 12 20:19 01m4gnmj_1_1
-rw-r----- 1 oracle oinstall 1001431040 Feb 12 20:20 02m4gnmr_1_1
-rw-r----- 1 oracle oinstall 92672 Feb 12 20:20 03m4gnoc_1_1

We can see the details of the backup:

List of Backup Sets
===================

BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
51 119.51M DISK 00:00:05 12-FEB-11
BP Key: 54 Status: AVAILABLE Compressed: NO Tag: TAG20110212T201930
Piece Name: /data/stage/toronto/backup/01m4gnmj_1_1

List of Archived Logs in backup set 51
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 4 779391 11-FEB-11 800324 11-FEB-11
1 5 800324 11-FEB-11 823330 12-FEB-11
1 6 823330 12-FEB-11 841950 12-FEB-11

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
52 Full 955.03M DISK 00:00:43 12-FEB-11
BP Key: 55 Status: AVAILABLE Compressed: NO Tag: TAG20110212T201939
Piece Name: /data/stage/toronto/backup/02m4gnmr_1_1
List of Datafiles in backup set 52
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 841970 12-FEB-11 /data/toronto/toronto/system01.dbf
2 Full 841970 12-FEB-11 /data/toronto/toronto/sysaux01.dbf
3 Full 841970 12-FEB-11 /data/toronto/toronto/undotbs01.dbf
4 Full 841970 12-FEB-11 /data/toronto/toronto/users01.dbf

BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
71 90.00K DISK 00:00:00 12-FEB-11
BP Key: 76 Status: AVAILABLE Compressed: NO Tag: TAG20110212T202027
Piece Name: /data/stage/toronto/backup/03m4gnoc_1_1

List of Archived Logs in backup set 71
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 7 841950 12-FEB-11 842048 12-FEB-11

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
84 Full 9.36M DISK 00:00:00 12-FEB-11
BP Key: 86 Status: AVAILABLE Compressed: NO Tag: TAG20110212T202030
Piece Name: /u01/app/oracle/flash_recovery_area/TORONTO/autobackup/2011_02_12/o1_mf_s_742940430_6ogdgypg_.bkp
SPFILE Included: Modification time: 12-FEB-11
SPFILE db_unique_name: TORONTO
Control File Included: Ckp SCN: 842073 Ckp time: 12-FEB-11

No comments:

Post a Comment