NBU Restoring Windows Oracle Database (BW)

Source: Internet
Author: User
Tags sqlplus

Restore 0.92 database to 1.92, restore time July 13

1. Query the required control log

7-2-7-4 -r-b-L  "CNT "

(2nd, 3 steps can be parallel)

2. Start restoring the control file

Access to Rman, database up to nomount use Backup files to control file restore

Rman target/'sbt_tape'Nb_ora_serv=nbumaster01 '  'nb_ora_client= bw-prd01'cntrl_1705_1_ 949284511'; release channel ch00;}

3. Restore the data file (open to Mount State)

ALTER DATABASEMount; run{Allocate channel ch00 type'Sbt_tape'; Allocate channel CH01 type'Sbt_tape'; send'Nb_ora_serv=nbumaster01'; send'nb_ora_client=bw-prd01'; set NewName forDataFile1To'E:\ERPORACLE\DATAFILE\SYSTEM. DATA1'; set NewName forDataFile2To'E:\ERPORACLE\DATAFILE\SYSAUX. DATA1'; set NewName forDataFile3To'E:\ERPORACLE\DATAFILE\UNDO. DATA1'; set NewName forDataFile4To'E:\ERPORACLE\DATAFILE\SR3. DATA1'; set NewName forDataFile5To'E:\ERPORACLE\DATAFILE\SR3. DATA2'; set NewName forDataFile6To'E:\ERPORACLE\DATAFILE\SR3740. DATA1'; set NewName forDataFile7To'E:\ERPORACLE\DATAFILE\SR3USR. DATA1'; set NewName forDataFile8To'E:\ERPORACLE\DATAFILE\SR740. DATA1'; set NewName forDataFile9To'E:\ERPORACLE\DATAFILE\SR3. DATA3'; set NewName forDataFileTenTo'E:\ERPORACLE\DATAFILE\SR3. DATA4'; set NewName forDataFile OneTo'E:\ERPORACLE\DATAFILE\SR3. DATA5'; set NewName forDataFile ATo'E:\ERPORACLE\DATAFILE\SR3. DATA6'; set NewName forDataFile -To'E:\ERPORACLE\DATAFILE\SR3. DATA7'; set NewName forDataFile -To'E:\ERPORACLE\DATAFILE\SR3740. DATA2'; set NewName forDataFile theTo'E:\ERPORACLE\DATAFILE\SR3740. DATA3'; set NewName forDataFile -To'E:\ERPORACLE\DATAFILE\SR3740. DATA4'; set NewName forDataFile -To'E:\ERPORACLE\DATAFILE\SR3740. DATA5'; set NewName forDataFile -To'E:\ERPORACLE\DATAFILE\SR3740. DATA6'; set NewName forDataFile +To'E:\ERPORACLE\DATAFILE\SR3. DATA8'; set NewName forDataFile -To'E:\ERPORACLE\DATAFILE\SR3. DATA9'; set NewName forDataFile +To'E:\ERPORACLE\DATAFILE\SR3. DATA10'; set NewName forDataFile ATo'E:\ERPORACLE\DATAFILE\SR3. DATA11'; set NewName forDataFile atTo'E:\ERPORACLE\DATAFILE\SR3. DATA12'; set NewName forDataFile -To'E:\ERPORACLE\DATAFILE\SR3. DATA13'; set NewName forDataFile -To'E:\ERPORACLE\DATAFILE\SR3. DATA14'; set NewName forDataFile -To'E:\ERPORACLE\DATAFILE\SR3. DATA15'; set NewName forDataFile -To'E:\ERPORACLE\DATAFILE\SR3. DATA16'; set NewName forDataFile -To'E:\ERPORACLE\DATAFILE\SR3. DATA17'; set NewName forDataFile inTo'E:\ERPORACLE\DATAFILE\SR3. DATA18'; set NewName forDataFile -To'E:\ERPORACLE\DATAFILE\SR3. DATA19'; set NewName forDataFile toTo'E:\ERPORACLE\DATAFILE\SR3. DATA20'; set NewName forDataFile +To'E:\ERPORACLE\DATAFILE\SR3. DATA21'; set NewName forDataFile -To'E:\ERPORACLE\DATAFILE\SR3. DATA22'; set NewName forDataFile theTo'E:\ERPORACLE\DATAFILE\SR3. DATA23'; set NewName forDataFile *To'E:\ERPORACLE\DATAFILE\SR3. DATA24'; set NewName forDataFile $To'E:\ERPORACLE\DATAFILE\SR3. DATA25'; set NewName forDataFilePanax NotoginsengTo'E:\ERPORACLE\DATAFILE\SR3. DATA26'; set NewName forDataFile -To'E:\ERPORACLE\DATAFILE\SR3. DATA27'; set NewName forDataFile theTo'E:\ERPORACLE\DATAFILE\SR3. DATA28'; set NewName forDataFile +To'E:\ERPORACLE\DATAFILE\SR3. DATA29'; set NewName forDataFile ATo'E:\ERPORACLE\DATAFILE\SR3. DATA30'; set NewName for Tempfile 1To'E:\ERPORACLE\DATAFILE\TEMP. DATA1'; set NewName for Tempfile 2To'E:\ERPORACLE\DATAFILE\TEMP. DATA2'; restore Databaseuntil  Time "to_date ('2017/07/13', ' yyyy/mm/dd ')"; SWITCH datafile All; SWITCH Tempfile all; Release channel ch00; Release channel ch01;}

Can run the 5th step directly to see which archived logs are missing

4. Query the sequence number to restore the archive log

Sqlplus/As sysdbaalter session set Nls_date_format='YYYYMMDD HH24:MI:SS'; set Linesize the; set pagesize;Selectthread#,sequence#,first_time,completion_time from V$archived_log where--sequence# in (63145); Completion_time>to_date ('20170713 09:00:00','YYYYMMDD hh24:mi:ss') and Completion_time<to_date ('20170713 11:00:00','YYYYMMDD hh24:mi:ss') Order by sequence#;
--Restore archive log Rman target/run{allocate Channel Ch0 type'Sbt_tape'; Allocate channel CH1 type'Sbt_tape'; send'nb_ora_client=bw-prd01'; send'Nb_ora_serv=nbumaster01'; restore Archivelog sequence between63430and65699; release channel Ch0;release channel CH1;}

5. Recovering a Database

' Sbt_tape '  'sbt_tape ' nb_ora_client=bw-prd01 '  'nb_ora_serv=nbumaster01'/as Sysdbaalter database Open resetlogs;

OR

Sqlplus/As sysdbaalter session set Nls_date_format='yyyy/mm/dd HH24:MI:SS'   untiltime'2017/07/13 10:00:00'  using Backup controlfile; ALTER DATABASE open resetlogs;

NBU Restoring Windows Oracle Database (BW)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.