Sie sind auf Seite 1von 38

Translated version of aspicon_tech_wp_oracle_rman_11g_backuptest_2012-03-28 (1).

pdf
Page 1

Test with Oracle RMAN backup for Oracle Database 11g Copyright: ASPICON GmbH Author: Thilo Solbrig (Oracle Certified Master) Version: 1.0 Table of Contents 1 2 validating a backup .............................................. ..................................... 3 2.1 Option 1: Logical Validation ............................................ .................................. 3 2.2 Option 2: Physical Validation ............................................ ................................. 6 2.3 Option 3: Duplicating a Database from a Backup ........................................ 8 ...... 2.3.1 Installing the Oracle Software ........................................... ........................................... 8 2.3.2 Deploying the productive backups ............................................ ...................................... 9 2.3.3 Duplicating the production database ............................................ ..................................... 9 3 Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by ASPICON all rights reserved Page 1/20
Page 2

1 Foreword Created for functional testing of Oracle Recovery Manager (RMAN) backups, there are basically two Opportunities validating a backup, the backup is complete and an existing Application checks and duplicating a database from a backup that a copy of a database from a

Backup (ideally on a test machine) produced. All examples assume that an application to the database using operating system authentication is possible. For this purpose, the following requirements must be met: It must be given to the operating system user access to the database server, under is installed to the database. Typically, this user is "oracle". This User needs of the "dba" group members. At least the environment variables ORACLE_HOME 1 and ORACLE_SID set and $ ORACLE_HOME / bin to be included in the PATH The instance name of the database (ORACLE_SID =) can be, if not known, determined from the PMON process. He stands at the end of the process name, starting behind "ora_pmon_": [Oracle @ c-db-17 (db11gR2 ORCL1)] $ ps-ef | grep pmon oracle 3606 1 0 11:14? 00:00:00 ora_pmon_orcl1 Before function test but should in any case an evaluation of the past to the database backups are performed. Because if no valid backup already created, there is no need of Restore test anyway. The following SQL statement evaluates the backups from the last seven days (if the derivative in Control file is sufficiently large). The query returns no rows or can be found in the "STATUS" column seldom or not the value of "COMPLETED", then in any case of a serious problem and the backup Lack of proper backups to go. 1 For OFA-compliant installations / u01/app/oracle/product/11.1.0/db_1 for version 11.1 and / U01/app/oracle/product/11.2.0/dbhome_1 for version 11.2 Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by ASPICON all rights reserved Page 2/20
Page 3

[Oracle @ c-db-17 (db11gR2 ORCL1)] $ sqlplus / as sysdba SQL * Plus: Release 11.2.0.2.0 Production on Fri May 13 13:05:42 2011 Copyright (c) 1982, 2010, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production With the Partitioning, Real Application Clusters and Automatic Storage Management options SQL> col format a10 time_taken_display SQL> set linesize 400 SQL> set pagesize 1000 SQL> select end_time, input_type, output_device_type, status, time_taken_display, round ((input_bytes/1024/1024), 1) as INPUT_MB, round ((output_bytes/1024/1024), 1) as OUTPUT_MB, ELAPSED_SECONDS, round ((OUTPUT_BYTES_PER_SEC/1024/1024), 1) as MB_per_s from v $ rman_backup_job_details where end_time> sysdate-7 order by 1; END_TIME INPUT_TYPE OUTPUT_DEVICE_TYP STATUS TIME_TAKEN INPUT_MB OUTPUT_MB ELAPSED_SECONDS MB_PER_S -------------------------------------------------- ---------------------------------------------------------------------- ----12-MAY-11 DB FULL DISK FAILED 00:02:09 2114.1 1422.1 129 11 12-MAY-11 DB FULL DISK COMPLETED 00:03:58 4111.1 1566.8 238

6.6 2 Validate a backup Advantage of validating is that it causes very little effort compared to duplicate and no Test machine must be installed. The disadvantage, however, is that no genuine Restore / Recovery takes place and so that the final safety regarding the usability of backups is not given. Backups can be both logical ( restore ... preview ) And physically ( restore ... validate ) Are validated. 2.1 Option 1: Logical Validation For a logical validating RMAN lists only the backup files in question from him available metadata (control file, RMAN Catalog) on. He does not check whether these files actually available or are intact. The following example successfully restore a backup created on 12.05.2011 at 11:30 clock validated. Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by ASPICON all rights reserved Page 3/20
Page 4

[Oracle @ c-db-17 (db11gR2 ORCL1)] $ rman target / Recovery Manager: Release 11.2.0.2.0 - Production on Thu May 12 11:59:04 2011 Copyright (c) 1982, 2009, Oracle and / or its affiliates. All rights reserved. connected to target database: ORCL (DBID = 1276410725) RMAN> restore database until time "to_date ('12 .05.2011 12:00 ',' DD.MM.YYYY HH24: MI ') "preview; Starting restore at 12-MAY-11 using target database control file instead of recovery catalog Allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID = 18 instance = ORCL1 device type = DISK List of Backup Sets =================== BS Key Type LV Size

Device Type Elapsed Time Completion Time -------------------------------------------------- ----------3 Full 1.51G DISK 00:03:33 12-MAY-11 BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20110512T112940 Piece Name: + ARCH/orcl/backupset/2011_05_12/nnndf0_tag20110512t112940_0.256.750943783 List of Datafiles in backup set 3 File LV Type Ckp SCN Ckp Time Name --------------------------------1 Full 4781192 12-MAY-11 + DATA/orcl/datafile/system.256.748629837 2 Full 4781192 12-MAY-11 + DATA/orcl/datafile/sysaux.257.748629839 3 Full 4781192 12-MAY-11 + DATA/orcl/datafile/undotbs3.258.748969607 4 Full 4781192 12-MAY-11 + DATA/orcl/datafile/users.259.748629841 5 Full 4781192 12-MAY-11 + DATA/orcl/datafile/example.264.748630015 6 Full 4781192 12-MAY-11 + DATA/orcl/datafile/undotbs2.265.748630347 7 Full 4781192 12-MAY-11 + DATA/orcl/datafile/owb.269.748634463

8 Full 4781192 12-MAY-11 + DATA/orcl/datafile/mgmt_ecm_depot_ts.271.749051105 Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by ASPICON all rights reserved Page 4/20
Page 5

9 Full 4781192 12-MAY-11 + DATA/orcl/datafile/mgmt_tablespace.272.749051107 10 Full 4781192 12-MAY-11 + DATA/orcl/datafile/mgmt_ad4j_ts.270.749051111 using channel ORA_DISK_1 List of Backup Sets =================== BS Key Size Device Type Elapsed Time Completion Time -------------------------------------------------- ----5 386.00K DISK 00:00:00 12-MAY-11 BP Key: 5 Status: AVAILABLE Compressed: NO Tag: TAG20110512T113328 Piece Name: + ARCH/orcl/backupset/2011_05_12/annnf0_tag20110512t113328_0.260.750944009 List of Archived Logs in backup set 5 Thrd Seq Low SCN Low Time Next SCN Next Time ------------------------------------------------1 170

4781181 12-MAY-11 4781685 12-MAY-11 Media recovery start SCN is 4781192 Recovery must be done beyond SCN 4781192 to clear datafile fuzziness Finished restore at 12-MAY-11 RMAN> Accordingly, the logic for validating a test restore to the time before the first backup would fail: [Oracle @ c-db-17 (db11gR2 ORCL1)] $ rman target / Recovery Manager: Release 11.2.0.2.0 - Production on Thu May 12 12:04:48 2011 Copyright (c) 1982, 2009, Oracle and / or its affiliates. All rights reserved. connected to target database: ORCL (DBID = 1276410725) RMAN> restore database until time "to_date ('12 .05.2011 11:00 ',' DD.MM.YYYY HH24: MI ') "preview; Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by ASPICON all rights reserved Page 5/20
Page 6

Starting restore at 12-MAY-11 using target database control file instead of recovery catalog Allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID = 35 instance = ORCL1 device type = DISK datafile 3 will be created during Automatically restore operational datafile 6 will be created during Automatically restore operational datafile 7 will be created during Automatically restore operational 8 datafile will be created during Automatically restore operational datafile 9 will be created during Automatically restore operational data file 10 will be created during Automatically restore operational RMAN-00571: ============================================== ============= RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: ============================================== ============= RMAN-03002: failure of restore command at 05/12/2011 12:05:33 RMAN-06026: some targets not found - aborting restore

RMAN-06023: no backup or copy of datafile 5 found to restore RMAN-06023: no backup or copy of datafile 4 found to restore RMAN-06023: no backup or copy of datafile 2 found to restore RMAN-06023: no backup or copy of datafile 1 found to restore RMAN> 2.2 Option 2: Physical Validation In contrast to the physical validation logic validation checks whether a Restore / Recovery necessary backups are actually available and undamaged. An actual write-back is But not here also. [Oracle @ c-db-17 (db11gR2 ORCL1)] $ rman target / Recovery Manager: Release 11.2.0.2.0 - Production on Thu May 12 12:13:12 2011 Copyright (c) 1982, 2009, Oracle and / or its affiliates. All rights reserved. connected to target database: ORCL (DBID = 1276410725) RMAN> restore database until time "to_date ('12 .05.2011 12:00 ',' DD.MM.YYYY HH24: MI ') "validate; Starting restore at 12-MAY-11 using target database control file instead of recovery catalog Allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID = 35 instance = ORCL1 device type = DISK Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by ASPICON all rights reserved Page 6/20
Page 7

channel ORA_DISK_1: starting validation of datafile backup set channel ORA_DISK_1: reading from backup piece + ARCH/orcl/backupset/2011_05_12/nnndf0_tag20110512t112940_0.256.750943783 channel ORA_DISK_1: piece handle = + ARCH/orcl/backupset/2011_05_12/nnndf0_tag20110512t112940_0.256.75094 Tag = 3783 TAG20110512T112940 channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: validation complete, elapsed time: 00:00:15 Finished restore at 12-MAY-11 RMAN> A defective or missing backup would restore noticed in this version: [Oracle @ c-db-17 (db11gR2 ORCL1)] $ rman target /

Recovery Manager: Release 11.2.0.2.0 - Production on Thu May 12 12:20:22 2011 Copyright (c) 1982, 2009, Oracle and / or its affiliates. All rights reserved. connected to target database: ORCL (DBID = 1276410725) RMAN> restore database until time "to_date ('12 .05.2011 12:00 ',' DD.MM.YYYY HH24: MI ') "validate; Starting restore at 12-MAY-11 using target database control file instead of recovery catalog Allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID = 424 instance = ORCL1 device type = DISK channel ORA_DISK_1: starting validation of datafile backup set channel ORA_DISK_1: reading from backup piece + ARCH/orcl/backupset/2011_05_12/nnndf0_tag20110512t112940_0.256.750943783 channel ORA_DISK_1: ORA-19870: error while restoring backup piece + ARCH/orcl/backupset/2011_05_12/nnndf0_tag20110512t112940_0.256.750943783 ORA-19505: failed to identify file "+ ARCH/orcl/backupset/2011_05_12/nnndf0_tag20110512t112940_0.256.750943783" ORA-17503: ksfdopn: 2 Failed to open file + ARCH/orcl/backupset/2011_05_12/nnndf0_tag20110512t112940_0.256.750943783 failover to previous backup datafile 3 will be created during Automatically restore operational Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by ASPICON all rights reserved Page 7/20
Page 8

datafile 6 will be created during Automatically restore operational datafile 7 will be created during Automatically restore operational 8 datafile will be created during Automatically restore operational datafile 9 will be created during Automatically restore operational data file 10 will be created during Automatically restore operational RMAN-00571: ============================================== ============= RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: ============================================== ============= RMAN-03002: failure of restore command at 05/12/2011 12:20:40 RMAN-06026: some targets not found - aborting restore

RMAN-06023: no backup or copy of datafile 5 found to restore RMAN-06023: no backup or copy of datafile 4 found to restore RMAN-06023: no backup or copy of datafile 2 found to restore RMAN-06023: no backup or copy of datafile 1 found to restore RMAN> In both cases, the production database is open and fully usable during the test. 2.3 Variant 3: Duplicating a Database from a Backup Unlike the pure validating the installation of a test server is recommended for a duplicate. In Principle can be applied also copy it to the production server, however, the adaptation effort here considerably higher and, especially for beginners, the risk of serious damage to the Production database rather high. It is recommended that the productive largely identical to install the test system. That is, up to necessary differences in network and system configuration should be the same database version (including possibly rehearsed patches) and the same directory structure as are used in the production system. 2.3.1 Installing the Oracle Software On the test server the same version of the database is to be installed, which is also on the production server in use. Attuned to install additional patches are also necessary on the production side. During the installation, especially the production of the pre-installation requirements, a look in the "Quick Database Installation Guide ". It is recommended that the operating environment accordingly by setting the variables ORACLE_BASE, ORACLE_HOME and ORACLE_SID and recording of the $ ORACLE_HOME / bin in the PATH prepare. ORACLE_BASE should be set for an OFA-compliant installation / u01/app/oracle. For the other Variable values is referred to the introduction to this paper. To change the settings to persist make, should the respective variable, depending on shell, inoracle / .bash_profile or oracle / .profile be registered.

At this point we can already make the TNS entry for the production database, as they while later Duplicate must be referenced as the "target". We assign here the net service name "prod". Use either the netca or wear with a text editor the following in the tnsnames.ora file (located in $ {ORACLE_HOME} / network / admin /) a: Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by ASPICON all rights reserved Page 8/20
Page 9

PROD = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = db-17-c) (PORT = 1521) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = clone) ) ) 2.3.2 Providing the productive backups As for duplicating a database, not the database itself, but on database backups use is made, the backup of the production database must be on the test server (best read only) available are made. In one example, provided by the c-db-17 NFS share was added to the Backup Files mounted on / backup / oracle. 2.3.3 Duplicate the production database In contrast to previous versions starting with Oracle 11g has the spfile no longer separately restored and adapted are. This step can now directly under the "duplicate" by specifying "spfile" done with are. Differences in the directory structure or data storage to the production server or other required changes in the spfile of the target database may on appropriate information (spfile set ...)

be considered. However, before cloning nor the audit_dump_dest directory to create, as well as the still to 11.2 not part of the ADR: [Oracle @ c-db-18 (clone db11gR2)] $ mkdir -p/u01/app/oracle/admin/clone/adump All other Dumpverzeichnisse be automatically during the first startup of the database. Since an incomplete recovery is performed in the course of duplicating the "until" clause must be a appropriate video value to be specified. To make a current copy as possible, the recovery should until the last Archivelogsequence included in the backup. This is determined by the RMAN Production database as follows: Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by ASPICON all rights reserved Page 9/20
Page 10

[Oracle @ c-db-17 (clone db11gR2)] $ rman target / Recovery Manager: Release 11.2.0.2.0 - Production on Fri May 13 10:19:37 2011 Copyright (c) 1982, 2009, Oracle and / or its affiliates. All rights reserved. connected to target database: CLONE (DBID = 949 820 949) RMAN> list backup of archivelog all by file; using target database control file instead of recovery catalog List of Archived Log Backups ============================ Thrd Seq Low SCN Low Time BS Key S # Pieces # Copies Compressed Day -------------------------------------------------- -------------1 5 785 786 13-MAY-11 11 A1 1 YES

TAG20110513T094204 1 6 809 162 13-MAY-11 11 A1 1 YES TAG20110513T094204 1 7 813715 13-MAY-11 13 A1 1 YES TAG20110513T094344 1 8 813 762 13-MAY-11 15 A1 1 YES TAG20110513T101154 1 9 815132 13-MAY-11 17 A1 1 YES TAG20110513T101343 After all the preparatory work has been completed, can the duplicate of the production database be started. This must be the Recovery Manager (RMAN) to both the production (target) and Target database (auxiliary) connect. Connect to a production database (at least up to version 11.1 - 11.2 version comes up with a so called "backup-based duplicate ', in which a database entirely of

the backup is duplicated and no connection to the source database is no longer required.) always required even if the target database is built up in this case only from backups. The production database is However, neither closed during cloning or otherwise adversely affected. [Oracle @ c-db-18 (clone db11gR2)] $ rman target sys / oracle @ prod auxiliary / Recovery Manager: Release 11.2.0.2.0 - Production on Fri May 13 11:18:09 2011 Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by ASPICON all rights reserved Page 10/20
Page 11

Copyright (c) 1982, 2009, Oracle and / or its affiliates. All rights reserved. connected to target database: CLONE (DBID = 949 820 949) connected to auxiliary database (not started) RMAN> duplicate target database to 'clone' spfile set db_create_file_dest '/ u02/oracle/oradata' set control_files '/ U02/oracle/oradata/CLONE/controlfile/control01.cf' set db_file_name_convert '+ PROD / clone', '/ u02/oracle/oradata/CLONE', '+ PROD', '/ u02/oracle/oradata' set log_file_name_convert '+ PROD / clone', '/ u02/oracle/oradata/CLONE', '+ PROD', '/ u02/oracle/oradata', '+ AR CH / clone ',' / u02/oracle/oradata/CLONE ',' + ARCH ',' / u02/oracle/oradata ' set db_recovery_file_dest '/ backup / oracle.local' until sequence 10 2 ; Starting Duplicate Db at 13-MAY-11 using target database control file instead of recovery catalog Allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: SID = 95 device type = DISK contents of Memory Script: { set until scn 815178; restore clone spfile to '/ U01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileclone.ora';

sql clone "alter system set spfile = '' /'' U01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileclone.ora "; } executing Memory Script executing command: SET until clause Starting restore at 13-MAY-11 using channel ORA_AUX_DISK_1 WARNING: A restore time was estimated based on the Supplied UNTIL SCN channel ORA_AUX_DISK_1: starting datafile backup set restore channel ORA_AUX_DISK_1: restoring SPFILE output filename = / u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileclone.ora 2 Until the clause is generally understood as "up to, but not including ...". So shall the recovery 9 include archivelog Sequence with, must logically be 10 given here. Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by ASPICON all rights reserved Page 11/20
Page 12

channel ORA_AUX_DISK_1: reading from backup piece / Backup/oracle/CLONE/autobackup/2011_05_13/o1_mf_s_751025625_6wth4t20_.bk p channel ORA_AUX_DISK_1: piece handle = / backup/oracle/CLONE/autobackup/2011_05_13/o1_mf_s_751025625_6wth4t20 _.bkp tag = TAG20110513T101345 channel ORA_AUX_DISK_1: restored backup piece 1 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01 Finished restore at 13-MAY-11 sql statement: alter system set spfile = '' /'' U01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileclone.ora contents of Memory Script: { sql clone "alter system set db_name = CLONE comment ='''' '' Duplicate'' scope = spfile "; sql clone "alter system set db_create_file_dest = '' /'' Comment = u02/oracle/oradata '''' Scope = spfile ";

sql clone "alter system set control_files = '' /'' Comment = u02/oracle/oradata/CLONE/controlfile/control01.cf '''' Scope = spfile "; sql clone "alter system set db_file_name_convert = '' + PROD / clone'','' / u02/oracle/oradata/CLONE'','' +'' PROD, '' /'' Comment = u02/oracle/oradata '''' Scope = spfile "; sql clone "alter system set log_file_name_convert = '' + PROD / clone'','' / u02/oracle/oradata/CLONE'','' +'' PROD, '' / U02/oracle/oradata'','' + ARCH / clone'','' /'' u02/oracle/oradata/CLONE, ARCH'' +'','' /'' comment = u02/oracle/oradata '''' Scope = spfile "; sql clone "alter system set db_recovery_file_dest = '' / Backup / oracle.local'' comment = '''' Scope = spfile "; shutdown clone immediate; startup clone nomount; } executing Memory Script sql statement: alter system set db_name ='' CLONE'' comment ='' duplicate'' scope = spfile sql statement: alter system set db_create_file_dest = '' / U02/oracle/oradata'' comment ='''' scope = spfile Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by ASPICON all rights reserved Page 12/20
Page 13

sql statement: alter system set control_files = '' /'' Comment ='''' u02/oracle/oradata/CLONE/controlfile/control01.cf scope = spfile sql statement: alter system set db_file_name_convert ='' + PROD / clone'' '' / U02/oracle/oradata/CLONE'' PROD'' +'','' /'' comment = u02/oracle/oradata '''' Scope = spfile sql statement: alter system set log_file_name_convert ='' + PROD / clone'' '' / U02/oracle/oradata/CLONE'' PROD'' +'','' /'' u02/oracle/oradata, '' + ARCH / clone'','' / u02/oracle/oradata/CLONE'','' +'' ARCH, '' / U02/oracle/oradata'' comment ='''' scope = spfile sql statement: alter system set db_recovery_file_dest = '' / Backup / oracle.local'' comment ='''' scope = spfile Oracle instance shut down

connected to auxiliary database (not started) Oracle instance started Total System Global Area 644468736 bytes Fixed Size 1346104 bytes Variable size 188745160 bytes Database Buffers 448790528 bytes Redo Buffers 5586944 bytes contents of Memory Script: { set until scn 815178; sql clone "alter system set db_name = CLONE comment ='''' '' Modified by RMAN duplicate'' scope = spfile "; sql clone "alter system set DB_UNIQUE_NAME = CLONE comment ='''' '' Modified by RMAN duplicate'' scope = spfile "; shutdown clone immediate; startup clone force nomount restore clone primary controlfile; old clone database mount; } executing Memory Script executing command: SET until clause Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by ASPICON all rights reserved Page 13/20
Page 14

sql statement: alter system set db_name ='' CLONE'' comment ='' Modified by RMAN duplicate'' scope = spfile sql statement: alter system set DB_UNIQUE_NAME ='' comment ='' CLONE '' Modified by RMAN duplicate'' scope = spfile Oracle instance shut down Oracle instance started Total System Global Area 644468736 bytes

Fixed Size 1346104 bytes Variable size 188745160 bytes Database Buffers 448790528 bytes Redo Buffers 5586944 bytes Starting restore at 13-MAY-11 Allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: SID = 133 device type = DISK channel ORA_AUX_DISK_1: starting datafile backup set restore channel ORA_AUX_DISK_1: restoring control file channel ORA_AUX_DISK_1: reading from backup piece / Backup/oracle/CLONE/autobackup/2011_05_13/o1_mf_s_751023827_6wtfdn2h_.bk p channel ORA_AUX_DISK_1: piece handle = / backup/oracle/CLONE/autobackup/2011_05_13/o1_mf_s_751023827_6wtfdn2h _.bkp tag = TAG20110513T094347 channel ORA_AUX_DISK_1: restored backup piece 1 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03 output filename = / u02/oracle/oradata/CLONE/controlfile/control01.cf Finished restore at 13-MAY-11 database mounted contents of Memory Script: { set until scn 815178; set newname for datafile 1 to "/ U02/oracle/oradata/CLONE/datafile/system.262.751009207"; set newname for datafile 2 to "/ U02/oracle/oradata/CLONE/datafile/sysaux.263.751009283"; set newname for datafile 3 to "/ U02/oracle/oradata/CLONE/datafile/undotbs1.261.751009351"; set newname for datafile 4 to "/ U02/oracle/oradata/CLONE/datafile/users.260.751009351"; Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by ASPICON all rights reserved Page 14/20

Page 15

restore clone database ; } executing Memory Script executing command: SET until clause executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME Starting restore at 13-MAY-11 using channel ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: starting datafile backup set restore channel ORA_AUX_DISK_1: Specifying datafile (s) to restore from backup set channel ORA_AUX_DISK_1: restoring datafile 00001 to / U02/oracle/oradata/CLONE/datafile/system.262.751009207 channel ORA_AUX_DISK_1: restoring datafile 00002 to / U02/oracle/oradata/CLONE/datafile/sysaux.263.751009283 channel ORA_AUX_DISK_1: restoring datafile 00003 to / U02/oracle/oradata/CLONE/datafile/undotbs1.261.751009351 channel ORA_AUX_DISK_1: restoring datafile 00004 to / U02/oracle/oradata/CLONE/datafile/users.260.751009351 channel ORA_AUX_DISK_1: reading from backup piece / Backup/oracle/CLONE/backupset/2011_05_13/o1_mf_nnndf_TAG20110513T10115 6_6wt h1fh6_.bkp channel ORA_AUX_DISK_1: piece handle = / backup/oracle/CLONE/backupset/2011_05_13/o1_mf_nnndf_TAG20110513T101 156_6wth1fh6_.bkp tag = TAG20110513T101156 channel ORA_AUX_DISK_1: restored backup piece 1 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:45 Finished restore at 13-MAY-11 contents of Memory Script: { switch clone datafile all; } executing Memory Script datafile 1 switched to datafile copy

Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by ASPICON all rights reserved Page 15/20


Page 16

input datafile copy RECID = 17 STAMP = 751029643 file name = / u02/oracle/oradata/CLONE/datafile/system.262.751009207 datafile 2 switched to datafile copy input datafile copy RECID = 18 STAMP = 751029643 file name = / u02/oracle/oradata/CLONE/datafile/sysaux.263.751009283 datafile 3 switched to datafile copy input datafile copy RECID = 19 STAMP = 751029643 file name = / u02/oracle/oradata/CLONE/datafile/undotbs1.261.751009351 datafile 4 switched to datafile copy input datafile copy RECID = 20 STAMP = 751029643 file name = / u02/oracle/oradata/CLONE/datafile/users.260.751009351 contents of Memory Script: { set until scn 815178; recover clone database delete archivelog ; } executing Memory Script executing command: SET until clause Starting recover at 13-MAY-11 using channel ORA_AUX_DISK_1 starting media recovery channel ORA_AUX_DISK_1: starting archived log restore to default destination channel ORA_AUX_DISK_1: restoring archived log archived log thread = 1 sequence = 8 channel ORA_AUX_DISK_1: reading from backup piece / Backup/oracle/CLONE/backupset/2011_05_13/o1_mf_annnn_TAG20110513T10115 4_6wt h1c4g_.bkp channel ORA_AUX_DISK_1: piece handle = / backup/oracle/CLONE/backupset/2011_05_13/o1_mf_annnn_TAG20110513T101 154_6wth1c4g_.bkp tag = TAG20110513T101154

channel ORA_AUX_DISK_1: restored backup piece 1 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01 archived log file name = / backup/oracle.local/CLONE/archivelog/2011_05_13/o1_mf_1_8_6wtm2fov_.ar c thread = 1 sequence = 8 channel clone_default: deleting archived log (s) archived log file name = / backup/oracle.local/CLONE/archivelog/2011_05_13/o1_mf_1_8_6wtm2fov_.ar c RECID = 11 STAMP = 751 029 645 Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by ASPICON all rights reserved Page 16/20
Page 17

channel ORA_AUX_DISK_1: starting archived log restore to default destination channel ORA_AUX_DISK_1: restoring archived log archived log thread = 1 sequence = 9 channel ORA_AUX_DISK_1: reading from backup piece / Backup/oracle/CLONE/backupset/2011_05_13/o1_mf_annnn_TAG20110513T10134 3_6wt h4qsk_.bkp channel ORA_AUX_DISK_1: piece handle = / backup/oracle/CLONE/backupset/2011_05_13/o1_mf_annnn_TAG20110513T101 343_6wth4qsk_.bkp tag = TAG20110513T101343 channel ORA_AUX_DISK_1: restored backup piece 1 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01 archived log file name = / backup/oracle.local/CLONE/archivelog/2011_05_13/o1_mf_1_9_6wtm2gwv_.ar c thread = 1 sequence = 9 channel clone_default: deleting archived log (s) archived log file name = / backup/oracle.local/CLONE/archivelog/2011_05_13/o1_mf_1_9_6wtm2gwv_.ar c RECID = 12 STAMP = 751 029 646 media recovery complete, elapsed time: 00:00:00 Finished recover at 13-MAY-11

Oracle instance started Total System Global Area 644468736 bytes Fixed Size 1346104 bytes Variable size 188745160 bytes Database Buffers 448790528 bytes Redo Buffers 5586944 bytes contents of Memory Script: { sql clone "alter system set db_name = CLONE comment ='''' '' Reset to original value by RMAN'' scope = spfile "; sql clone "alter system reset DB_UNIQUE_NAME scope = spfile"; shutdown clone immediate; startup clone nomount; } executing Memory Script sql statement: alter system set db_name ='' CLONE'' comment ='' Reset to original value by RMAN'' scope = spfile sql statement: alter system reset DB_UNIQUE_NAME scope = spfile Oracle instance shut down Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by ASPICON all rights reserved Page 17/20
Page 18

connected to auxiliary database (not started) Oracle instance started Total System Global Area 644468736 bytes Fixed Size 1346104 bytes Variable size 188745160 bytes Database Buffers 448790528 bytes Redo Buffers

5586944 bytes sql statement: CREATE CONTROLFILE REUSE SET DATABASE "CLONE" RESETLOGS ARCHIVELOG MaxLogFiles 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MaxInstances 8 MAXLOGHISTORY 292 LOGFILE GROUP 1 ('/ u02/oracle/oradata/CLONE/onlinelog/group_1.258.751009571' '/ U02/oracle/oradata/CLONE/onlinelog/group_1.272.751009575') SIZE 50 M REUSE, GROUP 2 ('/ u02/oracle/oradata/CLONE/onlinelog/group_2.265.751009631' '/ U02/oracle/oradata/CLONE/onlinelog/group_2.270.751009635') SIZE 50 M REUSE, GROUP 3 ('/ u02/oracle/oradata/CLONE/onlinelog/group_3.264.751009607' '/ U02/oracle/oradata/CLONE/onlinelog/group_3.271.751009607') SIZE 50 M REUSE DATAFILE '/ U02/oracle/oradata/CLONE/datafile/system.262.751009207' CHARACTER SET WE8MSWIN1252 contents of Memory Script: { set newname for tempfile 1 to "/ U02/oracle/oradata/CLONE/tempfile/temp.266.751009657"; switch clone tempfile all; catalog clone datafile copy "/ U02/oracle/oradata/CLONE/datafile/sysaux.263.751009283" "/ U02/oracle/oradata/CLONE/datafile/undotbs1.261.751009351" "/ U02/oracle/oradata/CLONE/datafile/users.260.751009351"; switch clone datafile all; } executing Memory Script executing command: SET NEWNAME

Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by ASPICON all rights reserved Page 18/20


Page 19

renamed tempfile 1 to / u02/oracle/oradata/CLONE/tempfile/temp.266.751009657 in controlfile cataloged datafile copy datafile copy file name = / u02/oracle/oradata/CLONE/datafile/sysaux.263.751009283 RECID = 1 STAMP = 751029665 cataloged datafile copy datafile copy file name = / u02/oracle/oradata/CLONE/datafile/undotbs1.261.751009351 RECID = 2 STAMP = 751029665 cataloged datafile copy datafile copy file name = / u02/oracle/oradata/CLONE/datafile/users.260.751009351 RECID = 3 STAMP = 751029665 datafile 2 switched to datafile copy input datafile copy RECID = 1 STAMP = 751029665 file name = / u02/oracle/oradata/CLONE/datafile/sysaux.263.751009283 datafile 3 switched to datafile copy input datafile copy RECID = 2 STAMP = 751029665 file name = / u02/oracle/oradata/CLONE/datafile/undotbs1.261.751009351 datafile 4 switched to datafile copy input datafile copy RECID = 3 STAMP = 751029665 file name = / u02/oracle/oradata/CLONE/datafile/users.260.751009351 contents of Memory Script: { Age clone database open resetlogs; } executing Memory Script database opened Finished Duplicate Db at 13-MAY-11 RMAN> ASPICON wishes you success in the test. We are glad to assist you with further advice and assistance. We would greatly appreciate any feedback and constructive criticism. Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by ASPICON all rights reserved

Page 19/20
Page 20

3 Contact ASPICON GmbH Hartmann Road 7 09111 Chemnitz Phone: +49.371.909515-100 Fax: +49.371.909515-199 Mail: support@aspicon.de Web: http://www.aspicon.de Skype: ASPICON Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by ASPICON all rights reserved Page 20/20

Translated version of aspicon_tech_wp_oracle_rman_10g_backuptest_2012-03-28.pdf


Page 1

Test with Oracle RMAN backup A White Paper Product Company ASPICON www.aspion.de Please use our reply form on the last page. Thank you. Table of Contents 1 2 Step 1: Install the Oracle software and create the Database Environment ....... 3 3 Step 2: Create the {ORACLE_HOME} / dbs / init [ORACLE_SID] ora file ........................ 4th 4 Step 3: Start the database without a database to mount ............................. 4 5 Step 4: Restore the database control file and the SPFILE ......................... 5 6 Step 5: Switch the database in the 'mount' mode ...................................... 5 ... 7 Step 6: Restore the database files ............................................ ............... 6 8 Step 7: Play back the archive log files .......................................... .................... 6 9 Step 8: Open the database ............................................ ............................. 6

10th For more information ................................................ .................................... 7 11th Oracle_RMAN_10g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by ASPICON all rights reserved Page 1/8
Page 2

1 Preparations The following tutorial describes the steps required to create a with the Oracle Recovery Manager (RMAN) created backup of a production database back playing in a clone database. For this purpose, a decoupled from the production environment test system is needed, on the one ORACLE Database 10g is installed. The following scripts are created for Oracle Database 10g, as the only came with version 10g available command "CLONE DATABASE". In principle, it should, however, also Version 9i work. It is recommended that the test system is largely the same installed. That is, up to the necessary Differences in network and system configuration should be the same Oracle version (including any rehearsed patches) be installed as in the productive system. In the following script called [ORACLE_SID] the unique database system identifier (SID) of the Productive system. If the data is imported into another directory than the production system, it is before init [ORACLE_SID]. ora file to adjust accordingly. It is recommended to make a backup on a network drive on the test computer available so that a accidental deletion is not possible. This can be accessed via NFS and other network file systems are. More information can be found in the NFS Manual. ASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10g Copyright 2006 by ASPICON GmbH, Chemnitz, All Rights Reserved
Page 3

2 Step 1: Install the Oracle software and create the Database environment

To a normal Oracle database installation must be performed without generating. In following is the installation path as / U01/app/oracle / accepted. Then the directories for the database files are in a shell of User "oracle" create (shell scripts are given for a POSIX shell, such as bash or sh): # the ORACLE HOME directory (ORACLE_HOME) export ORACLE_HOME = / u01/app/oracle/product/10.2/db mkdir-p $ {ORACLE_HOME} # Directory database and alert logs mkdir-p / u01/app/oracle/admin / [ORACLE_SID] / bdump # Directory to store core dumps mkdir-p / u01/app/oracle/admin / [ORACLE_SID] / cdump # Directory for user dumps mkdir-p / u01/app/oracle/admin / [ORACLE_SID] / udump Next, a TNSAlias be applied. The following example uses the alias 'CLONE' to database 'Prod.world' created. To the $ {ORACLE_HOME} / network / admin directory is / tnsnames.ora to edit and add the following entry: CLONE = ( DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = prod.world) ) ) ASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10g Copyright 2006 by ASPICON GmbH, Chemnitz, All Rights Reserved
Page 4

3 Step 2: Create the file

{ORACLE_HOME} / dbs / init [ORACLE_SID]. Ora To the created in step 1) for the paths to-play back the data must be entered be, if different from the production system. All path names should be as absolute paths be specified. The following is the instance to be created 'prod' name. instance_name Prod = control_files = <Pfad_zu_db_control_file(s)> background_dump_dest = <Pfad_zu_bdump> core_dump_dest = <Pfad_zu_cdump> user_dump_dest = <Pfad_zu_udump> LOG_ARCHIVE_DEST_1 = <Pfad_zu_archiv_dump_location> Next, the orapwd file is to be created: orapwd file = $ ORACLE_HOME / dbs / orapw $ ORACLE_SID \ password = change_on_install In the other method, we assume a system identical to the productive Directory structure. If this is not the case, in the meta-link listed in the Annex Notes notes to be read additional procedures. 4 Step 3: Start the database without a database to mount. This is a shell of the user oracle sqlplus to start the tool: export ORACLE_SID = prod sqlplus "sys / as sysdba <sys_passwd>" <sys_passwd> be replaced by the valid password. Then the database in nomount mode starts at sqlplus prompt: sqlplus> startup nomount ASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10g Copyright 2006 by ASPICON GmbH, Chemnitz, All Rights Reserved
Page 5

5 Step 4: Restore the database control file and the SPFILE. This must be started in ORACLE Recovery Manager (RMAN) a restore. To First you start RMAN from the shell prompt rman target sys / @ clone <sys_passwd>

and then executes the following script at the RMAN prompt: RMAN> run { allocate channel c1 type disk; restore controlfile until time "To_date ('13-12-2005 15:34:38 ',' DD-MM-YYYY HH24: MI: SS ')"; release channel c1; } The first command opens a channel to the backup medium (in this example 'disk'). The second Command initiates a restore of the control and SPFILE specified at the date DD MM-YYYY HH24: MI: SS The last command closes the channel to the backup medium. 6 Step 5: Switch the database in the 'mount' mode To do this in sqlplus as command sqlplus> alter database mount; are executed. ASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10g Copyright 2006 by ASPICON GmbH, Chemnitz, All Rights Reserved
Page 6

7 Step 6: Restore the database files Analogous to step 4) can now be done to restore the database files. Depending on the volume the backup data, this can take several hours to complete. In RMAN to the Script RMAN> run { allocate channel c1 type disk; restore database until time "To_date ('13-12-2005 15:34:38 ',' DD-MM-YYYY HH24: MI: SS ')"; release channel c1; } ... perform. The return data for control and database files have to be identical be selected. The above script does the data from the last full backup file back. 8 Step 7: Play back the archive log files Now just fill in the archive log files, which are still missing transactions since the last full backup prior to the desired date of recovery included. From these starting from the database files of the state at exactly the time given are produced.

RMAN> run { allocate channel c1 type disk; recover database until time "To_date ('13-12-2005 15:34:38 ',' DD-MM-YYYY HH24: MI: SS ')"; release channel c1; } 9 Step 8: Open the database Now all the database files should have been played back to the desired level. Now the database can be opened in sqlplus: sqlplus> alter database open resetlogs; Then the clone database with the database is at the desired time to Available. ASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10g Copyright 2006 by ASPICON GmbH, Chemnitz, All Rights Reserved
Page 7

10th More information For more information on RMAN are located in the following Oracle Metalink articles: Metalink Note 228257.1 Metalink note 73912.1 Metalink note 73974.1 ASPICON wishes you success in the test. We are happy to provide further advice and support Side. We are happy to receive feedback and constructive criticism. 11th Contact ASPICON GmbH - Support Hartmann Road 7 09111 Chemnitz Phone: 0371.909 515100 Fax: 0371.909 515199 Mail: support@aspicon.de Web: www.aspicon.de Skype: ASPICON ASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10g

Copyright 2006 by ASPICON GmbH, Chemnitz, All Rights Reserved


Page 8

FAX REPLY to 0371.909515199 We would like to know if you have helped the information provided and are forward to your feedback. Please tick short and fax back to ASPICON. O Yes, this document helped me, I have no further questions O Yes, this document helped with at least my approach advance, but I need more information. O NO, this document has not helped me (please specify) _____________________________________________________________________ _________ _____________________________________________________________________ _________ _____________________________________________________________________ _________ O I would like more information / documents on the following topics _____________________________________________________________________ _________ _____________________________________________________________________ _________ _____________________________________________________________________ _________ Please for further inquiry. Name, first name ________________________________________________________________ Company ________________________________________________________________ Phone ________________________________________________________________ Email ________________________________________________________________ Thank you for your support, just so we can improve our service in the future. ASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10g Copyright 2006 by ASPICON GmbH, Chemnitz, All Rights Reserved

Translated version of aspicon_tech_wp_oracle_rman_10g_backuptest_2012-03-28.pdf

Page 1

Test with Oracle RMAN backup A White Paper Product Company ASPICON www.aspion.de Please use our reply form on the last page. Thank you. Table of Contents 1 2 Step 1: Install the Oracle software and create the Database Environment ....... 3 3 Step 2: Create the {ORACLE_HOME} / dbs / init [ORACLE_SID] ora file ........................ 4th 4 Step 3: Start the database without a database to mount ............................. 4 5 Step 4: Restore the database control file and the SPFILE ......................... 5 6 Step 5: Switch the database in the 'mount' mode ...................................... 5 ... 7 Step 6: Restore the database files ............................................ ............... 6 8 Step 7: Play back the archive log files .......................................... .................... 6 9 Step 8: Open the database ............................................ ............................. 6 10th For more information ................................................ .................................... 7 11th Oracle_RMAN_10g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by ASPICON all rights reserved Page 1/8
Page 2

1 Preparations The following tutorial describes the steps required to create a with the Oracle Recovery Manager (RMAN) created backup of a production database back playing in a clone database. For this purpose, a decoupled from the production environment test system is needed, on the one ORACLE Database 10g is installed. The following scripts are created for Oracle Database 10g, as the only came with version 10g available command "CLONE DATABASE". In principle, it should, however, also Version 9i work. It is recommended that the test system is largely the same installed. That is, up to the necessary Differences in network and system configuration should be the same Oracle version (including any rehearsed patches) be installed as in the productive system.

In the following script called [ORACLE_SID] the unique database system identifier (SID) of the Productive system. If the data is imported into another directory than the production system, it is before init [ORACLE_SID]. ora file to adjust accordingly. It is recommended to make a backup on a network drive on the test computer available so that a accidental deletion is not possible. This can be accessed via NFS and other network file systems are. More information can be found in the NFS Manual. ASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10g Copyright 2006 by ASPICON GmbH, Chemnitz, All Rights Reserved
Page 3

2 Step 1: Install the Oracle software and create the Database environment To a normal Oracle database installation must be performed without generating. In following is the installation path as / U01/app/oracle / accepted. Then the directories for the database files are in a shell of User "oracle" create (shell scripts are given for a POSIX shell, such as bash or sh): # the ORACLE HOME directory (ORACLE_HOME) export ORACLE_HOME = / u01/app/oracle/product/10.2/db mkdir-p $ {ORACLE_HOME} # Directory database and alert logs mkdir-p / u01/app/oracle/admin / [ORACLE_SID] / bdump # Directory to store core dumps mkdir-p / u01/app/oracle/admin / [ORACLE_SID] / cdump # Directory for user dumps mkdir-p / u01/app/oracle/admin / [ORACLE_SID] / udump Next, a TNSAlias be applied. The following example uses the alias 'CLONE' to database 'Prod.world' created. To the $ {ORACLE_HOME} / network / admin directory is / tnsnames.ora to edit and add the following entry: CLONE = (

DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = prod.world) ) ) ASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10g Copyright 2006 by ASPICON GmbH, Chemnitz, All Rights Reserved
Page 4

3 Step 2: Create the file {ORACLE_HOME} / dbs / init [ORACLE_SID]. Ora To the created in step 1) for the paths to-play back the data must be entered be, if different from the production system. All path names should be as absolute paths be specified. The following is the instance to be created 'prod' name. instance_name Prod = control_files = <Pfad_zu_db_control_file(s)> background_dump_dest = <Pfad_zu_bdump> core_dump_dest = <Pfad_zu_cdump> user_dump_dest = <Pfad_zu_udump> LOG_ARCHIVE_DEST_1 = <Pfad_zu_archiv_dump_location> Next, the orapwd file is to be created: orapwd file = $ ORACLE_HOME / dbs / orapw $ ORACLE_SID \ password = change_on_install In the other method, we assume a system identical to the productive Directory structure. If this is not the case, in the meta-link listed in the Annex Notes notes to be read additional procedures. 4

Step 3: Start the database without a database to mount. This is a shell of the user oracle sqlplus to start the tool: export ORACLE_SID = prod sqlplus "sys / as sysdba <sys_passwd>" <sys_passwd> be replaced by the valid password. Then the database in nomount mode starts at sqlplus prompt: sqlplus> startup nomount ASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10g Copyright 2006 by ASPICON GmbH, Chemnitz, All Rights Reserved
Page 5

5 Step 4: Restore the database control file and the SPFILE. This must be started in ORACLE Recovery Manager (RMAN) a restore. To First you start RMAN from the shell prompt rman target sys / @ clone <sys_passwd> and then executes the following script at the RMAN prompt: RMAN> run { allocate channel c1 type disk; restore controlfile until time "To_date ('13-12-2005 15:34:38 ',' DD-MM-YYYY HH24: MI: SS ')"; release channel c1; } The first command opens a channel to the backup medium (in this example 'disk'). The second Command initiates a restore of the control and SPFILE specified at the date DD MM-YYYY HH24: MI: SS The last command closes the channel to the backup medium. 6 Step 5: Switch the database in the 'mount' mode To do this in sqlplus as command sqlplus> alter database mount; are executed. ASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10g Copyright 2006 by ASPICON GmbH, Chemnitz, All Rights Reserved
Page 6

7 Step 6: Restore the database files

Analogous to step 4) can now be done to restore the database files. Depending on the volume the backup data, this can take several hours to complete. In RMAN to the Script RMAN> run { allocate channel c1 type disk; restore database until time "To_date ('13-12-2005 15:34:38 ',' DD-MM-YYYY HH24: MI: SS ')"; release channel c1; } ... perform. The return data for control and database files have to be identical be selected. The above script does the data from the last full backup file back. 8 Step 7: Play back the archive log files Now just fill in the archive log files, which are still missing transactions since the last full backup prior to the desired date of recovery included. From these starting from the database files of the state at exactly the time given are produced. RMAN> run { allocate channel c1 type disk; recover database until time "To_date ('13-12-2005 15:34:38 ',' DD-MM-YYYY HH24: MI: SS ')"; release channel c1; } 9 Step 8: Open the database Now all the database files should have been played back to the desired level. Now the database can be opened in sqlplus: sqlplus> alter database open resetlogs; Then the clone database with the database is at the desired time to Available. ASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10g Copyright 2006 by ASPICON GmbH, Chemnitz, All Rights Reserved
Page 7

10th More information For more information on RMAN are located in the following Oracle Metalink articles: Metalink Note 228257.1 Metalink note 73912.1 Metalink note 73974.1

ASPICON wishes you success in the test. We are happy to provide further advice and support Side. We are happy to receive feedback and constructive criticism. 11th Contact ASPICON GmbH - Support Hartmann Road 7 09111 Chemnitz Phone: 0371.909 515100 Fax: 0371.909 515199 Mail: support@aspicon.de Web: www.aspicon.de Skype: ASPICON ASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10g Copyright 2006 by ASPICON GmbH, Chemnitz, All Rights Reserved
Page 8

FAX REPLY to 0371.909515199 We would like to know if you have helped the information provided and are forward to your feedback. Please tick short and fax back to ASPICON. O Yes, this document helped me, I have no further questions O Yes, this document helped with at least my approach advance, but I need more information. O NO, this document has not helped me (please specify) _____________________________________________________________________ _________ _____________________________________________________________________ _________ _____________________________________________________________________ _________ O I would like more information / documents on the following topics _____________________________________________________________________ _________

_____________________________________________________________________ _________ _____________________________________________________________________ _________ Please for further inquiry. Name, first name ________________________________________________________________ Company ________________________________________________________________ Phone ________________________________________________________________ Email ________________________________________________________________ Thank you for your support, just so we can improve our service in the future.

Das könnte Ihnen auch gefallen