RMAN Configuration and Implementation
This document discusses about RMAN features and implementation steps. Here I used GOLD as catalog database and PROD as my target database.
GOLD is a normal core Oracle Database Version 11.1.0.7.0
PROD is an Oracle Application Database
Database Version: 11.1.0.7.0
Application Version: R12, 12.1.1
Creating recovery catalog: @GOLD
Create Tablespace:
create tablespace rman_ts datafile '/u01/kamal/oradata/GOLD/rman_ts.dbf' size 50m;
User Creation:
create user rman_ts identified by rman_ts default tablespace rman_ts quota unlimited on rman_ts;
Giving required grants to the user:
grant connect,resource to rman_ts;
grant recovery_catalog_owner to rman_ts;
Creating catalog:
Exit from SQL prompt and issue this command from OS
rman catalog rman_ts/rman_ts
Recovery Manager: Release 10.2.0.1.0 - Production on Wed Jun 6 23:10:56 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to recovery catalog database
RMAN> create catalog tablespace rman_ts;
recovery catalog created
RMAN> exit
Recovery Manager complete.
Registering target database:
Now, on the Target Database i.e; PROD run:
[oracle@jeddah ~]$ rman target system/manager
Recovery Manager: Release 11.1.0.7.0 - Production on Mon Jun 13 15:37:19 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: PROD (DBID=165212483)
RMAN> connect catalog rman_ts/rman_ts@GOLD
connected to recovery catalog database
RMAN> register database;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
RMAN> exit
Recovery Manager complete.
How to check database is registered or not?
Connect to the catalog database as catalog user and query rc_database. This will give you all the databases that are registered on the recovery catalog database.
SQL> sho user
USER is "RMAN_TS"
SQL> select * from global_name;
GLOBAL_NAME
--------------------------------------------------------------------------------
GOLD.JEDDAH.COM.SA
SQL> select * from rc_database;
DB_KEY DBINC_KEY DBID NAME RESETLOGS_CHANGE# RESETLOGS
---------- ---------- ---------- -------- ----------------- ---------
1 2 165212483 PROD 5.9651E+12 09-JUN-11
By this your RMAN Configuration is DONE, you can now start taking Backup etc;
SQL> sho user
USER is "SYS"
SQL> startup
ORACLE instance started.
Total System Global Area 1071333376 bytes
Fixed Size 1318172 bytes
Variable Size 427819748 bytes
Database Buffers 629145600 bytes
Redo Buffers 13049856 bytes
Database mounted.
Database opened.
SQL>
SQL>
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/oracle/db/tech_st/11.1.0/dbs/arch
Oldest online log sequence 3
Next log sequence to archive 4
Current log sequence 4
SQL>
SQL>
SQL> !ls -ltr /u01/oracle/db/tech_st/11.1.0/dbs/arch
total 926212
-rw-r----- 1 oracle dba 947508736 Jun 13 17:32 1_3_753374150.dbf
SQL> alter system switch logfile;
System altered.
SQL> !ls -ltr /u01/oracle/db/tech_st/11.1.0/dbs/arch
total 926660
-rw-r----- 1 oracle dba 947508736 Jun 13 17:32 1_3_753374150.dbf
-rw-r----- 1 oracle dba 452096 Jun 13 17:35 1_4_753374150.dbf
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@jeddah ~]$
[oracle@jeddah ~]$
[oracle@jeddah ~]$ rman target system/manager
Recovery Manager: Release 11.1.0.7.0 - Production on Mon Jun 13 17:37:17 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: PROD (DBID=165212483)
RMAN> connect catalog rman_ts/rman_ts@GOLD
connected to recovery catalog database
RMAN> RUN {
ALLOCATE CHANNEL c1 TYPE DISK;
backup
format '/u01/RMAN_BACKUP/df_%d_%s_%t.bkp'
database;
}
allocated channel: c1
channel c1: SID=362 device type=DISK
Starting backup at 13-JUN-11
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00401 name=/u01/oracle/db/apps_st/data/a_txn_data02.dbf
input datafile file number=00406 name=/u01/oracle/db/apps_st/data/a_txn_ind05.dbf
input datafile file number=00353 name=/u01/oracle/db/apps_st/data/system08.dbf
input datafile file number=00379 name=/u01/oracle/db/apps_st/data/undo01.dbf
input datafile file number=00403 name=/u01/oracle/db/apps_st/data/a_txn_ind02.dbf
input datafile file number=00394 name=/u01/oracle/db/apps_st/data/a_ref01.dbf
input datafile file number=00400 name=/u01/oracle/db/apps_st/data/a_media01.dbf
input datafile file number=00402 name=/u01/oracle/db/apps_st/data/a_txn_data03.dbf
input datafile file number=00392 name=/u01/oracle/db/apps_st/data/a_txn_data01.dbf
input datafile file number=00013 name=/u01/oracle/db/apps_st/data/system12.dbf
input datafile file number=00407 name=/u01/oracle/db/apps_st/data/a_ref02.dbf
input datafile file number=00396 name=/u01/oracle/db/apps_st/data/a_summ01.dbf
input datafile file number=00404 name=/u01/oracle/db/apps_st/data/a_txn_ind03.dbf
input datafile file number=00393 name=/u01/oracle/db/apps_st/data/a_txn_ind01.dbf
input datafile file number=00405 name=/u01/oracle/db/apps_st/data/a_txn_ind04.dbf
input datafile file number=00395 name=/u01/oracle/db/apps_st/data/a_int01.dbf
input datafile file number=00003 name=/u01/oracle/db/apps_st/data/system03.dbf
input datafile file number=00002 name=/u01/oracle/db/apps_st/data/system02.dbf
input datafile file number=00004 name=/u01/oracle/db/apps_st/data/system04.dbf
input datafile file number=00001 name=/u01/oracle/db/apps_st/data/system01.dbf
input datafile file number=00354 name=/u01/oracle/db/apps_st/data/system11.dbf
input datafile file number=00005 name=/u01/oracle/db/apps_st/data/system05.dbf
input datafile file number=00015 name=/u01/oracle/db/apps_st/data/a_txn_ind06.dbf
input datafile file number=00014 name=/u01/oracle/db/apps_st/data/a_txn_data04.dbf
input datafile file number=00398 name=/u01/oracle/db/apps_st/data/a_archive01.dbf
input datafile file number=00295 name=/u01/oracle/db/apps_st/data/system06.dbf
input datafile file number=00351 name=/u01/oracle/db/apps_st/data/system07.dbf
input datafile file number=00288 name=/u01/oracle/db/apps_st/data/system10.dbf
input datafile file number=00352 name=/u01/oracle/db/apps_st/data/system09.dbf
input datafile file number=00008 name=/u01/oracle/db/apps_st/data/a_queue02.dbf
input datafile file number=00012 name=/u01/oracle/db/apps_st/data/apps_ts_tools01.dbf
input datafile file number=00399 name=/u01/oracle/db/apps_st/data/a_queue01.dbf
input datafile file number=00011 name=/u01/oracle/db/apps_st/data/sysaux01.dbf
input datafile file number=00016 name=/u01/oracle/db/apps_st/data/a_ref03.dbf
input datafile file number=00018 name=/u01/oracle/db/apps_st/data/sysaux02.dbf
input datafile file number=00314 name=/u01/oracle/db/apps_st/data/portal01.dbf
input datafile file number=00397 name=/u01/oracle/db/apps_st/data/a_nolog01.dbf
input datafile file number=00020 name=/u01/oracle/db/apps_st/data/undo2.dbf
input datafile file number=00006 name=/u01/oracle/db/apps_st/data/ctxd01.dbf
input datafile file number=00010 name=/u01/oracle/db/apps_st/data/olap.dbf
input datafile file number=00017 name=/u01/oracle/db/apps_st/data/a_int02.dbf
input datafile file number=00009 name=/u01/oracle/db/apps_st/data/odm.dbf
input datafile file number=00007 name=/u01/oracle/db/apps_st/data/owad01.dbf
input datafile file number=00019 name=/u01/oracle/db/apps_st/data/olap01.dbf
channel c1: starting piece 1 at 13-JUN-11
channel c1: finished piece 1 at 13-JUN-11
piece handle=/u01/RMAN_BACKUP/df_PROD_3_753730668.bkp tag=TAG20110613T173747 comment=NONE
channel c1: backup set complete, elapsed time: 00:37:23
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
including current control file in backup set
channel c1: starting piece 1 at 13-JUN-11
channel c1: finished piece 1 at 13-JUN-11
piece handle=/u01/RMAN_BACKUP/df_PROD_4_753732911.bkp tag=TAG20110613T173747 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:03
Finished backup at 13-JUN-11
released channel: c1
RMAN>
RMAN> exit
Recovery Manager complete.