0% found this document useful (0 votes)
59 views2 pages

Oracle Hot Backup

1) Check that the database is in archive log mode and take a hot backup by issuing ALTER DATABASE BEGIN BACKUP and ALTER DATABASE END BACKUP commands. 2) Back up the control file using ALTER DATABASE BACKUP CONTROLFILE. 3) Delete the datafiles, control file, and archive logs, then restore them from the backup location. 4) Start up in mount mode and perform media recovery using the backup control file to recover the database.

Uploaded by

Tariq Malhi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views2 pages

Oracle Hot Backup

1) Check that the database is in archive log mode and take a hot backup by issuing ALTER DATABASE BEGIN BACKUP and ALTER DATABASE END BACKUP commands. 2) Back up the control file using ALTER DATABASE BACKUP CONTROLFILE. 3) Delete the datafiles, control file, and archive logs, then restore them from the backup location. 4) Start up in mount mode and perform media recovery using the backup control file to recover the database.

Uploaded by

Tariq Malhi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Oracle DB Recovery From Hot Backup

Step By Step 18-Feb-2014

• Check DB is in Archive log mode.


• ARCHIVE LOG LIST or
• Select log_mode from v$database; (If DB is not in archivelog mode then
do following)
• SHUTDOWN IMMEDIATE
• STARTUP MOUNT
• ALTER DATABASE ARCHIVELOG;
• ALTER DATABASE OPEN;

SQL> select * from v$backup;

FILE# STATUS CHANGE# TIME


---------- ------------------ ---------- ---------
1 NOT ACTIVE 0
2 NOT ACTIVE 0
.
.

• ALTER DATABASE BEGIN BACKUP;


SQL> select * from v$backup;

FILE# STATUS CHANGE# TIME


---------- ------------------ ---------- ---------
1 ACTIVE 0
2 ACTIVE 0
.
Create directory at OS level & Copy all datafiles into that directory
• ALTER DATABASE END BACKUP;
SQL> select * from v$backup;
FILE# STATUS CHANGE# TIME
---------- ------------------ ---------- ---------
1 NOT ACTIVE 0
2 NOT ACTIVE 0

• ALTER DATABASE BACKUP CONTROLFILE TO '/Path/Control_bak';

Optional
Do some Crete/Insert/Delete and commit + log switch alter each DDL.
Optional End
Take OS level backup of archive logs.Now Delete all datafiles, controlfil & archive
log file.

SQLPLUS / AS SYSDBA
STARTUP
ORA-00205 Error will occur
SHUTDOWN ABORT

Copy all datafiles and archivelog files back to its original position.
Copy control_bak to its original position as control01.ctl,control02.ctl and
control03.ctl (three identical copies, b/c oracle aspect 3 copies with these names)

SQLPLUS / AS SYSDBA

STARTUP
ORA-01589----------------
SHUTDOWN ABORT
SQLPLUS / AS SYSDBA
STARTUP MOUNT
RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE;

(if we want to apply some logs and want to see result, just enter and after
applying a logfile, cancel media recovery)

• ALTER DATABASE OPEN READ ONLY; (Use select cmd to check recovery at this
point)
• RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE;
Give AUTO and press enter.
ALTER DATABASE OPEN;

You might also like