Skip to main content

Restore Oracle Database from tape

Let, you are restoring the archive backup from tape to the same host or other host.




1) To restore archive files

--Connect to RMAN from the host to which you want to restore the archive files

set DBID 4256854606 (if you want to restore it to some other hosts - you have to specify the DBID (which you can get from v$database) of the backed up database)
      CONNECT TARGET /
      run
      {
      allocate channel t1 type 'sbt_tape' parms 'ENV=(+tape library softlink+)';
      allocate channel t2 type 'sbt_tape' parms 'ENV=(+tape library softlink+)';
restore archivelog from sequence until sequence ; -- add thread (if rac)
release channel t1;
      release channel t2;
      }
      exit

2) To restore backup

set DBID 4256854606 (if you want to restore it to some other hosts - you have to specify the DBID (which you can get from v$database) of the backed up database)
      CONNECT TARGET /
      run
      {
      allocate channel t1 type 'sbt_tape' parms 'ENV=(+tape library softlink+)';
      allocate channel t2 type 'sbt_tape' parms 'ENV=(+tape library softlink+)';
set until time "to_date('backup completion timestamp')"; - alternatively you can specify SCN also
set newname for DATAFILE 1 to '+new datafile name/raw device+'; - if the host where you are restoring has a different file system structure
      set newname for DATAFILE 2 to '+new datafile name/raw device+';
      set newname for DATAFILE 3 to '+new datafile name/raw device+';
..............
..............(add the set newname lines to the total no:of datafiles in the database)
RESTORE DATABASE;
      SWITCH DATAFILE ALL;
      release channel t1;
      release channel t2;
      }
      EXIT
      EOF

[Collected ]

--- Cheers !!!

Comments

Popular posts from this blog

ORA-01033 Oracle initialization or shutdown in progress

ORA-01033 Oracle initialization or shutdown in progress When you connect oracle 12c plug gable database, Thus time you have get oracle initialization or shutdown in progress error. This error occurred because pluggable database are not initialized. To fix this error connect as sysdba and run  ALTER PLUGGABLE DATABASE ALL OPEN    command. ALTER PLUGGABLE DATABASE ALL OPEN Thanks.

AFTER LOGON Trigger not perfectly working

AFTER LOGON not perfectly working.  I have tried it on single instance oracle 12c database it's perfectly work but it's not perfectly working on multi instance Oracle 12c database. I have submitted this matter in oracle forum but not found any perfect answer. Do you know why  it's not working ???

Error Initializing Opera: module 15

Solutions: You should manually remove directories name as "Opera" from  %PROGRAMFILES% ,%APPDATA% and %USERPROFILE% . RUN(Windows Logo Key + R)-> Enter '%PROGRAMFILES%' -> Then press OK Button. Open a new window, There find Opera folder and delete it. Same as %APPDATA%  and %USERPROFILE%. What programming languages should I learn to make a website How do i transfer music from my mac to my iPhone using the iTunes HOW TO FIX ICE CREAM SANDWICH UPDATE ERRORS !!! Fix an app that isn't working properly in Nexus how to reset Google nexus 7 Screen flicker problem in iPhone 5 DATE AND TIME PROBLEM IN IPHONE5 Another way: IF it's install in C drive you can delete opera folder from below location : c: \ Program Files \ Opera \ c: \ Documents and Settings \ Username \ Application Data \ Opera \ c: \ Documents and Settings \ Username \ Local Settings \ Application Data \ Opera \ Any you getting any problem give a comments. You can also see...