You are on page 1of 16

RAC ASM to RAC ASM database clone using RMAN duplication

NOTICE

The information contained in this document is not to be used for any purpose other than the purposes for
which this document is furnished by GE, nor is this document (in whole or in part) to be reproduced or
furnished to third parties or made public without the prior express written permission of GE.

Version Control

Version Version Date Changes Owner/ Date of


No. Author Review/Expiry

v-1.0 Praveen
22-sept-2013 New Until superseded
Nallani

Classification: GE Internal
Goal: This document explains/shows step by step RMAN Duplicate Database from RAC ASM to RAC ASM from one server to
another server using RMAN disk backup.

Here we are performing database clone from HFSPRD (production RAC database) to HFSDEV (Stage RAC database) using ASM
file system with RMAN duplicate command from production backup on stage server.

Environments:

1) Two nodes RAC 11gR2 on Linux


2) Source RAC Database: HFSPRD (hfsprd1 & hfsprd2)
3) Target RAC Database: HFSDEV (hfsdev1 & hfsdev2) running on different host/server.
4) Production & Target database disk backup locations are different on both source and target servers.

Basic steps:

1) Backup user passwords & db links on target database.


2) Backup target database parameter file from spfile.(create pfile=’<path>’ from spfile;)
3) Black out the database in OEM.
4) Drop Target database.
5) Copy all the production RMAN backup pieces (L0 +Arch and controlfile) to Target server.
6) Update target database pfile by commenting RAC parameters and by adding DB_FILE_NAME_CONVERT &
LOG_FILE_NAME_CONVERT parameters and also check DB_UNIQUE_NAME as target database unique name.
7) Perform database restore using RMAN duplicate command with SET UNTIL clause.
8) Once database opened update pfile by uncommenting RAC parameters and create spfile in shared storage(ASM) to
start the instances on available RAC nodes.
9) Reset user passwords and db links backup from step-1.

Step-1: Backup user passwords & db links on target database by creating dynamic scripts from sys.user$ or by using
DBMS_METADATA.GET_DDL package.

Step-2: Backup target database parameter file from spfile.

RAC database always running with SPFILE in shared location so we need to back up pfile from spfile to a temporary location
because if we drop the database spfile also removes from the shared location.

Set sid for hfsdev1 instance running on crecindbd01a server.

[oracle@crecindbd01a ~]$
[oracle@crecindbd01a ~]$ . hfsdev
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> mkdir -p /d001/backup/oracle/RITM1067269
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> pwd
/d001/backup/oracle/RITM1067269
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> cd /d001/backup/oracle/RITM1067269
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Sep 18 06:56:55 2013

Copyright (c) 1982, 2011, Oracle. All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

Classification: GE Internal
With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label
Security,
OLAP, Data Mining and Real Application Testing options

SQL> sho parameter pfile

NAME TYPE VALUE


------------------------------------ ----------- ------------------------------
spfile string +DATA/hfsdev/spfilehfsdev.ora
SQL>
SQL> create pfile='/d001/backup/oracle/RITM1067269/pfilehfsdev1.ora' from spfile;

File created.

SQL>

Step-3: Black out the database in OEM to silence database monitoring.

Step-4: Drop Target database.

Here we are dropping target database (HFSDEV- Development database)

Note: To drop RAC database we need to set CLUSTER_DATABASE parameter value from TRUE to FALSE and it is static
parameter it requires db bounce.

SQL> sho parameter cluster

NAME TYPE VALUE


------------------------------------ ----------- ------------------------------
cluster_database boolean TRUE
cluster_database_instances integer 2
cluster_interconnects string
SQL>
SQL>
SQL> alter system set cluster_database=false scope=spfile sid='*';

System altered.

SQL>
SQL> sho parameter cluster

NAME TYPE VALUE


------------------------------------ ----------- ------------------------------
cluster_database boolean TRUE
cluster_database_instances integer 2
cluster_interconnects string
SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label
Security,
OLAP, Data Mining and Real Application Testing options
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> srvctl status database -d hfsdev –v  to check db status
Instance hfsdev1 is running on node crecindbd01a. Instance status: Open.
Instance hfsdev2 is running on node crecindbd01b. Instance status: Open.
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> # here we are stopping database using srvctl command
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> srvctl stop database -d hfsdev
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>

Classification: GE Internal
crecindbd01a[oracle]_hfsdev1> srvctl status database -d hfsdev –v  to check db status
Instance hfsdev1 is not running on node crecindbd01a
Instance hfsdev2 is not running on node crecindbd01b
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Sep 18 06:56:55 2013

Copyright (c) 1982, 2011, Oracle. All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label
Security,
OLAP, Data Mining and Real Application Testing options

SQL> sho parameter cluster

NAME TYPE VALUE


------------------------------------ ----------- ------------------------------
cluster_database boolean FALSE
cluster_database_instances integer 2
cluster_interconnects string
SQL>
SQL> startup mount restrict exclusive
ORACLE instance started.

Total System Global Area 1068937216 bytes


Fixed Size 2235208 bytes
Variable Size 725615800 bytes
Database Buffers 335544320 bytes
Redo Buffers 5541888 bytes
Database mounted.
SQL>
SQL>
SQL> drop database;

Database dropped.

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit
Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle
Label Security,
OLAP, Data Mining and Real Application Testing options
SQL> exit

Step-5: Copy all the production RMAN backup pieces (L0 +Arch and controlfile) to Target server.

Now we are copying RMAN backup pieces ( L0 + Arch and controlfile RMAN backup sets) to target database server from
production using SCP utility.

crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> pwd
/d001/backup/oracle/RITM1067269
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> scp
oracle@credbp002c.cloud.ge.com:/prod/backup/oracle/hfsprd/oracle/hfsprd2/arch/HFSPRD_A
RCH* .
Password:
HFSPRD_ARCH_09182013_1_1049_826434428 100% 13MB 6.8MB/s 00:02
HFSPRD_ARCH_09182013_1_1050_826434428 100% 13MB 13.5MB/s 00:01
crecindbd01a[oracle]_hfsdev1>

Classification: GE Internal
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> scp
oracle@credbp002c.cloud.ge.com:/prod/backup/oracle/hfsprd/oracle/hfsprd2/control/HFSPR
D_09_18_2013_826434401.ctl .
Password:
HFSPRD_09_18_2013_826434401.ctl 100% 1312KB 1.3MB/s 00:01
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> scp
oracle@credbp002c.cloud.ge.com:/prod/backup/oracle/hfsprd/oracle/hfsprd2/incr/HFSPRD_H
OT* .
Password:
HFSPRD_HOT_09182013_1_1042_826434214 100% 761MB 9.0MB/s 01:25
HFSPRD_HOT_09182013_1_1043_826434214 100% 140MB 9.3MB/s 00:15
HFSPRD_HOT_09182013_1_1044_826434214 100% 295MB 8.7MB/s 00:34
HFSPRD_HOT_09182013_1_1045_826434214 100% 320MB 8.9MB/s 00:36
HFSPRD_HOT_09182013_1_1046_826434260 100% 1312KB 1.3MB/s 00:01
HFSPRD_HOT_09182013_1_1047_826434262 100% 96KB 96.0KB/s 00:00
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> ls -ltr
total 1589072
-rw-r----- 1 oracle oinstall 14154240 Sep 18 06:22 HFSPRD_ARCH_09182013_1_1049_826434428
-rw-r----- 1 oracle oinstall 14135296 Sep 18 06:22 HFSPRD_ARCH_09182013_1_1050_826434428
-rw-r----- 1 oracle oinstall 1343488 Sep 18 06:23 HFSPRD_09_18_2013_826434401.ctl
-rw-r----- 1 oracle oinstall 797769728 Sep 18 06:25 HFSPRD_HOT_09182013_1_1042_826434214
-rw-r----- 1 oracle oinstall 146915328 Sep 18 06:25 HFSPRD_HOT_09182013_1_1043_826434214
-rw-r----- 1 oracle oinstall 309125120 Sep 18 06:25 HFSPRD_HOT_09182013_1_1044_826434214
-rw-r----- 1 oracle oinstall 335896576 Sep 18 06:26 HFSPRD_HOT_09182013_1_1045_826434214
-rw-r----- 1 oracle oinstall 1343488 Sep 18 06:26 HFSPRD_HOT_09182013_1_1046_826434260
-rw-r----- 1 oracle oinstall 98304 Sep 18 06:26 HFSPRD_HOT_09182013_1_1047_826434262
-rw-r--r-- 1 oracle asmdba 1311 Sep 18 07:09 pfilehfsdev1.ora
crecindbd01a[oracle]_hfsdev1>

Step-6: Update target database pfile with the following parameter values.

*.db_unique_name=’<db_unique_name>’
*.db_file_name_convert=('<Source_DB_Disk_Group_name/DB_Unique_Name/>', '<Target_DB_Disk_Group
_Name/db_uinque_Name/>')
*.log_file_name_convert=('<Source_DB_Disk_Group_name/DB_Unique_Name/>', '<Target_DB_Disk_Group
_Name/db_uinque_Name/>')
*.cluster_database=FALSE

Note: just check parameter cluster_database=FALSE should be false

We are performing disk backup duplication using RMAN 11gR2 duplicate target database from backup location.

Copy temporarily created pfile from temp location to $ORACLE_HOME/dbs location by backing up exiting parameter file.

Note: if you have soft link then unlink it and no need to backup existing pfile because soft link pointed to different location of
pfile.

In our case we have soft link so we just unlined the pfile and copying temp pfile to $ORACLE_HOME/dbs location and adding
DB_FILE_NAME_CONVERT & LOG_FILE_NAME_CONVERT parameters and commenting RAC parameters.

Classification: GE Internal
crecindbd01a[oracle]_hfsdev1> pwd
/d001/backup/oracle/RITM1067269
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> cd $ORACLE_HOME/dbs
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> ls -ltr *hfsdev*
lrwxrwxrwx 1 oracle oinstall 45 May 20 08:51 inithfsdev1.ora ->
/d001/dba/oracle/hfsdev/pfile/inithfsdev1.ora
-rw-r----- 1 oracle oinstall 1536 Aug 11 00:45 orapwhfsdev1
-rw-rw---- 1 oracle asmdba 1544 Sep 18 07:20 hc_hfsdev1.dat
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> cat inithfsdev1.ora
SPFILE='+DATA/hfsdev/spfilehfsdev.ora'
crecindbd01a[oracle]_hfsdev1> unlink inithfsdev1.ora
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> ls -ltr *hfsdev*
-rw-r----- 1 oracle oinstall 1536 Aug 11 00:45 orapwhfsdev1
-rw-rw---- 1 oracle asmdba 1544 Sep 18 07:20 hc_hfsdev1.dat
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> cp /d001/backup/oracle/RITM1067269/pfilehfsdev1.ora .
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> ls -ltr *hfsdev*
-rw-r----- 1 oracle oinstall 1536 Aug 11 00:45 orapwhfsdev1
-rw-rw---- 1 oracle asmdba 1544 Sep 18 07:20 hc_hfsdev1.dat
-rw-r--r-- 1 oracle oinstall 926 Sep 18 08:07 inithfsdev1.ora
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> vi inithfsdev1.ora
hfsdev2.__db_cache_size=373293056
hfsdev1.__db_cache_size=335544320
hfsdev2.__java_pool_size=4194304
hfsdev1.__java_pool_size=12582912
hfsdev2.__large_pool_size=16777216
hfsdev1.__large_pool_size=16777216
hfsdev2.__pga_aggregate_target=268435456
hfsdev1.__pga_aggregate_target=268435456
hfsdev2.__sga_target=1073741824
hfsdev1.__sga_target=1073741824
hfsdev2.__shared_io_pool_size=0
hfsdev1.__shared_io_pool_size=0
hfsdev2.__shared_pool_size=666894336
hfsdev1.__shared_pool_size=687865856
hfsdev2.__streams_pool_size=0
hfsdev1.__streams_pool_size=8388608
*.audit_file_dest='/d001/product/oracle_base/admin/hfsdev/adump'
*.audit_trail='db'
*.cluster_database=FALSE
*.compatible='11.2.0.0.0'
*.control_files='+DATA/hfsdev/controlfile/control.ctl'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_domain=''
*.db_name='hfsdev'
*.db_unique_name='hfsdev'
*.diagnostic_dest='/d001/product/oracle_base'

Classification: GE Internal
*.dispatchers='(PROTOCOL=TCP) (SERVICE=hfsdevXDB)'
hfsdev1.instance_number=1
hfsdev2.instance_number=2
hfsdev1.instance_name=hfsdev1
hfsdev2.instance_name=hfsdev2
*.open_cursors=300
*.pga_aggregate_target=268435456
*.processes=300
*.recyclebin='off'
*.remote_listener='credbdev-scan.cloud.ge.com:1621'
*.remote_login_passwordfile='exclusive'
*.sessions=335
*.sga_target=1073741824
hfsdev2.thread=2
hfsdev1.thread=1
hfsdev2.undo_tablespace='UNDOTBS2'
hfsdev1.undo_tablespace='UNDOTBS1'
*.db_file_name_convert=('+DATA/hfsprd/', '+DATA/hfsdev/')
*.log_file_name_convert=('+DATA/hfsprd/', '+DATA/hfsdev/')
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>

Step-7: Perform database restore using RMAN duplicate command with SET UNTIL clause.

Now pfile setup completed and we can start the database in nomount state and now we are starting restore & recovery until
time. We have already copied prod backup to target server at the following location: /d001/backup/oracle/RITM1067269

Note: Verify RMAN L0 backup logfile on prod database and we can consider hot backup ending time is the until time to restore
and recover the database and in our environment once hot backup completed immediately it starts the archive backup so we
can use until time as before arch backup start time.

We are using RMAN 11gr2 feature duplicate target database backup location command to connect target as auxiliary database and below is
the RMAN script:

rman auxiliary /

RUN
{
allocate auxiliary channel CH1 device type DISK;
allocate auxiliary channel CH2 device type DISK;
allocate auxiliary channel CH3 device type DISK;
allocate auxiliary channel CH4 device type DISK;
allocate auxiliary channel CH5 device type DISK;
allocate auxiliary channel CH6 device type DISK;
allocate auxiliary channel CH7 device type DISK;
allocate auxiliary channel CH8 device type DISK;
set until time "TO_DATE('--/--/---- --:--:--', 'MM/DD/YYYY HH24:MI:SS')";
DUPLICATE TARGET DATABASE TO hfsdev BACKUP LOCATION '<rman_backup_path>';
}

Now we are starting RMAN duplication:

crecindbd01a[oracle]_hfsdev1> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Sep 18 08:08:56 2013

Copyright (c) 1982, 2011, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup nomount

Classification: GE Internal
ORACLE instance started.

Total System Global Area 1068937216 bytes


Fixed Size 2235208 bytes
Variable Size 285213880 bytes
Database Buffers 775946240 bytes
Redo Buffers 5541888 bytes
SQL>
SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit
Production
With the Partitioning, Real Application Clusters, Oracle Label Security, OLAP,
Data Mining and Real Application Testing options
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> rman auxiliary /

Recovery Manager: Release 11.2.0.3.0 - Production on Wed Sep 18 09:32:19 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

connected to auxiliary database: HFSDEV (not mounted)

RMAN> RUN
2> {
3> allocate auxiliary channel CH1 device type DISK;
4> allocate auxiliary channel CH2 device type DISK;
5> allocate auxiliary channel CH3 device type DISK;
6> allocate auxiliary channel CH4 device type DISK;
7> allocate auxiliary channel CH5 device type DISK;
8> allocate auxiliary channel CH6 device type DISK;
9> allocate auxiliary channel CH7 device type DISK;
10> allocate auxiliary channel CH8 device type DISK;
11> set until time "TO_DATE('09/18/2013 05:06:00', 'MM/DD/YYYY HH24:MI:SS’)";
12> DUPLICATE TARGET DATABASE TO hfsdev BACKUP LOCATION '/d001/backup/oracle/RITM1067269/';
13> }

allocated channel: CH1


channel CH1: SID=2 device type=DISK

allocated channel: CH2


channel CH2: SID=32 device type=DISK

allocated channel: CH3


channel CH3: SID=63 device type=DISK

allocated channel: CH4


channel CH4: SID=93 device type=DISK

allocated channel: CH5


channel CH5: SID=123 device type=DISK

allocated channel: CH6


channel CH6: SID=153 device type=DISK

allocated channel: CH7


channel CH7: SID=183 device type=DISK

allocated channel: CH8


channel CH8: SID=213 device type=DISK

Classification: GE Internal
executing command: SET until clause

Starting Duplicate Db at 18-SEP-13

contents of Memory Script:


{
sql clone "create spfile from memory";
}
executing Memory Script

sql statement: create spfile from memory

contents of Memory Script:


{
shutdown clone immediate;
startup clone nomount;
}
executing Memory Script

Oracle instance shut down

connected to auxiliary database (not started)


Oracle instance started

Total System Global Area 1068937216 bytes

Fixed Size 2235208 bytes


Variable Size 289408184 bytes
Database Buffers 771751936 bytes
Redo Buffers 5541888 bytes
allocated channel: CH1
channel CH1: SID=2 device type=DISK
allocated channel: CH2
channel CH2: SID=32 device type=DISK
allocated channel: CH3
channel CH3: SID=63 device type=DISK
allocated channel: CH4
channel CH4: SID=123 device type=DISK
allocated channel: CH5
channel CH5: SID=93 device type=DISK
allocated channel: CH6
channel CH6: SID=153 device type=DISK
allocated channel: CH7
channel CH7: SID=183 device type=DISK
allocated channel: CH8
channel CH8: SID=213 device type=DISK

contents of Memory Script:


{
sql clone "alter system set control_files =
''+DATA/hfsdev/controlfile/current.457.826450407'' comment=
''Set by RMAN'' scope=spfile";
sql clone "alter system set db_name =
''HFSPRD'' comment=
''Modified by RMAN duplicate'' scope=spfile";
sql clone "alter system set db_unique_name =
''HFSDEV'' comment=
''Modified by RMAN duplicate'' scope=spfile";
shutdown clone immediate;
startup clone force nomount
restore clone primary controlfile from
'/d001/backup/oracle/RITM1067269/HFSPRD_HOT_09182013_1_1046_826434260';
alter clone database mount;

Classification: GE Internal
}
executing Memory Script

sql statement: alter system set control_files =


''+DATA/hfsdev/controlfile/current.457.826450407'' comment= ''Set by RMAN''
scope=spfile

sql statement: alter system set db_name = ''HFSPRD'' comment= ''Modified by RMAN
duplicate'' scope=spfile

sql statement: alter system set db_unique_name = ''HFSDEV'' comment= ''Modified by


RMAN duplicate'' scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area 1068937216 bytes

Fixed Size 2235208 bytes


Variable Size 289408184 bytes
Database Buffers 771751936 bytes
Redo Buffers 5541888 bytes
allocated channel: CH1
channel CH1: SID=2 device type=DISK
allocated channel: CH2
channel CH2: SID=32 device type=DISK
allocated channel: CH3
channel CH3: SID=63 device type=DISK
allocated channel: CH4
channel CH4: SID=123 device type=DISK
allocated channel: CH5
channel CH5: SID=93 device type=DISK
allocated channel: CH6
channel CH6: SID=153 device type=DISK
allocated channel: CH7
channel CH7: SID=183 device type=DISK
allocated channel: CH8
channel CH8: SID=213 device type=DISK

Starting restore at 18-SEP-13

channel CH2: skipped, AUTOBACKUP already found


channel CH3: skipped, AUTOBACKUP already found
channel CH4: skipped, AUTOBACKUP already found
channel CH5: skipped, AUTOBACKUP already found
channel CH6: skipped, AUTOBACKUP already found
channel CH7: skipped, AUTOBACKUP already found
channel CH8: skipped, AUTOBACKUP already found
channel CH1: restoring control file
channel CH1: restore complete, elapsed time: 00:00:09
output file name=+DATA/hfsdev/controlfile/current.457.826450407
Finished restore at 18-SEP-13

database mounted
RMAN-05529: WARNING: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed
to disk group only.

contents of Memory Script:


{
set until scn 13002991450198;
set newname for datafile 1 to
"+data";.

Classification: GE Internal
.
.
.
.
.
.
.
.
.
.
.
.
.
input datafile copy RECID=18 STAMP=826450626 file
name=+DATA/hfsdev/datafile/atlas2_index04.474.826450443
datafile 20 switched to datafile copy
input datafile copy RECID=19 STAMP=826450626 file
name=+DATA/hfsdev/datafile/atlas2_data04.475.826450443
datafile 21 switched to datafile copy
input datafile copy RECID=20 STAMP=826450626 file
name=+DATA/hfsdev/datafile/atlas2_temp.460.826450439
datafile 22 switched to datafile copy
input datafile copy RECID=21 STAMP=826450626 file
name=+DATA/hfsdev/datafile/atlas2_data02.476.826450443
Reenabling controlfile options for auxiliary database
Executing: alter database enable block change tracking using file
'+DATA/hfsdev/ctf/block_change.ctf'
ORACLE error from auxiliary database: ORA-19751: could not create the change tracking
file
ORA-19750: change tracking file: '+DATA/hfsdev/ctf/block_change.ctf'
ORA-17502: ksfdcre:4 Failed to create file +DATA/hfsdev/ctf/block_change.ctf
ORA-15173: entry 'ctf' does not exist in directory 'hfsdev'

Ignoring error, reattempt command after duplicate finishes

contents of Memory Script:


{
Alter clone database open resetlogs;
}
executing Memory Script

database opened
Finished Duplicate Db at 18-SEP-13
released channel: CH1
released channel: CH2
released channel: CH3
released channel: CH4
released channel: CH5
released channel: CH6
released channel: CH7
released channel: CH8

RMAN> exit

Recovery Manager complete.


crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Sep 18 10:46:14 2013

Classification: GE Internal
Copyright (c) 1982, 2011, Oracle. All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle
Label Security,
OLAP, Data Mining and Real Application Testing options

SQL> select dbid,name,open_mode from v$database;

DBID NAME OPEN_MODE


---------- --------- --------------------
3914066368 HFSDEV READ WRITE

SQL>
SQL> alter database flashback off;

Database altered.

SQL> alter database disable block change tracking;


alter database disable block change tracking
*
ERROR at line 1:
ORA-19759: block change tracking is not enabled

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label
Security,
OLAP, Data Mining and Real Application Testing options
crecindbd01a[oracle]_hfsdev1>

Step-8: Once database opened update RAC parameters and controlfile path and create spfile in shared storage (ASM) to start
the instances on available RAC nodes.

crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> vi inithfsdev1.ora
hfsdev2.__db_cache_size=373293056
hfsdev1.__db_cache_size=335544320
hfsdev2.__java_pool_size=4194304
hfsdev1.__java_pool_size=12582912
hfsdev2.__large_pool_size=16777216
hfsdev1.__large_pool_size=16777216
hfsdev2.__pga_aggregate_target=268435456
hfsdev1.__pga_aggregate_target=268435456
hfsdev2.__sga_target=1073741824
hfsdev1.__sga_target=1073741824
hfsdev2.__shared_io_pool_size=0
hfsdev1.__shared_io_pool_size=0
hfsdev2.__shared_pool_size=666894336
hfsdev1.__shared_pool_size=687865856
hfsdev2.__streams_pool_size=0
hfsdev1.__streams_pool_size=8388608
*.audit_file_dest='/d001/product/oracle_base/admin/hfsdev/adump'
*.audit_trail='db'
*.cluster_database=FALSE
*.compatible='11.2.0.0.0'
*.control_files='+DATA/hfsdev/controlfile/current.457.826450407'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_domain=''
*.db_name='hfsdev'
*.db_unique_name='hfsdev'

Classification: GE Internal
*.diagnostic_dest='/d001/product/oracle_base'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=hfsdevXDB)'
hfsdev1.instance_number=1
hfsdev2.instance_number=2
hfsdev1.instance_name=hfsdev1
hfsdev2.instance_name=hfsdev2
*.open_cursors=300
*.pga_aggregate_target=268435456
*.processes=300
*.recyclebin='off'
*.remote_listener='credbdev-scan.cloud.ge.com:1621'
*.remote_login_passwordfile='exclusive'
*.sessions=335
*.sga_target=1073741824
hfsdev2.thread=2
hfsdev1.thread=1
hfsdev2.undo_tablespace='UNDOTBS2'
hfsdev1.undo_tablespace='UNDOTBS1'
*.db_file_name_convert=('+DATA/hfsprd/', '+DATA/hfsdev/')
*.log_file_name_convert=('+DATA/hfsprd/', '+DATA/hfsdev/')
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
recindbd01a[oracle]_hfsdev1> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Sep 18 10:56:15 2013

Copyright (c) 1982, 2011, Oracle. All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle
Label Security,
OLAP, Data Mining and Real Application Testing options

SQL> shut immediate


Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit
Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle
Label Security,
OLAP, Data Mining and Real Application Testing options
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Sep 18 10:56:41 2013

Copyright (c) 1982, 2011, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 1068937216 bytes

Classification: GE Internal
Fixed Size 2235208 bytes
Variable Size 343934136 bytes
Database Buffers 717225984 bytes
Redo Buffers 5541888 bytes
Database mounted.
Database opened.
SQL>
SQL>
SQL> sho parameter pfile

NAME TYPE VALUE


------------------------------------ ----------- ------------------------------
spfile string
SQL>
SQL>
SQL> create spfile='+DATA/hfsdev/parameterfile/spfilehfsdev.ora' from pfile;

File created.

SQL> shut immediate


Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit
Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle
Label Security,
OLAP, Data Mining and Real Application Testing options
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> pwd
/d001/product/11.2.0/db
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> ls -ltr *hfsdev1*
-rw-r----- 1 oracle oinstall 1536 Aug 11 00:45 orapwhfsdev1
-rw-rw---- 1 oracle asmdba 1544 Sep 18 09:37 hc_hfsdev1.dat
-rw-r--r-- 1 oracle oinstall 1311 Sep 18 10:53 inithfsdev1.ora
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> mv inithfsdev1.ora inithfsdev1.ora_bkp_18sept2013
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> cat /d001/dba/oracle/hfsdev/pfile/inithfsdev1.ora
SPFILE='+DATA/hfsdev/spfilehfsdev.ora'
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> # To check database configuration settings like pfile and ORACLE_HOME etc…
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> srvctl config database -d hfsdev -a
Database unique name: hfsdev
Database name: hfsdev
Oracle home: /d001/product/11.2.0/db
Oracle user: oracle
Spfile: +DATA/hfsdev/parameterfile/spfilehfsdev.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: hfsdev
Database instances: hfsdev1,hfsdev2
Disk Groups: DATA
Mount point paths:
Services:

Classification: GE Internal
Type: RAC
Database is enabled
Database is administrator managed
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> Now creating soft link for pfile from other location to ORACLE_HOME/dbs
location
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> ln -s /d001/dba/oracle/hfsdev/pfile/inithfsdev1.ora .
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> ls -ltr *hfsdev*
-rw-r----- 1 oracle oinstall 1536 Aug 11 00:45 orapwhfsdev1
-rw-r--r-- 1 oracle oinstall 958 Sep 18 10:56 inithfsdev1.ora_old
-rw-rw---- 1 oracle asmdba 1544 Sep 18 11:00 hc_hfsdev1.dat
lrwxrwxrwx 1 oracle oinstall 45 Sep 18 11:03 inithfsdev1.ora ->
/d001/dba/oracle/hfsdev/pfile/inithfsdev1.ora
crecindbd01a[oracle]_hfsdev1>

Finally bringing up 2 instances on 2 nodes:

crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> srvctl status database -d hfsdev -v
Instance hfsdev1 is not running on node crecindbd01a
Instance hfsdev2 is not running on node crecindbd01b
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> srvctl start database -d hfsdev
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> srvctl status database -d hfsdev -v
Instance hfsdev1 is running on node crecindbd01a. Instance status: Open.
Instance hfsdev2 is running on node crecindbd01b. Instance status: Open.
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>

In our environments Non-production databases are running in No Archive log mode so we are disabling ARCH mode and once it
id done we restart the database:

crecindbd01a[oracle]_hfsdev1> srvctl stop database -d hfsdev


crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Sep 18 11:16:37 2013

Copyright (c) 1982, 2011, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup mount


ORACLE instance started.

Total System Global Area 1068937216 bytes


Fixed Size 2235208 bytes
Variable Size 348128440 bytes
Database Buffers 713031680 bytes
Redo Buffers 5541888 bytes
Database mounted.

Classification: GE Internal
SQL>
SQL>
SQL> alter database noarchivelog;

Database altered.

SQL> archive log list


Database log mode No Archive Mode
Automatic archival Disabled
Archive destination /d001/product/11.2.0/db/dbs/arch
Oldest online log sequence 1
Current log sequence 3
SQL>
SQL>
SQL>
SQL> shut immediate
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit
Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle
Label Security,
OLAP, Data Mining and Real Application Testing options
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> srvctl start database -d hfsdev
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1> srvctl status database -d hfsdev -v
Instance hfsdev1 is running on node crecindbd01a. Instance status: Open.
Instance hfsdev2 is running on node crecindbd01b. Instance status: Open.
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>
crecindbd01a[oracle]_hfsdev1>

Step-9: finally Reset user passwords and db links backup from step-1 and release the database for application access.

Classification: GE Internal

You might also like