首页 rman backup, backup after the destruction of data files, and then use the backup database to restore data files

rman backup, backup after the destruction of data files, and then use the backup database to restore data files

举报
开通vip

rman backup, backup after the destruction of data files, and then use the backup database to restore data filesrman backup, backup after the destruction of data files, and then use the backup database to restore data files RMAN backup, backup after the destruction of data files, and then use the backup database to restore data files. Use RMAN backup, backup after th...

rman backup, backup after the destruction of data files, and then use the backup database to restore data files
rman backup, backup after the destruction of data files, and then use the backup database to restore data files RMAN backup, backup after the destruction of data files, and then use the backup database to restore data files. Use RMAN backup, backup after the destruction of data files, and then use the backup database to restore data files. Test as follows: 1 into the RMAN, close the database, start loading state C:Documents and target Settingspengwzh>rman / 2 perform backup scripts {run Configure channel type disk maxpiecesize = 2G FORMAT='c:\ora_bak\%U'= device; SQL'alter archive log system current'; Allocate channel disk1 type disk; Backupset full compressed format='c:\ora_bak\%d_t%t_s%s_%U.bak'tag'fullbak' (database) backup as; Release channel disk1; Allocate channel Disk2 type disk; BACKUP as backupset FORMAT ARCHIVELOG ALL delete compressed'c:\ora_bak\al_%d_t%t_s%s_%U.arcbak'input; Release channel disk2; Allocate channel Disk3 type disk; Backup current controlfile format='c:\ora_bak\ctl_%d_t%t_s%s_%U.ctlbak'; Release channel disk3; SQL'alter archive log system current'; } 3.-- uses test users to enter sqlplus C:Documents and Settingspengwzh>sqlplus test/testSQL*Plus: Release 10.2.0.1.0 - on Friday April 3 14:29:52 2009, Production Copyright (c) 1982, 2005, Oracle. All rights reserved. Connect to: Oracle Database Enterprise Edition 10.2.0.1.0 Release - Production 10g With the Partitioning, OLAP Data Mining and options Create table and insert data SQL> create TMP (a varchar (2)) (table); Table created. SQL> insert TMP values ('1') into; 1 lines have been created. SQL> insert TMP values ('2') into; 1 lines have been created. SQL> commit; Submit complete. SQL> select * from tmp; A - One Two - connect the SYSDBA user, close the database, delete the data file 5 SQL> conn / as sysdba; Connected. SQL> shutdown immediate; Database closed. Database has been uninstalled. ORACLE routine has been closed. SQL> host del D:oracleproduct10.2.0oradataorcltest01.ora; - start the database, start failure, quit sqlplus operation as follows: SQL> startup; ORACLE routine has been started. Total System Area 289406976 bytes Global Fixed Size 1248576 bytes Variable Size 125829824 bytes Database Buffers 155189248 bytes Redo Buffers 7139328 bytes Database loaded. ORA-01157: cannot identify / lock the data file 5 - see the DBWR trace file ORA-01110: data file 5:'D:ORACLEPRODUCT10.2.0ORADATAORCLTEST01.ORA' SQL> exit; - enter the RMAN command prompt, use RMAN backup database to restore deleted data files 5 C:Documents and target Settingspengwzh>rman / Recovery Manager: Release 10.2.0.1.0 - on Friday 3 April 14:34:52 2009 Production Copyright (c) 1982, 2005, Oracle. All rights reserved. Is connected to the target database: ORCL (DBID=1210922825, not open) RMAN> shutdown immediate; Use the destination database control file instead of the recovery directory Database unloaded Oracle instance is closed RMAN> startup mount; Is connected to the target database (not started) Oracle instance has been started Database is loaded System global area totals 289406976 bytes Fixed Size 1248576 bytes Variable Size 125829824 bytes Database Buffers 155189248 bytes Redo Buffers 7139328 bytes RMAN> restore datafile 5; Start restore on 03-4 month -09 Channel assignment: ORA_DISK_1 Channel ORA_DISK_1: sid=156 devtype=DISK Channel ORA_DISK_1: is starting to recover the data file backup set Channel ORA_DISK_1: is specifying the data file to be restored from the backup set Restoring data file 00005 to D:ORACLEPRODUCT10.2.0ORADATAORCLTEST01.ORA Channel ORA_DISK_1: is reading backup segment D:BACKUP3KBI3RK_1_1 Channel ORA_DISK_1: has been restored to the backup section 1 Segment handle = D:BACKUP3KBI3RK_1_1 = TAG20090403T142556 Channel ORA_DISK_1: recovery completed, with: 00:00:08 Complete restore at 03-4 months -09 RMAN> recover datafile 5; Start recover on 03-4 month -09 Use channel ORA_DISK_1 Starting media recovery Media recovery completed, with: 00:00:03 Complete recover at 03-4 months -09 RMAN> - restore success, open database, exit RMAN RMAN> alter database open; Database open RMAN> exit; Recovery manager completed. - use test users to connect to sqlplus, just after the new table and data backup exists C:Documents and Settingspengwzh>sqlplus test/test SQL*Plus: Release 10.2.0.1.0 - on Friday April 3 15:01:47 2009, Production Copyright (c) 1982, 2005, Oracle. All rights reserved. Connect to: Oracle Database Enterprise Edition 10.2.0.1.0 Release - Production 10g With the Partitioning, OLAP Data Mining and options SQL> select * from tmp; A - One Two SQL> Tmp table exists, the data is not lost, although the data file has been deleted, but can be restored to the deleted data files when the database state. Attached: the test environment is as follows Database archiving mode SQL> conn / as sysdba; Connected. SQL> archive log list; Database log mode Automatic archiving disabled Archive endpoint USE_DB_RECOVERY_FILE_DEST The first online log sequence 1 Current log sequence 3 SQL> View database version SQL> select * from v$version; BANNER ---------------------------------------------------------------- Oracle Database Enterprise Edition 10.2.0.1.0 Release - Prod 10g PL/SQL Release 10.2.0.1.0 - Production CORE 10.2.0.1.0 Production TNS for Windows: Version 10.2.0.1.0 - Production 32-bit NLSRTL Version
本文档为【rman backup, backup after the destruction of data files, and then use the backup database to restore data files】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_731942
暂无简介~
格式:doc
大小:24KB
软件:Word
页数:0
分类:生活休闲
上传时间:2018-04-30
浏览量:9