Mongolerman recovered to a remote or remote location

Source: Internet
Author: User

Mongolerman recovered to a remote or remote location

The original database server uses rman to back up the entire database, and then restores the same database on the remote server. 1.1 The first step for the original server to back up the database is to view the database instance name and DBIDconnected to target database: step 2 (DBID = 2060124769, not open) of DB3, full backup as compressed backupset databaseinclude current controlfile format'/orabak/db _ % d _ % T _ % s' plus archivelog format'/orabak/arch _ % d _ % T _ % s '; step 3: Check the location of the database file:/home/oracle/oradata/db3/step 4. Copy the backup file arch_DB3_20140910_8 and db _ DB3_20140910_7 to copy the local host/home/oracle/orabak1. 2. Create a database on the target server. Step 1: Create a database with the same instance name (db3) and database files in the same location (/home/oracle/oradata/db3. Step 2: Shut down the instance and start it to nomount. SQL> startup nomount; Step 3: Set dbid to be the same as the original database dbid. rman target/Recovery Manager: Release 10.2.0.5.0-Production on Thu Sep 11 19:53:50 2014 Copyright (c) 1982,200 7, Oracle. all rights reserved. connected to target database: db3 (not mounted) RMAN> set dbid 2060124769 executing command: set dbid Step 4, restore control file RMAN> restore controlfile from '/home/oracle/db_DB3_20140910_7 '; starting restore at 11-SEP-14using target da Tabase control file instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: sid = 153 devtype = DISKchannel ORA_DISK_1: restoring control filechannel ORA_DISK_1: restore complete, elapsed time: 00: 00: 05 output filename =/home/oracle/oradata/db3/db3/control01.ctloutput filename =/home/oracle/oradata/db3/db3/control02.ctloutput filename =/home/oracle/oradata/db3 /db3/control03.ctlFinished Restore at 11-SEP-14 step 5, mount database RMAN> alter database mount; database mountedreleased channel: ORA_DISK_1 step 6, register the backup set copied from the source database to rman> catalog start with '/home/oracle/orabak '; searching for all files that match the pattern/home/oracle/orabakList of Files Unknown to the Database ================ ====================== File Name: /home/oracle/orabak/arch_DB3_20140910_8File Name:/home/oracle/orabak/db _ DB3_20140910_7Do you really want to catalog the above files (enter YES or NO )? Yescataloging files... step 7 of cataloging done: restore the archived log RMAN> restore archivelog all; starting restore at 11-SEP-14using channel ORA_DISK_1archive log thread 1 sequence 6 is already on disk as file/oracle/product/10.2.0.5/dbs/export ORA_DISK_1: starting archive log restore to default destinationchannel ORA_DISK_1: restoring archive logarchive log thread = 1 sequence = 3 channel ORA_DISK_1: reading from backup piece/home/oracle/orabak/arch_DB3_20140910_1channel ORA_DISK_1: restored backup piece 1 piece handle =/home/oracle/orabak/arch_DB3_20140910_1 tag = TAG20140910T172944 (Note: If archiving logs are not restored, RMAN> recover database; starting recover at 11-SEP-14using channel ORA_DISK_1starting media recoveryunable to find archive logarchive log thread = 1 sequence = 7) Step 8: Restore the database file (because the data file location of the target database is the same as that of the original database, so it's simpler) RMAN> restore database; Starting restore at 11-SEP-14using channel ORA_DISK_1channel ORA_DISK_1: starting datafile backupset restorechannel ORA_DISK_1: specifying datafile (s) to restore from backup setrestoring datafile 00001 to/home/oracle/oradata/db3/system01.dbfrestoring datafile 00002 to/home/oracle/oradata/db3/undotbs01.dbfrestoring datafile 00003 to/home/oracle /db3/sysaux01.dbfrestoring datafile 00004 to/home/oracle/oradata/db3/users01.dbfchannel ORA_DISK_1: reading from backup piece/home/oracle/orabak/logs ORA_DISK_1: restored backup piece 1 piece handle =/home/oracle/orabak/db_DB3_20140910_6 tag = TAG20140910T173540 Step 9, restore database RMAN> recover database; Starting recover at least target database control file instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: sid = 152 devtype = DISKstarting media recoverymedia recovery complete, elapsed time: 00: 00: 03 step 10 of Finished recover at 11-SEP-14, start the database alter database open resetlogs;

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.