Thursday, June 5, 2014

RMAN DUPLICATE ON RAC DATABASE USING ACTIVE DATABASE FROM ASM TO ASM ON THE SAME HOSTS

1.To perform the rman duplicate using active database on two node RAC database from asm to asm on the same hosts,the target database and the auxiliary database need to be defined
Target and auxiliary database name :-
 ====================================
 Target database name: orcl
Auxiliary database name: orcldp
 RAC Nodes:-
 =============
Node 1: ol6-112-rac1
Node 2: ol6-112-rac2

2.Dedicated listener configuration with listener name cv_duplicate for the auxiliary database instance orcldp1 needs to be configured in the file listener.ora present in $ORACLE_HOME/network/admin and started.
CV_DUPLICATE=
(DESCRIPTION_LIST =
        (DESCRIPTION =
        (ADDRESS = (PROTOCOL = IPC)(KEY =  EXTPROC1521))
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.111)(PORT = 1524))
        )
)
SID_LIST_CV_DUPLICATE=
(SID_LIST=
        (SID_DESC=
        (ORACLE_HOME=/u01/app/orcl/oracle/product/11.2.0.3/db_1)
        (SID_NAME=orcldp1)
        )
 )

3.Start the dedicated listener cv_duplicate configured with the auxiliary database using command
lsnrctl start cv_duplicate
[oracle@ol6-112-rac1 admin]$ lsnrctl start cv_duplicate

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 05-JUN-2014 14:49:19

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

Starting /u01/app/orcl/oracle/product/11.2.0.3/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.3.0 - Production
System parameter file is /u01/app/orcl/oracle/product/11.2.0.3/db_1/network/admin/listener.ora
Log messages written to /u01/app/orcl/oracle/diag/tnslsnr/ol6-112-rac1/cv_duplicate/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.111)(PORT=1524)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     cv_duplicate
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                05-JUN-2014 14:49:41
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/orcl/oracle/product/11.2.0.3/db_1/network/admin/listener.ora
Listener Log File         /u01/app/orcl/oracle/diag/tnslsnr/ol6-112-rac1/cv_duplicate/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.111)(PORT=1524)))
Services Summary...
Service "orcldp1" has 1 instance(s).
  Instance "orcldp1", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

4.Make an entry in the tnsnames.ora file present in the $ORACLE_HOME/network/admin directory with the service details for the orcldp1 instance.
orcldp1  =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ol6-112-rac1)(PORT = 1524))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcldp1)
    )
  )


5.Tnsping the service name of the orcldp1 instance.

[oracle@ol6-112-rac1 admin]$ tnsping orcldp1

TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 05-JUN-2014 14:54:20

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

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ol6-112-rac1)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcldp1)))
OK (0 msec)

6.Create the password file in the $ORACLE_HOEM/dbs directory for the orcldp1 instance, the password should be same as the target database sys password.
[oracle@ol6-112-rac1 dbs]$ orapwd file=orapworcldp1 entries=5 password=sys123
[oracle@ol6-112-rac1 dbs]$ ls -ltr orapworcldp1
-rw-r----- 1 oracle oinstall 2048 Jun  5 14:56 orapworcldp1

7.Create the pfile in the $ORACLE_HOME/dbs/ directory for the orcldp1 instance with the parameter db_name
[oracle@ol6-112-rac1 dbs]$ cat initorcldp1.ora
db_name=orcldp

8.Start the auxiliary instance orcldp1 in nomount mode using the pfile
[oracle@ol6-112-rac1 dbs]$ export ORACLE_SID=orcldp1
[oracle@ol6-112-rac1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jun 5 15:03:03 2014

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

Connected to an idle instance.

SQL> define
DEFINE _DATE           = "05-JUN-14" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "orcldp1" (CHAR)
DEFINE _USER           = "SYS" (CHAR)
DEFINE _PRIVILEGE      = "AS SYSDBA" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1102000300" (CHAR)
DEFINE _EDITOR         = "ed" (CHAR)
DEFINE _O_VERSION      = "" (CHAR)
DEFINE _O_RELEASE      = "" (CHAR)
SQL> startup nomount pfile=$ORACLE_HOME/dbs/initorcldp1.ora
ORACLE instance started.

Total System Global Area  238034944 bytes
Fixed Size                  2227136 bytes
Variable Size             180356160 bytes
Database Buffers           50331648 bytes
Redo Buffers                5120000 bytes
SQL>

9.Create the rman command file for duplicate database file name rman_duplicate.cmd
duplicate target database to orcldp
from active database
spfile
set db_name='orcldp'
set instance_number='1'
set control_files='+DATA','+DATA'
set cluster_database='false'
set log_file_name_convert='+DATA/orcl/','+DATA/orcldp/'
set dispatchers='(PROTOCOL=TCP) (SERVICE=orcldpXDB)'
set audit_file_dest='/u01/app/orcl/oracle/admin/orcldp/adump'
db_file_name_convert='+DATA/orcl/','+DATA/orcldp/';

10.make the audit_file_dest directory in both the nodes if it is not created
[oracle@ol6-112-rac1 dbs]$ mkdir -p /u01/app/orcl/oracle/admin/orcldp/adump

10.Connect to the target database and the auxiliary database from the rman command prompt.The target database and the auxiliary database must be connected using net service authentication
[oracle@ol6-112-rac1 rman]$ rman target="sys/sys123@orcl" auxiliary="sys/sys123@orcldp1" |tee -a rman_duplicate_orcldp.log

Recovery Manager: Release 11.2.0.3.0 - Production on Thu Jun 5 15:24:18 2014

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

connected to target database: ORCL (DBID=1374849049)
connected to auxiliary database: ORCLDP (not mounted)

11.Run the command file with duplicate target database command

Recovery Manager: Release 11.2.0.3.0 - Production on Thu Jun 5 15:26:00 2014

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

connected to target database: ORCL (DBID=1374849049)
connected to auxiliary database: ORCLDP (not mounted)

RMAN> 
rman_duplicate.cmd
rman_duplicate_orcldp.log
host command complete

RMAN> 
RMAN> duplicate target database to orcldp
2> from active database
3> spfile
4> set db_name='orcldp'
5> set instance_number='1'
6> set control_files='+DATA','+DATA'
7> set cluster_database='false'
8> set log_file_name_convert='+DATA/orcl/','+DATA/orcldp/'
9> set dispatchers='(PROTOCOL=TCP) (SERVICE=orcldpXDB)'
10> set audit_file_dest='/u01/app/orcl/oracle/admin/orcldp/adump'
11> db_file_name_convert='+DATA/orcl/','+DATA/orcldp/';
Starting Duplicate Db at 05-JUN-14
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=27 device type=DISK
allocated channel: ORA_AUX_DISK_2
channel ORA_AUX_DISK_2: SID=28 device type=DISK
allocated channel: ORA_AUX_DISK_3
channel ORA_AUX_DISK_3: SID=29 device type=DISK
allocated channel: ORA_AUX_DISK_4
channel ORA_AUX_DISK_4: SID=30 device type=DISK
allocated channel: ORA_AUX_DISK_5
channel ORA_AUX_DISK_5: SID=31 device type=DISK

contents of Memory Script:
{
   backup as copy reuse
   targetfile  '+DATA/orcl/spfileorcl.ora' auxiliary format 
 '/u01/app/orcl/oracle/product/11.2.0.3/db_1/dbs/spfileorcldp1.ora'   ;
   sql clone "alter system set spfile= ''/u01/app/orcl/oracle/product/11.2.0.3/db_1/dbs/spfileorcldp1.ora''";
}
executing Memory Script

Starting backup at 05-JUN-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=55 instance=orcl1 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=29 instance=orcl1 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=47 instance=orcl1 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=64 instance=orcl1 device type=DISK
allocated channel: ORA_DISK_5
channel ORA_DISK_5: SID=66 instance=orcl1 device type=DISK
Finished backup at 05-JUN-14

sql statement: alter system set spfile= ''/u01/app/orcl/oracle/product/11.2.0.3/db_1/dbs/spfileorcldp1.ora''

contents of Memory Script:
{
   sql clone "alter system set  db_name = 
 ''ORCLDP'' comment=
 ''duplicate'' scope=spfile";
   sql clone "alter system set  db_name = 
 ''orcldp'' comment=
 '''' scope=spfile";
   sql clone "alter system set  instance_number = 
 1 comment=
 '''' scope=spfile";
   sql clone "alter system set  control_files = 
 ''+DATA'', ''+DATA'' comment=
 '''' scope=spfile";
   sql clone "alter system set  cluster_database = 
 false comment=
 '''' scope=spfile";
   sql clone "alter system set  log_file_name_convert = 
 ''+DATA/orcl/'', ''+DATA/orcldp/'' comment=
 '''' scope=spfile";
   sql clone "alter system set  dispatchers = 
 ''(PROTOCOL=TCP) (SERVICE=orcldpXDB)'' comment=
 '''' scope=spfile";
   sql clone "alter system set  audit_file_dest = 
 ''/u01/app/orcl/oracle/admin/orcldp/adump'' comment=
 '''' scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

sql statement: alter system set  db_name =  ''ORCLDP'' comment= ''duplicate'' scope=spfile

sql statement: alter system set  db_name =  ''orcldp'' comment= '''' scope=spfile

sql statement: alter system set  instance_number =  1 comment= '''' scope=spfile

sql statement: alter system set  control_files =  ''+DATA'', ''+DATA'' comment= '''' scope=spfile

sql statement: alter system set  cluster_database =  false comment= '''' scope=spfile

sql statement: alter system set  log_file_name_convert =  ''+DATA/orcl/'', ''+DATA/orcldp/'' comment= '''' scope=spfile

sql statement: alter system set  dispatchers =  ''(PROTOCOL=TCP) (SERVICE=orcldpXDB)'' comment= '''' scope=spfile

sql statement: alter system set  audit_file_dest =  ''/u01/app/orcl/oracle/admin/orcldp/adump'' comment= '''' scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area     275578880 bytes

Fixed Size                     2227584 bytes
Variable Size                113246848 bytes
Database Buffers             155189248 bytes
Redo Buffers                   4915200 bytes

contents of Memory Script:
{
   sql clone "alter system set  control_files = 
  ''+DATA/orcldp/controlfile/current.388.849454021'', ''+DATA/orcldp/controlfile/current.370.849454021'' comment=
 ''Set by RMAN'' scope=spfile";
   sql clone "alter system set  db_name = 
 ''ORCL'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name = 
 ''ORCLDP'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   shutdown clone immediate;
   startup clone force nomount
   backup as copy current controlfile auxiliary format  '+DATA/orcldp/controlfile/current.371.849454021';
   restore clone controlfile to  '+DATA/orcldp/controlfile/current.385.849454021' from 
 '+DATA/orcldp/controlfile/current.371.849454021';
   sql clone "alter system set  control_files = 
  ''+DATA/orcldp/controlfile/current.371.849454021'', ''+DATA/orcldp/controlfile/current.385.849454021'' comment=
 ''Set by RMAN'' scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
   alter clone database mount;
}
executing Memory Script

sql statement: alter system set  control_files =   ''+DATA/orcldp/controlfile/current.388.849454021'', ''+DATA/orcldp/controlfile/current.370.849454021'' comment= ''Set by RMAN'' scope=spfile

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

sql statement: alter system set  db_unique_name =  ''ORCLDP'' comment= ''Modified by RMAN duplicate'' scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area     275578880 bytes

Fixed Size                     2227584 bytes
Variable Size                117441152 bytes
Database Buffers             150994944 bytes
Redo Buffers                   4915200 bytes

Starting backup at 05-JUN-14
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
channel ORA_DISK_1: starting datafile copy
copying current control file
output file name=/u01/app/orcl/oracle/product/11.2.0.3/db_1/dbs/snapcf_orcl1.f tag=TAG20140605T152720 RECID=26 STAMP=849454042
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
Finished backup at 05-JUN-14

Starting restore at 05-JUN-14
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=31 device type=DISK
allocated channel: ORA_AUX_DISK_2
channel ORA_AUX_DISK_2: SID=32 device type=DISK
allocated channel: ORA_AUX_DISK_3
channel ORA_AUX_DISK_3: SID=33 device type=DISK
allocated channel: ORA_AUX_DISK_4
channel ORA_AUX_DISK_4: SID=34 device type=DISK
allocated channel: ORA_AUX_DISK_5
channel ORA_AUX_DISK_5: SID=35 device type=DISK

channel ORA_AUX_DISK_2: skipped, AUTOBACKUP already found
channel ORA_AUX_DISK_3: skipped, AUTOBACKUP already found
channel ORA_AUX_DISK_4: skipped, AUTOBACKUP already found
channel ORA_AUX_DISK_5: skipped, AUTOBACKUP already found
channel ORA_AUX_DISK_1: copied control file copy
Finished restore at 05-JUN-14

sql statement: alter system set  control_files =   ''+DATA/orcldp/controlfile/current.371.849454021'', ''+DATA/orcldp/controlfile/current.385.849454021'' comment= ''Set by RMAN'' scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area     275578880 bytes

Fixed Size                     2227584 bytes
Variable Size                117441152 bytes
Database Buffers             150994944 bytes
Redo Buffers                   4915200 bytes

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 newname for datafile  1 to 
 "+data";
   set newname for datafile  2 to 
 "+data";
   set newname for datafile  3 to 
 "+data";
   set newname for datafile  4 to 
 "+data";
   set newname for datafile  5 to 
 "+data";
   backup as copy reuse
   datafile  1 auxiliary format 
 "+data"   datafile 
 2 auxiliary format 
 "+data"   datafile 
 3 auxiliary format 
 "+data"   datafile 
 4 auxiliary format 
 "+data"   datafile 
 5 auxiliary format 
 "+data"   ;
   sql 'alter system archive log current';
}
executing Memory Script

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting backup at 05-JUN-14
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=+DATA/orcl/datafile/system.258.849281819
channel ORA_DISK_2: starting datafile copy
input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.261.849281819
channel ORA_DISK_3: starting datafile copy
input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.263.849281819
channel ORA_DISK_4: starting datafile copy
input datafile file number=00005 name=+DATA/orcl/datafile/undotbs2.259.849281819
channel ORA_DISK_5: starting datafile copy
input datafile file number=00004 name=+DATA/orcl/datafile/users.264.849281819
output file name=+DATA/orcldp/datafile/users.377.849454089 tag=TAG20140605T152807
channel ORA_DISK_5: datafile copy complete, elapsed time: 00:00:15
output file name=+DATA/orcldp/datafile/undotbs2.378.849454089 tag=TAG20140605T152807
channel ORA_DISK_4: datafile copy complete, elapsed time: 00:00:26
output file name=+DATA/orcldp/datafile/undotbs1.379.849454089 tag=TAG20140605T152807
channel ORA_DISK_3: datafile copy complete, elapsed time: 00:01:36
output file name=+DATA/orcldp/datafile/sysaux.384.849454089 tag=TAG20140605T152807
channel ORA_DISK_2: datafile copy complete, elapsed time: 00:03:06
output file name=+DATA/orcldp/datafile/system.380.849454089 tag=TAG20140605T152807
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:03:16
Finished backup at 05-JUN-14

sql statement: alter system archive log current

contents of Memory Script:
{
   backup as copy reuse
   archivelog like  "+DATA/orcl/archivelog/2014_06_05/thread_1_seq_10.383.849454285" auxiliary format 
 "+DATA"   ;
   catalog clone start with  "+DATA";
   switch clone datafile all;
}
executing Memory Script

Starting backup at 05-JUN-14
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
channel ORA_DISK_1: starting archived log copy
input archived log thread=1 sequence=10 RECID=77 STAMP=849454285
output file name=+DATA/orcldp/archivelog/2014_06_05/thread_1_seq_10.382.849454287 RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
Finished backup at 05-JUN-14

searching for all files that match the pattern +DATA

List of Files Unknown to the Database
=====================================
File Name: +data/ORCLDP/ARCHIVELOG/2014_06_05/thread_1_seq_10.382.849454287
File Name: +data/ORCLDP/DATAFILE/SYSTEM.380.849454089
File Name: +data/ORCLDP/DATAFILE/UNDOTBS1.379.849454089
File Name: +data/ORCLDP/DATAFILE/UNDOTBS2.378.849454089
File Name: +data/ORCLDP/DATAFILE/USERS.377.849454089
File Name: +data/ORCLDP/DATAFILE/SYSAUX.384.849454089
File Name: +data/ORCLDP/CONTROLFILE/Current.388.849454021
File Name: +data/ORCLDP/CONTROLFILE/Current.370.849454021
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_1_seq_8.376.849428751
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_1_seq_1.387.849438163
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_1_seq_2.389.849443519
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_1_seq_2.390.849443581
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_2_seq_1.391.849443723
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_2_seq_2.392.849443733
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_1_seq_3.393.849443749
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_2_seq_3.394.849443749
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_1_seq_4.395.849444005
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_1_seq_4.396.849444181
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_2_seq_4.397.849444201
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_2_seq_5.398.849444219
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_1_seq_5.399.849444223
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_2_seq_6.400.849444225
File Name: +data/RMANDP/CONTROLFILE/Current.366.849428519
File Name: +data/RMANDP/CONTROLFILE/Current.365.849428519
File Name: +data/ORCL/spfileorcl.ora
File Name: +data/ORCL/PARAMETERFILE/spfile.288.849286189
File Name: +data/ORCL/TEMPFILE/TEMP.336.849374879
File Name: +data/ORCL/ONLINELOG/group_1.327.849374779
File Name: +data/ORCL/ONLINELOG/group_1.326.849374783
File Name: +data/ORCL/ONLINELOG/group_2.338.849374787
File Name: +data/ORCL/ONLINELOG/group_2.337.849374791
File Name: +data/ORCL/ONLINELOG/group_3.341.849378271
File Name: +data/ORCL/ONLINELOG/group_3.342.849378289
File Name: +data/ORCL/ONLINELOG/group_4.343.849378293
File Name: +data/ORCL/ONLINELOG/group_4.344.849378297
File Name: +data/ORCL/AUTOBACKUP/2014_06_04/s_849350745.319.849350751
File Name: +data/ORCL/AUTOBACKUP/2014_06_04/s_849352699.325.849352705
File Name: +data/ORCL/DATAFILE/SYSTEM.332.849374461
File Name: +data/ORCL/DATAFILE/SYSAUX.333.849374463
File Name: +data/ORCL/DATAFILE/UNDOTBS1.334.849374463
File Name: +data/ORCL/DATAFILE/USERS.329.849374463
File Name: +data/ORCL/DATAFILE/EXAMPLE.339.849374929
File Name: +data/ORCL/DATAFILE/UNDOTBS2.340.849376549
File Name: +data/ORCL/ARCHIVELOG/2014_06_05/thread_1_seq_10.383.849454285
File Name: +data/ORCL/BACKUPSET/2014_06_04/annnf0_TAG20140604T183923_0.348.849379165
File Name: +data/ORCL/BACKUPSET/2014_06_04/nnndf0_TAG20140604T183942_0.349.849379185
File Name: +data/ORCL/BACKUPSET/2014_06_04/ncsnf0_TAG20140604T183942_0.350.849379581
File Name: +data/ORCL/BACKUPSET/2014_06_04/annnf0_TAG20140604T184705_0.352.849379641
File Name: +data/ORCL/CONTROLFILE/Current.330.849374769
File Name: +data/ORCL/CONTROLFILE/Current.328.849374771
File Name: +data/cluster10/OCRFILE/REGISTRY.255.849273351
File Name: +data/cluster10/ASMPARAMETERFILE/REGISTRY.253.849270757
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: +data/ORCLDP/ARCHIVELOG/2014_06_05/thread_1_seq_10.382.849454287
File Name: +data/ORCLDP/DATAFILE/SYSTEM.380.849454089
File Name: +data/ORCLDP/DATAFILE/UNDOTBS1.379.849454089
File Name: +data/ORCLDP/DATAFILE/UNDOTBS2.378.849454089
File Name: +data/ORCLDP/DATAFILE/USERS.377.849454089
File Name: +data/ORCLDP/DATAFILE/SYSAUX.384.849454089
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_1_seq_8.376.849428751
File Name: +data/ORCL/AUTOBACKUP/2014_06_04/s_849350745.319.849350751
File Name: +data/ORCL/AUTOBACKUP/2014_06_04/s_849352699.325.849352705
File Name: +data/ORCL/ARCHIVELOG/2014_06_05/thread_1_seq_10.383.849454285

List of Files Which Where Not Cataloged
=======================================
File Name: +data/ORCLDP/CONTROLFILE/Current.388.849454021
  RMAN-07517: Reason: The file header is corrupted
File Name: +data/ORCLDP/CONTROLFILE/Current.370.849454021
  RMAN-07517: Reason: The file header is corrupted
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_1_seq_1.387.849438163
  RMAN-07518: Reason: Foreign database file DBID: 62200631  Database Name: RMANDP
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_1_seq_2.389.849443519
  RMAN-07518: Reason: Foreign database file DBID: 62200631  Database Name: RMANDP
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_1_seq_2.390.849443581
  RMAN-07518: Reason: Foreign database file DBID: 62200631  Database Name: RMANDP
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_2_seq_1.391.849443723
  RMAN-07518: Reason: Foreign database file DBID: 62200631  Database Name: RMANDP
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_2_seq_2.392.849443733
  RMAN-07518: Reason: Foreign database file DBID: 62200631  Database Name: RMANDP
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_1_seq_3.393.849443749
  RMAN-07518: Reason: Foreign database file DBID: 62200631  Database Name: RMANDP
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_2_seq_3.394.849443749
  RMAN-07518: Reason: Foreign database file DBID: 62200631  Database Name: RMANDP
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_1_seq_4.395.849444005
  RMAN-07518: Reason: Foreign database file DBID: 62200631  Database Name: RMANDP
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_1_seq_4.396.849444181
  RMAN-07518: Reason: Foreign database file DBID: 62200631  Database Name: RMANDP
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_2_seq_4.397.849444201
  RMAN-07518: Reason: Foreign database file DBID: 62200631  Database Name: RMANDP
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_2_seq_5.398.849444219
  RMAN-07518: Reason: Foreign database file DBID: 62200631  Database Name: RMANDP
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_1_seq_5.399.849444223
  RMAN-07518: Reason: Foreign database file DBID: 62200631  Database Name: RMANDP
File Name: +data/RMANDP/ARCHIVELOG/2014_06_05/thread_2_seq_6.400.849444225
  RMAN-07518: Reason: Foreign database file DBID: 62200631  Database Name: RMANDP
File Name: +data/RMANDP/CONTROLFILE/Current.366.849428519
  RMAN-07517: Reason: The file header is corrupted
File Name: +data/RMANDP/CONTROLFILE/Current.365.849428519
  RMAN-07517: Reason: The file header is corrupted
File Name: +data/ORCL/spfileorcl.ora
  RMAN-07518: Reason: Foreign database file DBID: 0  Database Name: 
File Name: +data/ORCL/PARAMETERFILE/spfile.288.849286189
  RMAN-07518: Reason: Foreign database file DBID: 0  Database Name: 
File Name: +data/ORCL/TEMPFILE/TEMP.336.849374879
  RMAN-07518: Reason: Foreign database file DBID: 1377155504  Database Name: ORCL
File Name: +data/ORCL/ONLINELOG/group_1.327.849374779
  RMAN-07518: Reason: Foreign database file DBID: 1377155504  Database Name: ORCL
File Name: +data/ORCL/ONLINELOG/group_1.326.849374783
  RMAN-07518: Reason: Foreign database file DBID: 1377155504  Database Name: ORCL
File Name: +data/ORCL/ONLINELOG/group_2.338.849374787
  RMAN-07518: Reason: Foreign database file DBID: 1377155504  Database Name: ORCL
File Name: +data/ORCL/ONLINELOG/group_2.337.849374791
  RMAN-07518: Reason: Foreign database file DBID: 1377155504  Database Name: ORCL
File Name: +data/ORCL/ONLINELOG/group_3.341.849378271
  RMAN-07518: Reason: Foreign database file DBID: 1377155504  Database Name: ORCL
File Name: +data/ORCL/ONLINELOG/group_3.342.849378289
  RMAN-07518: Reason: Foreign database file DBID: 1377155504  Database Name: ORCL
File Name: +data/ORCL/ONLINELOG/group_4.343.849378293
  RMAN-07518: Reason: Foreign database file DBID: 1377155504  Database Name: ORCL
File Name: +data/ORCL/ONLINELOG/group_4.344.849378297
  RMAN-07518: Reason: Foreign database file DBID: 1377155504  Database Name: ORCL
File Name: +data/ORCL/DATAFILE/SYSTEM.332.849374461
  RMAN-07519: Reason: Error while cataloging. See alert.log.
File Name: +data/ORCL/DATAFILE/SYSAUX.333.849374463
  RMAN-07519: Reason: Error while cataloging. See alert.log.
File Name: +data/ORCL/DATAFILE/UNDOTBS1.334.849374463
  RMAN-07519: Reason: Error while cataloging. See alert.log.
File Name: +data/ORCL/DATAFILE/USERS.329.849374463
  RMAN-07519: Reason: Error while cataloging. See alert.log.
File Name: +data/ORCL/DATAFILE/EXAMPLE.339.849374929
  RMAN-07519: Reason: Error while cataloging. See alert.log.
File Name: +data/ORCL/DATAFILE/UNDOTBS2.340.849376549
  RMAN-07519: Reason: Error while cataloging. See alert.log.
File Name: +data/ORCL/BACKUPSET/2014_06_04/annnf0_TAG20140604T183923_0.348.849379165
  RMAN-07518: Reason: Foreign database file DBID: 1377155504  Database Name: ORCL
File Name: +data/ORCL/BACKUPSET/2014_06_04/nnndf0_TAG20140604T183942_0.349.849379185
  RMAN-07518: Reason: Foreign database file DBID: 1377155504  Database Name: ORCL
File Name: +data/ORCL/BACKUPSET/2014_06_04/ncsnf0_TAG20140604T183942_0.350.849379581
  RMAN-07518: Reason: Foreign database file DBID: 1377155504  Database Name: ORCL
File Name: +data/ORCL/BACKUPSET/2014_06_04/annnf0_TAG20140604T184705_0.352.849379641
  RMAN-07518: Reason: Foreign database file DBID: 1377155504  Database Name: ORCL
File Name: +data/ORCL/CONTROLFILE/Current.330.849374769
  RMAN-07519: Reason: Error while cataloging. See alert.log.
File Name: +data/ORCL/CONTROLFILE/Current.328.849374771
  RMAN-07519: Reason: Error while cataloging. See alert.log.
File Name: +data/cluster10/OCRFILE/REGISTRY.255.849273351
  RMAN-07517: Reason: The file header is corrupted
File Name: +data/cluster10/ASMPARAMETERFILE/REGISTRY.253.849270757
  RMAN-07518: Reason: Foreign database file DBID: 0  Database Name: 

datafile 1 switched to datafile copy
input datafile copy RECID=31 STAMP=849454295 file name=+DATA/orcldp/datafile/system.380.849454089
datafile 2 switched to datafile copy
input datafile copy RECID=32 STAMP=849454296 file name=+DATA/orcldp/datafile/sysaux.384.849454089
datafile 3 switched to datafile copy
input datafile copy RECID=33 STAMP=849454296 file name=+DATA/orcldp/datafile/undotbs1.379.849454089
datafile 4 switched to datafile copy
input datafile copy RECID=34 STAMP=849454297 file name=+DATA/orcldp/datafile/users.377.849454089
datafile 5 switched to datafile copy
input datafile copy RECID=35 STAMP=849454297 file name=+DATA/orcldp/datafile/undotbs2.378.849454089

contents of Memory Script:
{
   set until scn  2239219;
   recover
   clone database
    delete archivelog
   ;
}
executing Memory Script

executing command: SET until clause

Starting recover at 05-JUN-14
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=29 device type=DISK
allocated channel: ORA_AUX_DISK_2
channel ORA_AUX_DISK_2: SID=32 device type=DISK
allocated channel: ORA_AUX_DISK_3
channel ORA_AUX_DISK_3: SID=33 device type=DISK
allocated channel: ORA_AUX_DISK_4
channel ORA_AUX_DISK_4: SID=39 device type=DISK
allocated channel: ORA_AUX_DISK_5
channel ORA_AUX_DISK_5: SID=40 device type=DISK

starting media recovery

archived log for thread 1 with sequence 10 is already on disk as file +DATA/orcldp/archivelog/2014_06_05/thread_1_seq_10.382.849454287
archived log file name=+DATA/orcldp/archivelog/2014_06_05/thread_1_seq_10.382.849454287 thread=1 sequence=10
media recovery complete, elapsed time: 00:00:04
Finished recover at 05-JUN-14
Oracle instance started

Total System Global Area     275578880 bytes

Fixed Size                     2227584 bytes
Variable Size                121635456 bytes
Database Buffers             146800640 bytes
Redo Buffers                   4915200 bytes

contents of Memory Script:
{
   sql clone "alter system set  db_name = 
 ''ORCLDP'' 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 =  ''ORCLDP'' comment= ''Reset to original value by RMAN'' scope=spfile

sql statement: alter system reset  db_unique_name scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area     275578880 bytes

Fixed Size                     2227584 bytes
Variable Size                121635456 bytes
Database Buffers             146800640 bytes
Redo Buffers                   4915200 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "ORCLDP" RESETLOGS ARCHIVELOG 
  MAXLOGFILES    192
  MAXLOGMEMBERS      3
  MAXDATAFILES     1024
  MAXINSTANCES    32
  MAXLOGHISTORY      292
 LOGFILE
  GROUP   5 ( '+data', '+data' ) SIZE 100 M  REUSE,
  GROUP   6 ( '+data', '+data' ) SIZE 100 M  REUSE
 DATAFILE
  '+DATA/orcldp/datafile/system.380.849454089'
 CHARACTER SET AL32UTF8

sql statement: ALTER DATABASE ADD LOGFILE 
  
  INSTANCE 'i2' 
  GROUP   7 ( '+data', '+data' ) SIZE 100 M  REUSE,
  GROUP   8 ( '+data', '+data' ) SIZE 100 M  REUSE

contents of Memory Script:
{
   set newname for tempfile  2 to 
 "+data";
   switch clone tempfile all;
   catalog clone datafilecopy  "+DATA/orcldp/datafile/sysaux.384.849454089", 
 "+DATA/orcldp/datafile/undotbs1.379.849454089", 
 "+DATA/orcldp/datafile/users.377.849454089", 
 "+DATA/orcldp/datafile/undotbs2.378.849454089";
   switch clone datafile all;
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 2 to +data in control file

cataloged datafile copy
datafile copy file name=+DATA/orcldp/datafile/sysaux.384.849454089 RECID=1 STAMP=849454352
cataloged datafile copy
datafile copy file name=+DATA/orcldp/datafile/undotbs1.379.849454089 RECID=2 STAMP=849454352
cataloged datafile copy
datafile copy file name=+DATA/orcldp/datafile/users.377.849454089 RECID=3 STAMP=849454352
cataloged datafile copy
datafile copy file name=+DATA/orcldp/datafile/undotbs2.378.849454089 RECID=4 STAMP=849454353

datafile 2 switched to datafile copy
input datafile copy RECID=1 STAMP=849454352 file name=+DATA/orcldp/datafile/sysaux.384.849454089
datafile 3 switched to datafile copy
input datafile copy RECID=2 STAMP=849454352 file name=+DATA/orcldp/datafile/undotbs1.379.849454089
datafile 4 switched to datafile copy
input datafile copy RECID=3 STAMP=849454352 file name=+DATA/orcldp/datafile/users.377.849454089
datafile 5 switched to datafile copy
input datafile copy RECID=4 STAMP=849454353 file name=+DATA/orcldp/datafile/undotbs2.378.849454089

contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script

database opened
Finished Duplicate Db at 05-JUN-14

RMAN> **end-of-file**

RMAN> 

Recovery Manager complete.


12.Connect to the newly create database with instance orcldp1 and create pfile from spfile
[oracle@ol6-112-rac1 dbs]$ export ORACLE_SID=orcldp1
[oracle@ol6-112-rac1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jun 5 15:46:36 2014

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, OLAP,
Data Mining and Real Application Testing options

SQL> deinfe
SP2-0042: unknown command "deinfe" - rest of line ignored.
SQL> define
DEFINE _DATE           = "05-JUN-14" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "orcldp1" (CHAR)
DEFINE _USER           = "SYS" (CHAR)
DEFINE _PRIVILEGE      = "AS SYSDBA" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1102000300" (CHAR)
DEFINE _EDITOR         = "ed" (CHAR)
DEFINE _O_VERSION      = "Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options" (CHAR)
DEFINE _O_RELEASE      = "1102000300" (CHAR)
SQL> create pfile=$ORACLE_HOME/dbs/initorcldp1.ora  from spfile;
create pfile=$ORACLE_HOME/dbs/initorcldp1.ora  from spfile
             *
ERROR at line 1:
ORA-00911: invalid character


SQL> create pfile='$ORACLE_HOME/dbs/initorcldp1.ora' from spfile;

File created.

SQL> ! ls $ORACLE_HOME/dbs/initorcldp1.ora
/u01/app/orcl/oracle/product/11.2.0.3/db_1/dbs/initorcldp1.ora

13.check the pfile created from spfile with the source instance details, need to updated with the auxiliary database instance names and cluster_database parameter need to be set to true.
orcl2.__db_cache_size=109051904
orcl1.__db_cache_size=88080384
orcldp1.__db_cache_size=134217728
orcl2.__java_pool_size=4194304
orcl1.__java_pool_size=4194304
orcldp1.__java_pool_size=4194304
orcl2.__large_pool_size=4194304
orcl1.__large_pool_size=4194304
orcldp1.__large_pool_size=4194304
orcl1.__oracle_base='/u01/app/orcl/oracle'#ORACLE_BASE set from environment
orcldp1.__oracle_base='/u01/app/orcl/oracle'#ORACLE_BASE set from environment
orcl2.__pga_aggregate_target=92274688
orcl1.__pga_aggregate_target=92274688
orcldp1.__pga_aggregate_target=92274688
orcl2.__sga_target=276824064
orcl1.__sga_target=276824064
orcldp1.__sga_target=276824064
orcl2.__shared_io_pool_size=0
orcl1.__shared_io_pool_size=0
orcldp1.__shared_io_pool_size=0
orcl2.__shared_pool_size=150994944
orcl1.__shared_pool_size=171966464
orcldp1.__shared_pool_size=125829120
orcl2.__streams_pool_size=0
orcl1.__streams_pool_size=0
orcldp1.__streams_pool_size=0
*.audit_file_dest='/u01/app/orcl/oracle/admin/orcldp/adump'
*.audit_trail='db'
*.cluster_database=FALSE
*.compatible='11.2.0.0.0'
*.control_files='+DATA/orcldp/controlfile/current.371.849454021','+DATA/orcldp/controlfile/current.385.849454021'#Set by RMAN
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_domain=''
*.db_name='ORCLDP'#Reset to original value by RMAN
*.db_recovery_file_dest='+DATA'
*.db_recovery_file_dest_size=4558159872
*.diagnostic_dest='/u01/app/orcl/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orcldpXDB)'
orcl2.instance_number=2
orcl1.instance_number=1
*.instance_number=1
*.log_archive_dest_1='LOCATION=+DATA'
*.log_archive_format='%t_%s_%r.dbf'
*.log_file_name_convert='+DATA/orcl/','+DATA/orcldp/'
*.open_cursors=300
*.pga_aggregate_target=91226112
*.processes=150
*.remote_listener='ol6-112-scan.localdomain:1521'
*.remote_login_passwordfile='exclusive'
*.sga_target=274726912
orcl2.thread=2
orcl1.thread=1
orcl2.undo_tablespace='UNDOTBS2'
orcl1.undo_tablespace='UNDOTBS1'

14.Modifed pfile of oraorcldp1.ora file
orcldp1.__java_pool_size=4194304
orcldp2.__large_pool_size=4194304
orcldp1.__large_pool_size=4194304
orcldp1.__oracle_base='/u01/app/orcl/oracle'#ORACLE_BASE set from environment
orcldp2.__oracle_base='/u01/app/orcl/oracle'#ORACLE_BASE set from environment
orcldp2.__pga_aggregate_target=92274688
orcldp1.__pga_aggregate_target=92274688
orcldp2.__sga_target=276824064
orcldp1.__sga_target=276824064
orcldp2.__shared_io_pool_size=0
orcldp1.__shared_io_pool_size=0
orcldp2.__shared_pool_size=150994944
orcldp1.__shared_pool_size=171966464
orcldp2.__streams_pool_size=0
orcldp1.__streams_pool_size=0
*.audit_file_dest='/u01/app/orcl/oracle/admin/orcldp/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='11.2.0.0.0'
*.control_files='+DATA/orcldp/controlfile/current.371.849454021','+DATA/orcldp/controlfile/current.385.849454021'#Set by RMAN
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_domain=''
*.db_name='ORCLDP'#Reset to original value by RMAN
*.db_recovery_file_dest='+DATA'
*.db_recovery_file_dest_size=4558159872
*.diagnostic_dest='/u01/app/orcl/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orcldpXDB)'
orcldp2.instance_number=2
orcldp1.instance_number=1
*.log_archive_dest_1='LOCATION=+DATA'
*.log_archive_format='%t_%s_%r.dbf'
*.log_file_name_convert='+DATA/orcl/','+DATA/orcldp/'
*.open_cursors=300
*.pga_aggregate_target=91226112
*.processes=150
*.remote_listener='ol6-112-scan.localdomain:1521'
*.remote_login_passwordfile='exclusive'
*.sga_target=274726912
orcldp2.thread=2
orcldp1.thread=1
orcldp2.undo_tablespace='UNDOTBS2'
orcldp1.undo_tablespace='UNDOTBS1'

15.Move the spile of orcldp1 to spfileorcldp1.ora.old
[oracle@ol6-112-rac1 dbs]$ mv spfileorcldp1.ora spfileorcldp1.ora.old
16.shutdown and start the database using modified pfile in the node1 and create spfile in the asm diskgroup.
[oracle@ol6-112-rac1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jun 5 15:58:23 2014

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, OLAP,
Data Mining and Real Application Testing options

SQL> define
DEFINE _DATE           = "05-JUN-14" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "orcldp1" (CHAR)
DEFINE _USER           = "SYS" (CHAR)
DEFINE _PRIVILEGE      = "AS SYSDBA" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1102000300" (CHAR)
DEFINE _EDITOR         = "ed" (CHAR)
DEFINE _O_VERSION      = "Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options" (CHAR)
DEFINE _O_RELEASE      = "1102000300" (CHAR)
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> startup pfile=$ORACLE_HOME/dbs/initorcldp1.ora
ORACLE instance started.

Total System Global Area  275578880 bytes
Fixed Size                  2227584 bytes
Variable Size             180355712 bytes
Database Buffers           88080384 bytes
Redo Buffers                4915200 bytes
Database mounted.
Database opened.
SQL> show parameter cluster_database;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
cluster_database                     boolean     TRUE
cluster_database_instances           integer     2
SQL> create spfile='+DATA' from pfile;

17.Shutdown the database and start the database using spfile in the node 1
[oracle@ol6-112-rac1 dbs]$ mv initorcldp1.ora initorcldp1.ora.old
[oracle@ol6-112-rac1 dbs]$ vi initorcldp1.ora
[oracle@ol6-112-rac1 dbs]$ cat initorcldp1.ora
spfile='+data/orcldp/parameterfile/spfile.404.849456149'
[oracle@ol6-112-rac1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jun 5 16:06:20 2014

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, OLAP,
Data Mining and Real Application Testing options

SQL> define
DEFINE _DATE           = "05-JUN-14" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "orcldp1" (CHAR)
DEFINE _USER           = "SYS" (CHAR)
DEFINE _PRIVILEGE      = "AS SYSDBA" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1102000300" (CHAR)
DEFINE _EDITOR         = "ed" (CHAR)
DEFINE _O_VERSION      = "Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options" (CHAR)
DEFINE _O_RELEASE      = "1102000300" (CHAR)
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  275578880 bytes
Fixed Size                  2227584 bytes
Variable Size             180355712 bytes
Database Buffers           88080384 bytes
Redo Buffers                4915200 bytes
Database mounted.
Database opened.
SQL> show parameter spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +DATA/orcldp/parameterfile/spf
                                                 ile.404.849456149

18.copy the pfile and passwordfile to the node2 and start the instance using srvctl
[oracle@ol6-112-rac1 dbs]$ cat initorcldp1.ora
spfile='+data/orcldp/parameterfile/spfile.404.849456149'
[oracle@ol6-112-rac1 dbs]$ scp initorcldp1.ora oracle@ol6-112-rac2:$ORACLE_HOME/dbs
initorcldp2.ora
[oracle@ol6-112-rac1 dbs]$ scp orapworcldp1 oracle@ol6-112-rac2:$ORACLE_HOME/dbs/orapworcldp2                                                                                                                      
initorcldp1.ora
100%   57     0.1KB/s   00:00
orapworcldp1                                                                                                                          100% 2048     2.0KB/s   00:00

19.Configure srvctl to add database and instance
[oracle@ol6-112-rac1 dbs]$ srvctl add database -d orcldp -o $ORACLE_HOME -c RAC -p '+data/orcldp/parameterfile/spfile.404.849456149' -a "DATA"
[oracle@ol6-112-rac1 dbs]$ srvctl config database -d orcldp
Database unique name: orcldp
Database name:
Oracle home: /u01/app/orcl/oracle/product/11.2.0.3/db_1
Oracle user: oracle
Spfile: +data/orcldp/parameterfile/spfile.404.849456149
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: orcldp
Database instances:
Disk Groups: DATA
Mount point paths:
Services:
Type: RAC
Database is administrator managed
[oracle@ol6-112-rac1 dbs]$ srvctl add instance -d orcldp -i orcldp1 -n ol6-112-rac1
[oracle@ol6-112-rac1 dbs]$ srvctl add instance -d orcldp -i orcldp2 -n ol6-112-rac2
[oracle@ol6-112-rac1 dbs]$ srvctl config database -d orcldp
Database unique name: orcldp
Database name:
Oracle home: /u01/app/orcl/oracle/product/11.2.0.3/db_1
Oracle user: oracle
Spfile: +data/orcldp/parameterfile/spfile.404.849456149
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: orcldp
Database instances: orcldp1,orcldp2
Disk Groups: DATA
Mount point paths:
Services:
Type: RAC
Database is administrator managed

20.Start the instance 2 using srvctl
[oracle@ol6-112-rac1 dbs]$ srvctl start instance -d orcldp -i orcldp2

21.Stop the first instance manually and Bounce the database using srvctl
[oracle@ol6-112-rac1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jun 5 16:43:26 2014

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, OLAP,
Data Mining and Real Application Testing options

SQL> define
DEFINE _DATE           = "05-JUN-14" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "orcldp1" (CHAR)
DEFINE _USER           = "SYS" (CHAR)
DEFINE _PRIVILEGE      = "AS SYSDBA" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1102000300" (CHAR)
DEFINE _EDITOR         = "ed" (CHAR)
DEFINE _O_VERSION      = "Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options" (CHAR)
DEFINE _O_RELEASE      = "1102000300" (CHAR)
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, OLAP,
Data Mining and Real Application Testing options
[oracle@ol6-112-rac1 dbs]$ srvctl stop database -d orcldp
PRCC-1016 : orcldp was already stopped
[oracle@ol6-112-rac1 dbs]$ srvctl start database -d orcldp
[oracle@ol6-112-rac1 dbs]$ srvctl status database -d orcldp
Instance orcldp1 is running on node ol6-112-rac1
Instance orcldp2 is running on node ol6-112-rac2


No comments: