translated version of aspicon

38
Translated version of aspicon_tec h_wp_oracle_r man_11g_backupte st_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 Validatio n ............................................ ................................. 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

Upload: mabu-dba

Post on 14-Apr-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 1/38

Page 2: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 2/38

Backup (ideally on a test machine) produced.All examples assume that an application to the database using operating systemauthenticationis 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_HOME1 and ORACLE_SID set and$ ORACLE_HOME / bin to be included in the PATHThe 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 pmonoracle36061 0 11:14?00:00:00 ora_pmon_orcl1Before 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 needof 

Restore test anyway.The following SQL statement evaluates the backups from the last seven days (if thederivative inControl file is sufficiently large). The query returns no rows or can be found in the"STATUS" columnseldom or not the value of "COMPLETED", then in any case of a serious problem andthe backupLack of proper backups to go.1For 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.2Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright byASPICON all rights reservedPage 2/20

Page 3 

Page 3: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 3/38

Page 4: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 4/38

6.62 Validate a backup Advantage of validating is that it causes very little effort compared to duplicate and noTest machine must be installed. The disadvantage, however, is that no genuine

Restore / Recovery takes place andso 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 himavailable metadata (control file, RMAN Catalog) on. He does not check whether thesefiles actually availableor are intact.The following example successfully restore a backup created on 12.05.2011 at 11:30clock validated.Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright byASPICON all rights reservedPage 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:042011Copyright (c) 1982, 2009, Oracle and / or its affiliates. All rightsreserved.connected to target database: ORCL (DBID = 1276410725)RMAN> restore database until time "to_date ('12 .05.2011 12:00 ',' DD.MM.YYYYHH24: MI ') "preview;

Starting restore at 12-MAY-11using target database control file instead of recovery catalogAllocated channel: ORA_DISK_1channel ORA_DISK_1: SID = 18 instance = ORCL1 device type = DISK List of Backup Sets===================BS Key Type LV Size

Page 5: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 5/38

Device Type Elapsed Time Completion Time-------------------------------------------------- -----------3Full1.51G

DISK 00:03:3312-MAY-11BP Key: 3Status: AVAILABLE Compressed: NO Tag:TAG20110512T112940Piece Name:+ ARCH/orcl/backupset/2011_05_12/nnndf0_tag20110512t112940_0.256.750943783List of Datafiles in backup set 3File LV Type Ckp SCNCkp Time Name---------------------------------1Full 478119212-MAY-11 + DATA/orcl/datafile/system.256.7486298372Full 478119212-MAY-11 + DATA/orcl/datafile/sysaux.257.7486298393

Full 478119212-MAY-11+ DATA/orcl/datafile/undotbs3.258.7489696074Full 478119212-MAY-11 + DATA/orcl/datafile/users.259.7486298415Full 478119212-MAY-11+ DATA/orcl/datafile/example.264.748630015

6Full 478119212-MAY-11+ DATA/orcl/datafile/undotbs2.265.7486303477Full 478119212-MAY-11 + DATA/orcl/datafile/owb.269.748634463

Page 6: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 6/38

8Full 478119212-MAY-11+ DATA/orcl/datafile/mgmt_ecm_depot_ts.271.749051105Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by

ASPICON all rights reservedPage 4/20

Page 5 

9Full 478119212-MAY-11+ DATA/orcl/datafile/mgmt_tablespace.272.74905110710

Full 478119212-MAY-11+ DATA/orcl/datafile/mgmt_ad4j_ts.270.749051111using channel ORA_DISK_1List of Backup Sets===================BS Key SizeDevice Type Elapsed Time Completion Time-------------------------------------------------- -----5

386.00K DISK 00:00:0012-MAY-11BP Key: 5Status: AVAILABLE Compressed: NO Tag:TAG20110512T113328Piece Name:+ ARCH/orcl/backupset/2011_05_12/annnf0_tag20110512t113328_0.260.750944009List of Archived Logs in backup set 5

Thrd SeqLow SCNLow Time Next SCN Next Time-------------------------------------------------1170

Page 7: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 7/38

478118112-MAY-11 478168512-MAY-11Media recovery start SCN is 4781192Recovery must be done beyond SCN 4781192 to clear datafile fuzziness

Finished restore at 12-MAY-11RMAN>Accordingly, the logic for validating a test restore to the time before the first backupwouldfail:[Oracle @ c-db-17 (db11gR2 ORCL1)] $ rman target /Recovery Manager: Release 11.2.0.2.0 - Production on Thu May 12 12:04:482011Copyright (c) 1982, 2009, Oracle and / or its affiliates. All rightsreserved.connected to target database: ORCL (DBID = 1276410725)RMAN> restore database until time "to_date ('12 .05.2011 11:00 ',' DD.MM.YYYYHH24: MI ') "preview;Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright byASPICON all rights reservedPage 5/20

Page 6 

Starting restore at 12-MAY-11

using target database control file instead of recovery catalogAllocated channel: ORA_DISK_1channel ORA_DISK_1: SID = 35 instance = ORCL1 device type = DISK datafile 3 will be created during Automatically restore operationaldatafile 6 will be created during Automatically restore operationaldatafile 7 will be created during Automatically restore operational8 datafile will be created during Automatically restore operationaldatafile 9 will be created during Automatically restore operationaldata file 10 will be created during Automatically restore operationalRMAN-00571: ==============================================

=============RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS===============RMAN-00571: ===========================================================RMAN-03002: failure of restore command at 05/12/2011 12:05:33RMAN-06026: some targets not found - aborting restore

Page 8: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 8/38

RMAN-06023: no backup or copy of datafile 5 found to restoreRMAN-06023: no backup or copy of datafile 4 found to restoreRMAN-06023: no backup or copy of datafile 2 found to restoreRMAN-06023: no backup or copy of datafile 1 found to restoreRMAN>2.2 Option 2: Physical Validation In contrast to the physical validation logic validation checks whether a Restore /Recoverynecessary backups are actually available and undamaged. An actual write-back isBut 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:122011Copyright (c) 1982, 2009, Oracle and / or its affiliates. All rightsreserved.connected to target database: ORCL (DBID = 1276410725)RMAN> restore database until time "to_date ('12 .05.2011 12:00 ',' DD.MM.YYYYHH24: MI ') "validate;Starting restore at 12-MAY-11using target database control file instead of recovery catalogAllocated channel: ORA_DISK_1channel ORA_DISK_1: SID = 35 instance = ORCL1 device type = DISK Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by

ASPICON all rights reservedPage 6/20

Page 7 

channel ORA_DISK_1: starting validation of datafile backup setchannel ORA_DISK_1: reading from backup piece+ ARCH/orcl/backupset/2011_05_12/nnndf0_tag20110512t112940_0.256.750943783channel ORA_DISK_1: piecehandle = +ARCH/orcl/backupset/2011_05_12/nnndf0_tag20110512t112940_0.256.75094

Tag = 3783 TAG20110512T112940channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: validation complete, elapsed time: 00:00:15Finished restore at 12-MAY-11RMAN>A defective or missing backup would restore noticed in this version:[Oracle @ c-db-17 (db11gR2 ORCL1)] $ rman target /

Page 9: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 9/38

Recovery Manager: Release 11.2.0.2.0 - Production on Thu May 12 12:20:222011Copyright (c) 1982, 2009, Oracle and / or its affiliates. All rightsreserved.connected to target database: ORCL (DBID = 1276410725)

RMAN> restore database until time "to_date ('12 .05.2011 12:00 ',' DD.MM.YYYYHH24: MI ') "validate;Starting restore at 12-MAY-11using target database control file instead of recovery catalogAllocated channel: ORA_DISK_1channel ORA_DISK_1: SID = 424 instance = ORCL1 device type = DISK channel ORA_DISK_1: starting validation of datafile backup setchannel ORA_DISK_1: reading from backup piece+ ARCH/orcl/backupset/2011_05_12/nnndf0_tag20110512t112940_0.256.750943783channel ORA_DISK_1: ORA-19870: error while restoring backup piece+ ARCH/orcl/backupset/2011_05_12/nnndf0_tag20110512t112940_0.256.750943783ORA-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.750943783failover to previous backupdatafile 3 will be created during Automatically restore operationalOracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by

ASPICON all rights reservedPage 7/20

Page 8 

datafile 6 will be created during Automatically restore operationaldatafile 7 will be created during Automatically restore operational8 datafile will be created during Automatically restore operationaldatafile 9 will be created during Automatically restore operationaldata file 10 will be created during Automatically restore operationalRMAN-00571: ==============================================

=============RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS===============RMAN-00571: ===========================================================RMAN-03002: failure of restore command at 05/12/2011 12:20:40RMAN-06026: some targets not found - aborting restore

Page 10: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 10/38

RMAN-06023: no backup or copy of datafile 5 found to restoreRMAN-06023: no backup or copy of datafile 4 found to restoreRMAN-06023: no backup or copy of datafile 2 found to restoreRMAN-06023: no backup or copy of datafile 1 found to restoreRMAN>

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 aduplicate. InPrinciple can be applied also copy it to the production server, however, the adaptationefforthere considerably higher and, especially for beginners, the risk of serious damage totheProduction database rather high.It is recommended that the productive largely identical to install the test system. Thatis, up tonecessary differences in network and system configuration should be the samedatabase 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. Duringthe installation,especially the production of the pre-installation requirements, a look in the "Quick DatabaseInstallation Guide ". It is recommended that the operating environment accordingly bysetting the variablesORACLE_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 persistmake, should the respective variable, depending on shell, inoracle / .bash_profile or oracle / .profile be registered.

Page 11: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 11/38

At this point we can already make the TNS entry for the production database, as theywhile later Duplicate must be referenced as the "target". We assign here the net service name"prod". Useeither 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 byASPICON all rights reservedPage 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 backupsuse is made, the backup of the production database must be on the test server (bestread only) availableare made. In one example, provided by the c-db-17 NFS share was added to theBackup Filesmounted 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 adaptedare. This step can now directly under the "duplicate" by specifying "spfile" done withare. 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 ...)

Page 12: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 12/38

 be considered.However, before cloning nor the audit_dump_dest directory to create, as well as thestill to 11.2not 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 aappropriate video value to be specified. To make a current copy as possible, therecovery shoulduntil the last Archivelogsequence included in the backup. This is determined by theRMANProduction database as follows:Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright byASPICON all rights reservedPage 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:372011Copyright (c) 1982, 2009, Oracle and / or its affiliates. All rightsreserved.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 catalogList of Archived Log Backups============================Thrd SeqLow SCNLow Time BS Key S # Pieces # Copies CompressedDay-------------------------------------------------- ---------------

15785 78613-MAY-11 11A 11YES

Page 13: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 13/38

TAG20110513T09420416809 16213-MAY-11 11

A 11YESTAG20110513T0942041781371513-MAY-11 13A 11YESTAG20110513T09434418813 76213-MAY-11 15A 11YES

TAG20110513T1011541981513213-MAY-11 17A 11YESTAG20110513T101343After 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) andTarget database (auxiliary) connect. Connect to a production database (at least up toversion11.1 - 11.2 version comes up with a so called "backup-based duplicate ', in which adatabase entirely of 

Page 14: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 14/38

the backup is duplicated and no connection to the source database is no longer required.) always requiredeven if the target database is built up in this case only from backups. The productiondatabase isHowever, 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:092011Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright byASPICON all rights reservedPage 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'spfileset 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 102 ;Starting Duplicate Db at 13-MAY-11using target database control file instead of recovery catalog

Allocated channel: ORA_AUX_DISK_1channel 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';

Page 15: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 15/38

sql clone "alter system set spfile ='' /'' U01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileclone.ora ";}executing Memory Scriptexecuting command: SET until clause

Starting restore at 13-MAY-11using channel ORA_AUX_DISK_1WARNING: A restore time was estimated based on the Supplied UNTIL SCNchannel ORA_AUX_DISK_1: starting datafile backup set restorechannel ORA_AUX_DISK_1: restoring SPFILEoutput filename = / u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileclone.ora2Until the clause is generally understood as "up to, but not including ...". So shall therecovery9 include archivelog Sequence with, must logically be 10 given here.Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright byASPICON all rights reservedPage 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: piecehandle = / backup/oracle/CLONE/autobackup/2011_05_13/o1_mf_s_751025625_6wth4t20 _.bkp tag = TAG20110513T101345channel ORA_AUX_DISK_1: restored backup piece 1channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01Finished restore at 13-MAY-11sql statement: alter system set spfile ='' /'' U01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileclone.oracontents 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 ";

Page 16: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 16/38

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 Scriptsql statement: alter system set db_name ='' CLONE'' comment ='' duplicate''scope = spfilesql statement: alter system set db_create_file_dest ='' / U02/oracle/oradata'' comment ='''' scope = spfileOracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright by

ASPICON all rights reservedPage 12/20

Page 13 

sql statement: alter system set control_files ='' /'' Comment ='''' u02/oracle/oradata/CLONE/controlfile/control01.cf scope = spfilesql 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 = spfilesql statement: alter system set db_recovery_file_dest ='' / Backup / oracle.local'' comment ='''' scope = spfileOracle instance shut down

Page 17: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 17/38

connected to auxiliary database (not started)Oracle instance startedTotal System Global Area644468736 bytesFixed Size

1346104 bytesVariable size188745160 bytesDatabase Buffers448790528 bytesRedo Buffers5586944 bytescontents 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 nomountrestore clone primary controlfile;

old clone database mount;}executing Memory Scriptexecuting command: SET until clauseOracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright byASPICON all rights reservedPage 13/20

Page 14 

sql statement: alter system set db_name ='' CLONE'' comment ='' Modified by

RMAN duplicate'' scope = spfilesql statement: alter system set DB_UNIQUE_NAME ='' comment ='' CLONE'' Modified by RMAN duplicate'' scope = spfileOracle instance shut downOracle instance startedTotal System Global Area644468736 bytes

Page 18: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 18/38

Fixed Size1346104 bytesVariable size188745160 bytesDatabase Buffers

448790528 bytesRedo Buffers5586944 bytesStarting restore at 13-MAY-11Allocated channel: ORA_AUX_DISK_1channel ORA_AUX_DISK_1: SID = 133 device type = DISK channel ORA_AUX_DISK_1: starting datafile backup set restorechannel ORA_AUX_DISK_1: restoring control filechannel ORA_AUX_DISK_1: reading from backup piece/Backup/oracle/CLONE/autobackup/2011_05_13/o1_mf_s_751023827_6wtfdn2h_.bk  pchannel ORA_AUX_DISK_1: piecehandle = / backup/oracle/CLONE/autobackup/2011_05_13/o1_mf_s_751023827_6wtfdn2h _.bkp tag = TAG20110513T094347channel ORA_AUX_DISK_1: restored backup piece 1channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03output filename = / u02/oracle/oradata/CLONE/controlfile/control01.cf 

Finished restore at 13-MAY-11database mountedcontents 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 byASPICON all rights reservedPage 14/20

Page 19: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 19/38

Page 15 

restoreclone database;}executing Memory Scriptexecuting command: SET until clauseexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEStarting restore at 13-MAY-11using channel ORA_AUX_DISK_1channel ORA_AUX_DISK_1: starting datafile backup set restore

channel ORA_AUX_DISK_1: Specifying datafile (s) to restore from backup setchannel ORA_AUX_DISK_1: restoring datafile 00001 to/ U02/oracle/oradata/CLONE/datafile/system.262.751009207channel ORA_AUX_DISK_1: restoring datafile 00002 to/ U02/oracle/oradata/CLONE/datafile/sysaux.263.751009283channel ORA_AUX_DISK_1: restoring datafile 00003 to/ U02/oracle/oradata/CLONE/datafile/undotbs1.261.751009351channel ORA_AUX_DISK_1: restoring datafile 00004 to/ U02/oracle/oradata/CLONE/datafile/users.260.751009351channel ORA_AUX_DISK_1: reading from backup piece

/Backup/oracle/CLONE/backupset/2011_05_13/o1_mf_nnndf_TAG20110513T101156_6wth1fh6_.bkpchannel ORA_AUX_DISK_1: piecehandle = / backup/oracle/CLONE/backupset/2011_05_13/o1_mf_nnndf_TAG20110513T101156_6wth1fh6_.bkp tag = TAG20110513T101156channel ORA_AUX_DISK_1: restored backup piece 1channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:45

Finished restore at 13-MAY-11contents of Memory Script:{switch clone datafile all;}executing Memory Scriptdatafile 1 switched to datafile copy

Page 20: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 20/38

Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright byASPICON all rights reservedPage 15/20

Page 16 

input datafile copy RECID = 17 STAMP = 751029643 filename = / u02/oracle/oradata/CLONE/datafile/system.262.751009207datafile 2 switched to datafile copyinput datafile copy RECID = 18 STAMP = 751029643 filename = / u02/oracle/oradata/CLONE/datafile/sysaux.263.751009283datafile 3 switched to datafile copyinput datafile copy RECID = 19 STAMP = 751029643 filename = / u02/oracle/oradata/CLONE/datafile/undotbs1.261.751009351datafile 4 switched to datafile copy

input datafile copy RECID = 20 STAMP = 751029643 filename = / u02/oracle/oradata/CLONE/datafile/users.260.751009351contents of Memory Script:{set until scn 815178;recover clone databasedelete archivelog;}

executing Memory Scriptexecuting command: SET until clauseStarting recover at 13-MAY-11using channel ORA_AUX_DISK_1starting media recoverychannel ORA_AUX_DISK_1: starting archived log restore to default destinationchannel ORA_AUX_DISK_1: restoring archived logarchived log thread = 1 sequence = 8channel ORA_AUX_DISK_1: reading from backup piece/

Backup/oracle/CLONE/backupset/2011_05_13/o1_mf_annnn_TAG20110513T101154_6wth1c4g_.bkpchannel ORA_AUX_DISK_1: piecehandle = / backup/oracle/CLONE/backupset/2011_05_13/o1_mf_annnn_TAG20110513T101154_6wth1c4g_.bkp tag = TAG20110513T101154

Page 21: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 21/38

channel ORA_AUX_DISK_1: restored backup piece 1channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01archived log filename = / backup/oracle.local/CLONE/archivelog/2011_05_13/o1_mf_1_8_6wtm2fov_.ar 

c thread = 1 sequence = 8channel clone_default: deleting archived log (s)archived log filename = / backup/oracle.local/CLONE/archivelog/2011_05_13/o1_mf_1_8_6wtm2fov_.ar c RECID = 11 STAMP = 751 029 645Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright byASPICON all rights reservedPage 16/20

Page 17 

channel ORA_AUX_DISK_1: starting archived log restore to default destinationchannel ORA_AUX_DISK_1: restoring archived logarchived log thread = 1 sequence = 9channel ORA_AUX_DISK_1: reading from backup piece/Backup/oracle/CLONE/backupset/2011_05_13/o1_mf_annnn_TAG20110513T101343_6wth4qsk_.bkp

channel ORA_AUX_DISK_1: piecehandle = / backup/oracle/CLONE/backupset/2011_05_13/o1_mf_annnn_TAG20110513T101343_6wth4qsk_.bkp tag = TAG20110513T101343channel ORA_AUX_DISK_1: restored backup piece 1channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01archived log filename = / 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 filename = / backup/oracle.local/CLONE/archivelog/2011_05_13/o1_mf_1_9_6wtm2gwv_.ar c RECID = 12 STAMP = 751 029 646media recovery complete, elapsed time: 00:00:00Finished recover at 13-MAY-11

Page 22: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 22/38

Oracle instance startedTotal System Global Area644468736 bytesFixed Size1346104 bytes

Variable size188745160 bytesDatabase Buffers448790528 bytesRedo Buffers5586944 bytescontents 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 Scriptsql statement: alter system set db_name ='' CLONE'' comment ='' Reset tooriginal value by RMAN'' scope = spfilesql statement: alter system reset DB_UNIQUE_NAME scope = spfile

Oracle instance shut downOracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright byASPICON all rights reservedPage 17/20

Page 18 

connected to auxiliary database (not started)Oracle instance startedTotal System Global Area644468736 bytes

Fixed Size1346104 bytesVariable size188745160 bytesDatabase Buffers448790528 bytesRedo Buffers

Page 23: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 23/38

5586944 bytessql statement: CREATE CONTROLFILE REUSE SET DATABASE "CLONE"RESETLOGSARCHIVELOGMaxLogFiles

16MAXLOGMEMBERS3MAXDATAFILES100MaxInstances8MAXLOGHISTORY292LOGFILEGROUP 1 ('/ u02/oracle/oradata/CLONE/onlinelog/group_1.258.751009571''/ U02/oracle/oradata/CLONE/onlinelog/group_1.272.751009575') SIZE 50 MREUSE,GROUP 2 ('/ u02/oracle/oradata/CLONE/onlinelog/group_2.265.751009631''/ U02/oracle/oradata/CLONE/onlinelog/group_2.270.751009635') SIZE 50 MREUSE,GROUP 3 ('/ u02/oracle/oradata/CLONE/onlinelog/group_3.264.751009607''/ U02/oracle/oradata/CLONE/onlinelog/group_3.271.751009607') SIZE 50 MREUSE

DATAFILE'/ U02/oracle/oradata/CLONE/datafile/system.262.751009207'CHARACTER SET WE8MSWIN1252contents 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 Scriptexecuting command: SET NEWNAME

Page 24: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 24/38

Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright byASPICON all rights reservedPage 18/20

Page 19 

renamed tempfile 1 to / u02/oracle/oradata/CLONE/tempfile/temp.266.751009657in controlfilecataloged datafile copydatafile copy filename = / u02/oracle/oradata/CLONE/datafile/sysaux.263.751009283 RECID = 1STAMP = 751029665cataloged datafile copydatafile copy filename = / u02/oracle/oradata/CLONE/datafile/undotbs1.261.751009351 RECID = 2

STAMP = 751029665cataloged datafile copydatafile copy filename = / u02/oracle/oradata/CLONE/datafile/users.260.751009351 RECID = 3STAMP = 751029665datafile 2 switched to datafile copyinput datafile copy RECID = 1 STAMP = 751029665 filename = / u02/oracle/oradata/CLONE/datafile/sysaux.263.751009283datafile 3 switched to datafile copyinput datafile copy RECID = 2 STAMP = 751029665 file

name = / u02/oracle/oradata/CLONE/datafile/undotbs1.261.751009351datafile 4 switched to datafile copyinput datafile copy RECID = 3 STAMP = 751029665 filename = / u02/oracle/oradata/CLONE/datafile/users.260.751009351contents of Memory Script:{Age clone database open resetlogs;}executing Memory Scriptdatabase opened

Finished Duplicate Db at 13-MAY-11RMAN>ASPICON wishes you success in the test. We are glad to assist you with further advice and assistance. Wewould greatly appreciate any feedback and constructive criticism.Oracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright byASPICON all rights reserved

Page 25: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 25/38

Page 19/20

Page 20 

3 Contact ASPICON GmbHHartmann Road 709111 ChemnitzPhone:+49.371.909515-100Fax:+49.371.909515-199Mail:[email protected] 

Web:http://www.aspicon.de Skype: ASPICONOracle_RMAN_11g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright byASPICON all rights reservedPage 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 ASPICONwww.aspion.dePlease use our reply form on the last page. Thank you.

Table of Contents 12 Step 1: Install the Oracle software and create theDatabase Environment ....... 33 Step 2: Create the {ORACLE_HOME} / dbs / init [ORACLE_SID] ora file

........................ 4th4 Step 3: Start the database without a database to mount ............................. 45 Step 4: Restore the database control file and the SPFILE ......................... 56 Step 5: Switch the database in the 'mount' mode ...................................... 5 ...7 Step 6: Restore the database files ............................................ ............... 68 Step 7: Play back the archive log files .......................................... .................... 69 Step 8: Open the database ............................................ ............................. 6

Page 26: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 26/38

10th For more information ................................................ .................................... 711thOracle_RMAN_10g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright byASPICON all rights reservedPage 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 onlycame with version 10g available command "CLONE DATABASE". In principle, itshould, however, alsoVersion 9i work.It is recommended that the test system is largely the same installed. That is, up to thenecessaryDifferences in network and system configuration should be the same Oracle

version (including anyrehearsed patches) be installed as in the productive system.

In the following script called [ORACLE_SID] the unique database system identifier (SID) of theProductive system. If the data is imported into another directory than the productionsystem, 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 aaccidental deletion is not possible. This can be accessed via NFS and other network file systemsare. More information can be found in the NFS Manual. 

ASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10gCopyright 2006 by ASPICON GmbH, Chemnitz, All Rights Reserved

Page 3 

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

Page 27: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 27/38

To a normal Oracle database installation must be performed without generating. Infollowing 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/dbmkdir-p $ {ORACLE_HOME}#Directory database and alert logsmkdir-p / u01/app/oracle/admin / [ORACLE_SID] / bdump#Directory to store core dumpsmkdir-p / u01/app/oracle/admin / [ORACLE_SID] / cdump#Directory for user dumpsmkdir-p / u01/app/oracle/admin / [ORACLE_SID] / udump Next, a TNSAlias be applied. The following example uses the alias 'CLONE' todatabase'Prod.world' created. To the $ {ORACLE_HOME} / network / admin directory is /tnsnames.orato 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 10gCopyright 2006 by ASPICON GmbH, Chemnitz, All Rights Reserved

Page 4 

3 Step 2: Create the file 

Page 28: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 28/38

{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_nameProd =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_installIn the other method, we assume a system identical to the productiveDirectory 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 = prodsqlplus "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 nomountASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10gCopyright 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. ToFirst you start RMAN from the shell promptrman target sys / @ clone <sys_passwd>

Page 29: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 29/38

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 secondCommand initiates a restore of the control and SPFILE specified at the date DDMM-YYYY HH24: MI: SSThe 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 commandsqlplus> alter database mount;are executed.ASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10gCopyright 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

volumethe backup data, this can take several hours to complete. In RMAN to theScriptRMAN> 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 lastfull backup prior to the desired date of recovery included. From thesestarting from the database files of the state at exactly the time givenare produced.

Page 30: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 30/38

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. Nowthe database can be opened in sqlplus:sqlplus> alter database open resetlogs;Then the clone database with the database is at the desired time toAvailable.ASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10gCopyright 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.1Metalink note 73912.1Metalink note 73974.1ASPICON wishes you success in the test. We are happy to provide further advice and

supportSide. We are happy to receive feedback and constructive criticism.11th Contact ASPICON GmbH- Support -Hartmann Road 709111 ChemnitzPhone:0371.909 515100Fax:

0371.909 515199Mail:[email protected] Web:www.aspicon.de Skype: ASPICONASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10g

Page 31: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 31/38

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 areforward to your feedback. Please tick short and fax back to ASPICON.OYes, this document helped me, I have no further questionsOYes, this document helped with at least my approachadvance, but I need more information.O NO, this document has not helped me (please specify) _____________________________________________________________________ 

 _________  _____________________________________________________________________  _________  _____________________________________________________________________  _________ OI 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 10gCopyright 2006 by ASPICON GmbH, Chemnitz, All Rights Reserved

Translated version of 

aspicon_tech_wp_oracle_rman_10g_backuptest_2012-03-28.pdf 

Page 32: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 32/38

Page 1 

Test with Oracle RMAN backup A White Paper Product Company ASPICONwww.aspion.dePlease use our reply form on the last page. Thank you.Table of Contents 12 Step 1: Install the Oracle software and create theDatabase Environment ....... 33 Step 2: Create the {ORACLE_HOME} / dbs / init [ORACLE_SID] ora file........................ 4th4 Step 3: Start the database without a database to mount ............................. 45 Step 4: Restore the database control file and the SPFILE ......................... 56 Step 5: Switch the database in the 'mount' mode ...................................... 5 ...

7 Step 6: Restore the database files ............................................ ............... 68 Step 7: Play back the archive log files .......................................... .................... 69 Step 8: Open the database ............................................ ............................. 610th For more information ................................................ .................................... 711thOracle_RMAN_10g_Backuptest_ASPICON_Whitepaper_2012-03-28, copyright byASPICON all rights reservedPage 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 onlycame with version 10g available command "CLONE DATABASE". In principle, it

should, however, alsoVersion 9i work.It is recommended that the test system is largely the same installed. That is, up to thenecessaryDifferences in network and system configuration should be the same Oracle

version (including anyrehearsed patches) be installed as in the productive system.

Page 33: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 33/38

In the following script called [ORACLE_SID] the unique database system identifier (SID) of theProductive system. If the data is imported into another directory than the productionsystem, 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 aaccidental deletion is not possible. This can be accessed via NFS and other network file systemsare. More information can be found in the NFS Manual. ASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10gCopyright 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. Infollowing 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/dbmkdir-p $ {ORACLE_HOME}#Directory database and alert logsmkdir-p / u01/app/oracle/admin / [ORACLE_SID] / bdump#Directory to store core dumpsmkdir-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' todatabase'Prod.world' created. To the $ {ORACLE_HOME} / network / admin directory is /tnsnames.orato edit and add the following entry:CLONE = (

Page 34: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 34/38

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 10gCopyright 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_nameProd =

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_installIn the other method, we assume a system identical to the productiveDirectory structure. If this is not the case, in the meta-link listed in the Annex Notes notes to be read additional procedures.

Page 35: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 35/38

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 = prodsqlplus "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 nomountASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10gCopyright 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. ToFirst you start RMAN from the shell promptrman 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 secondCommand initiates a restore of the control and SPFILE specified at the date DDMM-YYYY HH24: MI: SSThe 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 commandsqlplus> alter database mount;are executed.

ASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10gCopyright 2006 by ASPICON GmbH, Chemnitz, All Rights Reserved

Page 6 

7 Step 6: Restore the database files 

Page 36: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 36/38

Analogous to step 4) can now be done to restore the database files. Depending on thevolumethe backup data, this can take several hours to complete. In RMAN to theScriptRMAN> 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 lastfull backup prior to the desired date of recovery included. From thesestarting from the database files of the state at exactly the time givenare 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. Nowthe database can be opened in sqlplus:sqlplus> alter database open resetlogs;Then the clone database with the database is at the desired time toAvailable.ASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10gCopyright 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.1Metalink note 73912.1Metalink note 73974.1

Page 37: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 37/38

ASPICON wishes you success in the test. We are happy to provide further advice andsupportSide. We are happy to receive feedback and constructive criticism.11th Contact ASPICON GmbH

- Support -Hartmann Road 709111 ChemnitzPhone:0371.909 515100Fax:0371.909 515199Mail:[email protected] Web:www.aspicon.de Skype: ASPICONASPICON GmbH> test with Oracle RMAN backup for Oracle Database 10gCopyright 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 areforward to your feedback. Please tick short and fax back to ASPICON.

OYes, this document helped me, I have no further questionsOYes, this document helped with at least my approachadvance, but I need more information.O NO, this document has not helped me (please specify) _____________________________________________________________________  _________  _____________________________________________________________________ 

 _________  _____________________________________________________________________  _________ OI would like more information / documents on the following topics _____________________________________________________________________  _________ 

Page 38: Translated Version of Aspicon

7/27/2019 Translated Version of Aspicon

http://slidepdf.com/reader/full/translated-version-of-aspicon 38/38

 _____________________________________________________________________  _________  _____________________________________________________________________  _________ 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.