Use network management DD to restore the full library operation steps

Source: Internet
Author: User
Tags sqlplus

Use network management DD to restore the full library operation steps
Basic information:
System platform: RHEL 5.4_86_64
Database version: 11.2.0.2.0-64bit
1. Check whether the target host installs the Networker client.
Ps-ef | grep NSR
No software required to install software Networker client.

2, check each host/etc/hosts file to resolve the corresponding host.
Networker Backup Server Host name
Source Server DB host Name
Destination server DB host name
Three hosts must parse each other.
Notes
Modify the current recovery host to allow remote calls in the Legato Networker configuration.
Legato Networker Console: Remote access Add *@* for configuration-->clients-->clients properties (Globals (2 of 2))

3. Backup the current control file of the source host and copy it to the target host.
$rman Target/
Rman> copy current controlfile to '/home/oracle/bakcontrolfile.ctl '

$SCP/home/oracle/bakcontrolfile.ctl [email protected] target host Ip:/oracle/home

4. Restore the control files in the target host.
$rman Target/
rman> shutdown immediate;
Rman> Starup Nomount;
rman> restore Controlfile from '/home/oracle/bakcontrolfile.ctl ';
rman> SQL ' ALTER DATABASE mount ';

NOTES: If you are recovering a control file from a library
run{
Allocate channel T1 type ' Sbt_tape ';
Send ' nsr_env= (NSR_SERVER=BACK-SERVER.PRODUCT.COM,NSR_CLIENT=DBSERVER-21,NSR_DATA_VOLUME_POOL=ORACLEVTL) ';
Restore Controlfile from "cntl_17583_1_816914901"; --Recover control files with corresponding dates in the library
SQL ' ALTER DATABASE mount ';
}
5. Write a script to restore the data files.
Write a restore script based on the backup script from the source host.
Contains two, source host backup script locations:
/nsr/scritpts/orafull Full backup script
/nsr/scritpts/oraarch Archive Backup Scripts

As long as the relevant channel information in the backup script:
The instance script is as follows:
run{
Allocate channel T1 type ' Sbt_tape ';
Send ' nsr_env= (NSR_SERVER=BACK-SERVER.PRODUCT.COM,NSR_CLIENT=DBSERVER-21,NSR_DATA_VOLUME_POOL=ORACLEVTL) ';
Allocate channel T2 type ' Sbt_tape ';
Send ' nsr_env= (NSR_SERVER=BACK-SERVER.PRODUCT.COM,NSR_CLIENT=DBSERVER-21,NSR_DATA_VOLUME_POOL=ORACLEVTL) ';
Allocate channel t3 type ' Sbt_tape ';
Send ' nsr_env= (NSR_SERVER=BACK-SERVER.PRODUCT.COM,NSR_CLIENT=DBSERVER-21,NSR_DATA_VOLUME_POOL=ORACLEVTL) ';
Allocate channel T4 type ' sbt_tape ';
Send ' nsr_env= (NSR_SERVER=BACK-SERVER.PRODUCT.COM,NSR_CLIENT=DBSERVER-21,NSR_DATA_VOLUME_POOL=ORACLEVTL) ';
Restore .....
}
6. Execute the script that restores the data file in the target host. --time is longer, depending on the size of the backup file.
The script is as follows:
$cat full.sh
run{
Allocate channel T1 type ' Sbt_tape ';
Send ' nsr_env= (NSR_SERVER=BACK-SERVER.PRODUCT.COM,NSR_CLIENT=DBSERVER-21,NSR_DATA_VOLUME_POOL=ORACLEVTL) ';
Restore database until Time "to_date (' 2012-11-19 00:00:00 ', ' yyyy-mm-dd hh24:mi:ss ')";
}
$rman target/cmdfile=full.sh log=/home/oracle/full-' date +%f '. Log--Recover data file
7. Write a script to restore the archive.
You need to query the archive log sequence for the service.
$sqlplus/as SYSDBA
Sql> Set Linesize 400
Sql> Set pagesize 999
sql> Col archive_name format A90
Sql> select * from V$recovery_log; --Find the required archive log sequence number.
The script is as follows:
$cat arch.sh
run{
Allocate channel T1 type ' Sbt_tape ';
Send ' nsr_env= (NSR_SERVER=BACK-SERVER.PRODUCT.COM,NSR_CLIENT=DBSERVER-21,NSR_DATA_VOLUME_POOL=ORACLEVTL) ';
Restore Archivelog from Logseq 27421 until Logseq 27425;
}
$rman target/cmdfile=arch.sh logfile=/home/oracle/arch-' date +%f '. Log--Recover archived files
8, restore the database.
$sqlplus/as SYSDBA
Sql> Set Linesize 200
sql> Col name format A70
Sql> select File#,status,enabled,name,creation_time from V$datafile; --Query the file status.
sql> Recover database using Backup controlfile until time ' 2013-05-00:00:00 '; --Restore the database based on point in time
sql> ALTER DATABASE open resetlogs;

Notes
If the data file is not recovered when the prompt is restored, the data file is not in the backup and is later added.
The following actions are required
ALTER DATABASE datafile ' +DATA/ORCL/DATAFILE/GDB_DATA21.DBF ' offline drop;
are deleted before you execute the RESTORE command.

Use network management DD to restore the full library operation steps

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.