Flowers To India

Flowers To India
Send cakes,flowers to India

Wednesday, April 23, 2008

Recovery in Archive log Mode

Recovery in Archive log Mode
1.Closed Database Recovery
2.Open Database Recovery with database initially open
3.Open Database Recovery with database initially closed
4.Datafile Recovery with no datafile backup



1.Closed Database Recovery
Situations where this mode is applicable
1.When the system datafile is missing
2.When the undo datafile is missing
3.Large number of datafiles are missing

SQL> shut abort
Now physically copy the required datafiles from hot backup
SQL> startup mount
Check which datafile needs recovery by v$recover_file
SQL> recover database
SQL>alter database open


2.Open Database Recovery with database initially open
Situations where this mode is applicable
1.other than system undo data files are missing

Database is open stage
Offline the particular table space
Physically copy the missed files from hot backup

Recover data file name or number
Make table space online

SQL> alter tablespace tablespacename offline immediate
Copy the particular datafile which is missing from hotbackup

SQL> recover datafile ‘datafile path or number’
SQL>alter tablespace online

3.Open Database Recovery with database initially closed
Situations where this mode is applicable
1.other than system undo data files are missing
2.when the database is in the closed in abnormal state due to hardware issue

SQL>startup mount
SQL>alter database datafile ‘ path’ offline
SQL>alter database open
Copy the particular datafile which is missing from hotbackup
SQL>recover datafile ‘path or number’
SQL>alter datafile ‘path’ online

4.Datafile Recovery with no datafile backup

Situations where this mode is applicable
Normal Datafile is missing if no back up is there
SQL> startup mount
SQL> alter database create datafile ‘path’
SQL> recover datafile ‘path’
SQL>alter database open;

Or
If database is in open stage
SQL>alter datafile ‘file’ offline
or
SQL>alter tablespace t.name offline
SQL>alter database create datafile ‘filepath’
SQL>recover datafile ‘file path’
SQL>alter datafile ‘file path’ online

No comments: