RMAN backup and recovery instance Test

Source: Internet
Author: User
 

Backup:

Db_fullbak_jssbook.bat

 
Set oracle_sid = jssbookrman target/log = c: \ oracle \ Script \ backup \ logs \ Bak _ % Date :~ 0, 10%. logtailfile = c: \ oracle \ Script \ backup \ db_fullbak_jssbook.rman

Db_fullbak_jssbook.rman

 
Run {configure retention policy to recovery window of 14 days; configure controlfile autobackup on; configure controlfile autobackup format for device type disk to 'C: \ oracle \ backup \ % F '; allocate channel C1 device type disk format 'C: \ oracle \ backup \ Bak _ % U'; backup database skip inaccessibleplus archivelog filesperset 20 delete all input; release channel C1 ;} allocate channel for maintenance device type disk; crosscheck backupset; Delete noprompt obsolete;

Construct Data:

...

Simulated loss:

...

Reboot error:

 
The SQL> startuporacle routine has been started. Total system global area 612368384 bytesfixed size 1250428 bytesvariable size 192940932 bytesdatabase buffers 411041792 bytesredo buffers 7135232 bytes database loaded. ORA-01157: unable to identify/lock data file 4-see dbwr trace file ORA-01110: data file 4: 'C: \ oracle \ oradata \ jssook \ jssbook \ users01.dbf'

Fix:

C: \ oracle \ script> set oracle_sid = jssbookc: \ oracle \ script> RMAN target/recovery MANAGER: Release 10.2.0.1.0-production on Wednesday, February 1 22:37:06 2012 copyright (c) 1982,200 5, oracle. all rights reserved. connect to the target database: jssbook (dbid = 1507698744, not open) RMAN> restore datafile 42>; start the restore in-12 months to use the target database control file to replace the channel for restoring directory allocation: ora_disk_1 channel ora_disk_1: SID = 156 devtype = disk channel ora_disk_1: recovering the data file backup set channel ora_disk_1: the specified data file restoring the backup set is restoring the data file 00004 to C: \ oracle \ oradata \ jssook \ jssbook \ users01.dbf channel ora_disk_1: Reading backup section C: \ oracle \ backup \ bak_0fn28oq1_1_1 channel ora_disk_1: recovered backup Section 1 handle = C: \ oracle \ backup \ bak_0fn28oq1_1_1 flag = tag20120201t215721 channel ora_disk_1: Recovery complete, time: 00:00:36 restore completed on-12

Recovery:

RMAN> restore datafile 42>; Start restore from month 1 to month-12 and use the target database control file to replace the channel for restoring directory allocation: ora_disk_1 channel ora_disk_1: SID = 156 devtype = disk channel ora_disk_1: recovering data file backup set channel ora_disk_1: specifies that the data file recovered from the backup set is restoring data file 00004 to c: \ oracle \ oradata \ jssook \ jssbook \ users01.dbf channel ora_disk_1: reading backup section C: \ oracle \ backup \ Recovery Channel ora_disk_1: recovered backup Section 1 handle = c: \ oracle \ backup \ bak_0fn28oq1_1_1 mark = tag20120t2t215721 channel ora_disk_1: Recovery complete, time used: 00:00:36 indicates that the restore is completed in month-12 RMAN> recover datafile 42>. When the channel ora_disk_1 is started in month-12, month-12, the recovery media of the media is resumed. Time: at 00:00:02, the recover is completed from month 1 to Month 12.

Verification:

RMAN> alter database open2>; the database has opened RMAN> host; Microsoft Windows XP [version 5.1.2600] (c) Copyright: 1985-2001 Microsoft Corp. c: \ oracle \ script> sqlplus Scott/tigersql * Plus: Release 10.2.0.1.0-production on Wednesday February 1 22:39:49 2012 copyright (c) 1982,200 5, Oracle. all rights reserved. connect to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-productionwith the partitioning, OLAP and Data Mining optionssql> select * From temp1; Name ------------------ test1test2test3sql>

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.