Recovery Scenarios Part -1

I am covering some of the basic recovery recovery scenarios via RMAN in below , this will be a 2 part series  :

Part 1:Database open, datafile deleted
Recovery Scenarios:

Note: If the database is opened with resetlogs, it is necessary to register the new incarnation of the database in the Recovery Catalog with the RESET DATABASE command.

(A) Database open, datafile deleted:

(a) Datafile recovery:

Find the datafile # and tablespace name by querying v$datafile table.

RMAN>
run {
allocate channel dev1 type disk;
sql "alter tablespace users offline immediate";
restore datafile 4;
recover datafile 4;
sql "alter tablespace users online";
release channel dev1;
}

 (b) Tablespace recovery:

RMAN>
run {
allocate channel dev1 type disk;
sql "alter tablespace users offline immediate";
restore tablespace users;
recover tablespace users;
sql "alter tablespace users online";
release channel dev1;
}
(c) SYSTEM Tablespace recovery:

Note: If it is the system tablespace datafiles to be restored, the database must be closed. It is not possible to offline the system tablespace.
SVRMGRL> shutdown immediate;
SVRMGRL> STARTUP MOUNT;

RMAN>
run {
allocate channel c1 type disk;
restore tablespace SYSTEM;
recover database;
sql "alter database open resetlogs";
release channel c1;
}
RMAN> Reset database;
(This command NOT allowed if you are NOT using Recovery Catalog)

Will post some more .............stay tunned ........

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

This blog is authored by Pankaj Chandiramani , Product Manager for Enterprise Manager at Oracle . Main Focus of the blog will be on Enterprise Manager 12c with deep coverage of Database Center Automation including DbaaS , Database Provisioning , Database Patching , Config , Compliance etc .

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today