Difference between revisions of "RecoverOracle"

From Tranzman Documentation
Jump to: navigation, search
Line 3: Line 3:
 
Set the DBID for the database to be restored.
 
Set the DBID for the database to be restored.
  
:'''''SET DBID 1490584423;'''''
+
{| class="wikitable" style="padding-left: 20px; color:#FFFFFF; background-color: black; width: 900px; FONT-FAMILY:monospace,monospace; LINE-HEIGHT:15px; white-space: pre-wrap; "
 +
|
 +
SET DBID 1490584423;
 +
|}
  
 
==='''Step 2'''===
 
==='''Step 2'''===
  
:'''''STARTUP NOMOUNT;'''''
+
{| class="wikitable" style="padding-left: 20px; color:#FFFFFF; background-color: black; width: 900px; FONT-FAMILY:monospace,monospace; LINE-HEIGHT:15px; white-space: pre-wrap; "
 +
|
 +
STARTUP NOMOUNT;
 +
|}
  
 
==='''Step 3'''===
 
==='''Step 3'''===
Line 13: Line 19:
 
Restore the control file.
 
Restore the control file.
  
:'''''RESTORE THE CONTROL FILE FROM "C:\Backup\Oracle\C\ProgramData\OmniBack\tmp\ctrl_ORCL_2924.dbf";'''''
+
{| class="wikitable" style="padding-left: 20px; color:#FFFFFF; background-color: black; width: 900px; FONT-FAMILY:monospace,monospace; LINE-HEIGHT:15px; white-space: pre-wrap; "
 +
|
 +
RESTORE THE CONTROL FILE FROM "C:\Backup\Oracle\C\ProgramData\OmniBack\tmp\ctrl_ORCL_2924.dbf";
 +
|}
  
 
==='''Step 4'''===
 
==='''Step 4'''===
Line 19: Line 28:
 
Mount the database.
 
Mount the database.
  
:'''''ALTER DATABASE MOUNT;'''''
+
{| class="wikitable" style="padding-left: 20px; color:#FFFFFF; background-color: black; width: 900px; FONT-FAMILY:monospace,monospace; LINE-HEIGHT:15px; white-space: pre-wrap; "
 +
|
 +
ALTER DATABASE MOUNT;
 +
|}
  
 
==='''Step 5'''===
 
==='''Step 5'''===
Line 25: Line 37:
 
Configure sbt device.
 
Configure sbt device.
  
:'''''CONFIGURE DEVICE TYPE sbt_tape PARALLELISM 1;'''''
+
{| class="wikitable" style="padding-left: 20px; color:#FFFFFF; background-color: black; width: 900px; FONT-FAMILY:monospace,monospace; LINE-HEIGHT:15px; white-space: pre-wrap; "
:'''''CONFIGURE CHANNEL DEVICE TYPE sbt_tape  PARMS='SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=C:\Backup\new)';'''''
+
|
 +
CONFIGURE DEVICE TYPE sbt_tape PARALLELISM 1;
 +
CONFIGURE CHANNEL DEVICE TYPE sbt_tape  PARMS='SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=C:\Backup\new)';
 +
|}
  
 
==='''Step 6'''===
 
==='''Step 6'''===
Line 32: Line 47:
 
Catalog the dbf files.
 
Catalog the dbf files.
  
:'''''catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_10%3A962806106%3A1%3E.dbf';'''''
+
{| class="wikitable" style="padding-left: 20px; color:#FFFFFF; background-color: black; width: 900px; FONT-FAMILY:monospace,monospace; LINE-HEIGHT:15px; white-space: pre-wrap; "
 
+
|
:'''''catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_11%3A977481621%3A1%3E.dbf';'''''
+
catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_10%3A962806106%3A1%3E.dbf';
 
+
catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_11%3A977481621%3A1%3E.dbf';
:'''''catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_12%3A977481656%3A1%3E.dbf';'''''
+
catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_12%3A977481656%3A1%3E.dbf';
 
+
catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_16%3A977491557%3A1%3E.dbf';
:'''''catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_16%3A977491557%3A1%3E.dbf';'''''
+
catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_17%3A977491557%3A1%3E.dbf';
 
+
catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_18%3A977491557%3A1%3E.dbf';
:'''''catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_17%3A977491557%3A1%3E.dbf';'''''
+
catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_19%3A977491557%3A1%3E.dbf';
 
+
catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_2%3A962805087%3A1%3E.dbf';
:'''''catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_18%3A977491557%3A1%3E.dbf';'''''
+
catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_20%3A977491575%3A1%3E.dbf';
 
+
catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_21%3A977491602%3A1%3E.dbf';
:'''''catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_19%3A977491557%3A1%3E.dbf';'''''
+
catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_22%3A977491602%3A1%3E.dbf';
 
+
catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_23%3A977492038%3A1%3E.dbf';
:'''''catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_2%3A962805087%3A1%3E.dbf';'''''
+
catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_24%3A977492038%3A1%3E.dbf';
 
+
catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_25%3A977492038%3A1%3E.dbf';
:'''''catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_20%3A977491575%3A1%3E.dbf';'''''
+
catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_26%3A977492046%3A1%3E.dbf';
 
+
catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_27%3A977492058%3A1%3E.dbf';
:'''''catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_21%3A977491602%3A1%3E.dbf';'''''
+
catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_9%3A962806071%3A1%3E.dbf';
 
+
|}
:'''''catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_22%3A977491602%3A1%3E.dbf';'''''
 
 
 
:'''''catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_23%3A977492038%3A1%3E.dbf';'''''
 
 
 
:'''''catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_24%3A977492038%3A1%3E.dbf';'''''
 
 
 
:'''''catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_25%3A977492038%3A1%3E.dbf';'''''
 
 
 
:'''''catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_26%3A977492046%3A1%3E.dbf';'''''
 
 
 
:'''''catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_27%3A977492058%3A1%3E.dbf';'''''
 
 
 
:'''''catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_9%3A962806071%3A1%3E.dbf';'''''
 
  
 
==='''Step 5'''===
 
==='''Step 5'''===
Line 70: Line 72:
 
Do a crosscheck  backup files on disk with entries in the catalog or controlfile.
 
Do a crosscheck  backup files on disk with entries in the catalog or controlfile.
  
:'''''CROSSCHECK BACKUP;'''''
+
{| class="wikitable" style="padding-left: 20px; color:#FFFFFF; background-color: black; width: 900px; FONT-FAMILY:monospace,monospace; LINE-HEIGHT:15px; white-space: pre-wrap; "
 +
|
 +
CROSSCHECK BACKUP;
 +
|}
  
 
==='''Step 6'''===
 
==='''Step 6'''===
Line 76: Line 81:
 
Restore the database.
 
Restore the database.
  
:'''''RESTORE DATABASE;'''''
+
{| class="wikitable" style="padding-left: 20px; color:#FFFFFF; background-color: black; width: 900px; FONT-FAMILY:monospace,monospace; LINE-HEIGHT:15px; white-space: pre-wrap; "
 +
|
 +
RESTORE DATABASE;
 +
|}
  
 
==='''Step 7'''===
 
==='''Step 7'''===
Line 82: Line 90:
 
Now recover the database.
 
Now recover the database.
  
:'''''RECOVER DATABASE;'''''
+
{| class="wikitable" style="padding-left: 20px; color:#FFFFFF; background-color: black; width: 900px; FONT-FAMILY:monospace,monospace; LINE-HEIGHT:15px; white-space: pre-wrap; "
 +
|
 +
RECOVER DATABASE;
 +
|}

Revision as of 14:44, 30 August 2018

Step 1

Set the DBID for the database to be restored.

SET DBID 1490584423;

Step 2

STARTUP NOMOUNT;

Step 3

Restore the control file.

RESTORE THE CONTROL FILE FROM "C:\Backup\Oracle\C\ProgramData\OmniBack\tmp\ctrl_ORCL_2924.dbf";

Step 4

Mount the database.

ALTER DATABASE MOUNT;

Step 5

Configure sbt device.

CONFIGURE DEVICE TYPE sbt_tape PARALLELISM 1; CONFIGURE CHANNEL DEVICE TYPE sbt_tape PARMS='SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=C:\Backup\new)';

Step 6

Catalog the dbf files.

catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_10%3A962806106%3A1%3E.dbf'; catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_11%3A977481621%3A1%3E.dbf'; catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_12%3A977481656%3A1%3E.dbf'; catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_16%3A977491557%3A1%3E.dbf'; catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_17%3A977491557%3A1%3E.dbf'; catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_18%3A977491557%3A1%3E.dbf'; catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_19%3A977491557%3A1%3E.dbf'; catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_2%3A962805087%3A1%3E.dbf'; catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_20%3A977491575%3A1%3E.dbf'; catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_21%3A977491602%3A1%3E.dbf'; catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_22%3A977491602%3A1%3E.dbf'; catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_23%3A977492038%3A1%3E.dbf'; catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_24%3A977492038%3A1%3E.dbf'; catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_25%3A977492038%3A1%3E.dbf'; catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_26%3A977492046%3A1%3E.dbf'; catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_27%3A977492058%3A1%3E.dbf'; catalog device type 'SBT_TAPE' backuppiece 'B_ORA_All_Full_BS068%3CORCL_9%3A962806071%3A1%3E.dbf';

Step 5

Do a crosscheck backup files on disk with entries in the catalog or controlfile.

CROSSCHECK BACKUP;

Step 6

Restore the database.

RESTORE DATABASE;

Step 7

Now recover the database.

RECOVER DATABASE;