Oralce DB Restoration command

** Myself

Noarchive log mode


Recovery with
Current Control Files

Complete Recovery
(applied online redo)
    NoResetLogs
   (online redo logs available)
  


Sql> shutdown abort
Restore
n  All datafiles
n  Controlfiles
n  Redolog files
n  Password files and Parameter files
Sql> startup


Recovery with
Backup control Files

Complete Recovery
(applied online redo)
    NoResetLogs
   (online redo logs available)
   

Incomplete Recovery
(applied online redo)
    ResetLogs
   (online redo logs available
    or NOT available)


#Can’t used Backup control files but use to generate new control files
Sql> shutdown immediate
Restore
n  All datafiles
n  Old Controlfiles
n  Redolog files (for Noresetlog)
n  Password files and Parameter files

Sql> startup mount
Sql> database backup controlfile to trace;
Sql> shutdown
Sql> @<admin>/udumn/<*.trl>
Sql> alter database open [resetlogs]



Recovery with
New control Files

Complete Recovery
(applied online redo)
    NoResetlogs
   (online redo logs available)
   

Incomplete Recovery
(applied online redo)
    ResetLogs
   (online redo logs available
    or NOT available)


Sql> shutdown immediate
Restore
n  All datafiles
n  Old Controlfiles
n  Redolog files (for Noresetlog)
n  Password files and Parameter files

Sql> startup mount
Sql> database backup controlfile to trace;
Sql> shutdown
Sql> @<admin>/udumn/<*.trl>
Sql> alter database open [resetlogs]



Archive log mode

Recovery with
Current Control Files

Complete Recovery
(applied online redo and archive)
    NoResetLogs
   (online redo logs available)

Sql> shutdown abort
Restore
n  All datafiles
n  Controlfiles
n  Redolog files
n  Archivelog files
n  Password files and Parameter files
Sql> startup mount
Sql> set autorecovery on
Sql> recover database
Sql> alter database open
Recovery with
Backup control Files

Complete Recovery
(applied online redo and archive)
    Resetlogs
   (online redo logs available
    or NOT available)












Incomplete Recovery
Use backup control Files or Media recovery

    ResetLogs
   (online redo logs available
    or NOT available)






#if add schema is not  necessary edit controlfile
But if add datafiles is necessary create New control files








Sql> shutdown abort
Restore
n  All datafiles
n  Old Controlfiles
n  Redolog files (for Noresetlog)
n  Archivelog files
n  Password files and Parameter files

Sql> startup mount
Sql> set autorecovery on
Sql> select * from v$log
Sql> select * from v$logfile
Sql> recover database using backup controlfile
Sql> <current online redolog path>
Log applied.
Media recovery complete.
Sql> alter database open resetlogs



Sql> shutdown abort
Restore
n  All datafiles
n  Old Controlfiles
n  Redolog files (for Noresetlog)
n  Archivelog files
n  Password files and Parameter files
For Cancel base     
Sql> startup mount
Sql> set autorecovery on
Sql> recover database until cancel using backup controlfile
<apply archive log>
Sql> cancel
Sql> alter database open resetlogs


For Time base     
Sql> recover database using backup controlfile until time '2010-07-27:04:00:31'
<apply archive log>
Sql> alter database open resetlogs

Recovery with
New control Files or Media recovery


Incomplete Recovery
    ResetLogs
   (online redo logs available
    or NOT available)


Sql> shutdown immediate
Restore
n  All datafiles
n  Old Controlfiles
n  Redolog files (for Noresetlog)
n  Archivelog files
n  Password files and Parameter files

Sql> startup mount
Sql> database backup controlfile to trace;
Sql> shutdown
If new datafiles
Then Edit .trl for add datafiles record
<admin>/udumn/<*.trl>
end
Sql> @<admin>/udumn/<*.trl>
Sql> set autorecovery on
Sql> recover database until cancel
Sql> alter database open resetlogs




0 comments:

Loading