Migration from Non RAC to RAC on new 12c Cluster
Standalone to RAC Conversion
Source Database : OCM11G
standalone
Storage type : File
system
Target Database : 4
nodes Flex Cluster
Storage Type : ASM
(Flex)
[oracle@rac133
~]$ olsnodes -n -t -s
rac131 1
Active Unpinned
rac132 2
Active Unpinned
rac133 3
Active Unpinned
rac134 4
Inactive Unpinned
Size of Source Database which want to restore on new 12c Cluster
SQL> select
sum(bytes/1024/1024/1024) from dba_segments ;
SUM(BYTES/1024/1024/1024)
-------------------------
1.53845215
Get the details about storage location for datafile/online
redo/controlfiles
SQL> col name for
a80
SQL> set lin200
pages 209
SQL> select file#,
name from v$datafile ;
FILE# NAME
----------
--------------------------------------------------------------------------------
1
/u01/app/oracle/oradata/OCM11G/system01.dbf
2
/u01/app/oracle/oradata/OCM11G/sysaux01.dbf
3
/u01/app/oracle/oradata/OCM11G/undotbs01.dbf
4
/u01/app/oracle/oradata/OCM11G/users01.dbf
5
/u01/app/oracle/oradata/OCM11G/example01.dbf
SQL> select file#,
name from v$tempfile;
FILE# NAME
----------
--------------------------------------------------------------------------------
1
/u01/app/oracle/oradata/OCM11G/temp01.dbf
SQL> select name
from v$controlfile ;
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/OCM11G/control01.ctl
/u01/app/oracle/fast_recovery_area/OCM11G/control02.ctl
SQL> col member
for a80
SQL> select * from
v$logfile ;
GROUP# STATUS TYPE
MEMBER
IS_
---------- -------
------- -------------------------------------------------- ---
3 ONLINE
/u01/app/oracle/oradata/OCM11G/redo03.log NO
2 ONLINE
/u01/app/oracle/oradata/OCM11G/redo02.log NO
1 ONLINE
/u01/app/oracle/oradata/OCM11G/redo01.log NO
Take the backup of your database and copy the backup to target
server.
Get the details for Source Database :
SQL> select
max(sequence#) from v$archived_log ;
MAX(SEQUENCE#)
--------------
12
SQL> select dbid
from v$database ;
DBID
----------
3504526851
RMAN> connect target /
RMAN> backup database ;
Before restoration we need to sure that new server is having the same
binary with all applied patches.
After apply on PSU to 11.2.0.3 binary.
Validate the opatch result.
[oracle@rac131
20299017]$ /u01/app/oracle/product/11.2.0.3/DB_1/OPatch/opatch lsinventory
Oracle Interim Patch
Installer version 11.2.0.3.11
Copyright (c) 2016,
Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0.3/DB_1
Central Inventory :
/grid/app/oraInventory
from :
/u01/app/oracle/product/11.2.0.3/DB_1/oraInst.loc
OPatch version : 11.2.0.3.11
OUI version : 11.2.0.3.0
Log file location :
/u01/app/oracle/product/11.2.0.3/DB_1/cfgtoollogs/opatch/opatch2016-03-10_23-39-43PM_1.log
Lsinventory Output
file location :
/u01/app/oracle/product/11.2.0.3/DB_1/cfgtoollogs/opatch/lsinv/lsinventory2016-03-10_23-39-43PM.txt
--------------------------------------------------------------------------------
Local Machine
Information::
Hostname:
rac131.ora.com
ARU platform id: 226
ARU platform
description:: Linux x86-64
Installed Top-level
Products (1):
Oracle Database
11g
11.2.0.3.0
There are 1 products
installed in this Oracle Home.
Interim patches (1) :
Patch 20299017
: applied on Thu Mar 10 23:13:23 IST 2016
Unique Patch ID: 18588265
Patch
description: "Database Patch Set
Update : 11.2.0.3.14 (20299017)"
Created on 2 Mar 2015, 21:45:38 hrs PST8PDT
Sub-patch 19769496; "Database Patch Set Update :
11.2.0.3.13 (19769496)"
Sub-patch 19121548; "Database Patch Set Update :
11.2.0.3.12 (19121548)"
Sub-patch 18522512; "Database Patch Set Update :
11.2.0.3.11 (18522512)"
Sub-patch 18031683; "Database Patch Set Update :
11.2.0.3.10 (18031683)"
Sub-patch 17540582; "Database Patch Set Update :
11.2.0.3.9 (17540582)"
Sub-patch 16902043; "Database Patch Set Update :
11.2.0.3.8 (16902043)"
Sub-patch 16619892; "Database Patch Set Update :
11.2.0.3.7 (16619892)"
Sub-patch 16056266; "Database Patch Set Update :
11.2.0.3.6 (16056266)"
Sub-patch 14727310; "Database Patch Set Update :
11.2.0.3.5 (14727310)"
Sub-patch 14275605; "Database Patch Set Update :
11.2.0.3.4 (14275605)"
Sub-patch 13923374; "Database Patch Set Update :
11.2.0.3.3 (13923374)"
Sub-patch 13696216; "Database Patch Set Update :
11.2.0.3.2 (13696216)"
Sub-patch 13343438; "Database Patch Set Update :
11.2.0.3.1 (13343438)"
Bugs fixed:
13593999, 10350832, 19433746, 14138130,
12919564, 14198511, 13561951
13588248, 13080778, 20134036, 13804294,
16710324, 18031683, 12873183
16992075, 14193240, 14472647, 12880299,
13369579, 14799269, 13840704
14409183, 13492735, 14263036, 12857027,
13496884, 14263073, 16038929
13834436, 13015379, 17748833, 13732226,
16563678, 13866822, 20134034
13742434, 13944971, 12950644, 17748831,
12899768, 16929165, 16272008
13063120, 14613900, 13958038, 13503204,
13972394, 11877623, 17088068
13072654, 12395918, 16710753, 13429702,
13814739, 17343514, 13649031
13981051, 10256843, 15981698, 13901201,
12797765, 17333200, 19211724
12923168, 16761566, 13384182, 16279401,
13466801, 15996344, 14207163
13596581, 18673304, 13724193, 11063191,
13642044, 12940637, 19915271
12595606, 18641419, 14052871, 9163477,
15931756, 18262334, 13945708
12797420, 14123213, 13041324, 12865902,
15869211, 14003090, 16314468
16019955, 11708510, 17865671, 13026410,
14637368, 13737746, 13742438
15841373, 16347904, 16088176, 15910002, 19517437,
19827973, 16362358
16505333, 14398795, 14182835, 13579992,
11883252, 16344871, 10182005
10400244, 13742436, 14275605, 19197175,
9858539, 20477071, 14841812
16338983, 9703627, 13483354, 14393728,
14207317, 17165204, 20477069
12764337, 16902043, 14459552, 14191508,
14588746, 12964067, 19358317
20477440, 12780983, 12583611, 14383007,
14546575, 13476583, 15862016
13489024, 12985237, 17748830, 19554106,
14088346, 13448206, 19458377
16314466, 13419660, 18139695, 12591399,
14110275, 13430938, 13467683
17767676, 14548763, 19638161, 13424216,
12834027, 13632809, 13853126
13377816, 13036331, 14727310, 9812682,
12320556, 16747736, 13584130
16175381, 17468141, 12829021, 14138823,
15862019, 12794305, 14546673
12791981, 13503598, 13787482, 10133521,
12744759, 13399435, 18641461
19433747, 14023636, 13553883, 14762511,
9095696, 14343501, 12977562
13860201, 13257247, 14176879, 13783957,
16014985, 14480675, 12312133
13559697, 13146182, 16306019, 12974860,
9706792, 12940620, 13098318
13773133, 15883525, 16794244, 13340388,
13528551, 13366202, 12894807
13259364, 12747437, 13454210, 12748240,
13385346, 15987992, 13923995
16101465, 14571027, 13582702, 12784406,
13907462, 19769496, 13493847
13035804, 13857111, 13544396, 16710363,
10110625, 20134033, 14128555
12813641, 8547978, 14226599, 17478415,
17050888, 16923127, 17333197
9397635, 14007968, 13912931, 12693626,
12925089, 14189694, 17761775
12815057, 16721594, 13332439, 20477068,
19972198, 14038787, 11071989
14207902, 12596444, 14062796, 12913474,
20299010, 14390252, 13840711
13370330, 16314470, 14062794, 13358781,
12960925, 17333202, 9659614
13699124, 14546638, 13936424, 9797851,
19433745, 16794240, 14301592
13338048, 12938841, 12620823, 12656535,
12678920, 13719292, 14488943
14062792, 16850197, 14791477, 13807411,
16794238, 13250244, 12594032
15862022, 14098509, 15826962, 12612118,
9761357, 18096714, 19854461
14053457, 18436647, 13918644, 13527323,
10625145, 18173595, 12797620
19289642, 15862020, 13910420, 12780098,
13696216, 14774091, 14841558
10263668, 13849733, 16794242, 16944698,
15862023, 16056266, 13834065
20134035, 13853654, 14351566, 13723052,
18173593, 14063280, 13011409
13566938, 13737888, 13624984, 16024441,
17333199, 13914613, 17540582
14258925, 14222403, 14755945, 13645875,
12571991, 13839641, 14664355
12998795, 14469008, 13719081, 13361350,
14188650, 17019974, 13742433
14508968, 16314469, 16368108, 12905058,
6690853, 13647945, 16212405
12849688, 18641451, 13742435, 13464002,
18681866, 12879027, 13534412
18522512, 12585543, 12747740, 12535346,
13878246, 13790109, 16382448
12588744, 13916549, 13786142, 12847466,
13855490, 13551402, 12582664
19972199, 13871316, 14262913, 14657740,
17332800, 14558880, 14695377
13612575, 12912137, 13484963, 12387467,
14163397, 17437634, 13772618
19006849, 16694777, 13070939, 15994107,
14369664, 12391034, 13605839
12588237, 16279211, 16314467, 12945879,
15901852, 17762296, 14692762
12976376, 7276499, 12755231, 13680405,
13742437, 14589750, 14318397
11868640, 14644185, 13326736, 19309466,
13596521, 13001379, 12898558
13099577, 17752121, 13911711, 9873405,
18673325, 16372203, 16344758
11715084, 9547706, 16231699, 14040433,
12662040, 12617123, 14406648
17748832, 16530565, 12845115, 16844086,
13354082, 17748834, 13794550
13397104, 19537916, 13913630, 16524926,
16462834, 12983611, 13550185
13810393, 14121009, 13065099, 11840910,
13903046, 15862017, 13572659
16294378, 13718279, 13657605, 17716305,
14480676, 13632717, 14668670
14063281, 14158012, 13736413, 13420224,
13812031, 12646784, 16299830
18440047, 14512189, 10359307, 12755116,
14035825, 17230530, 13616375
13366199, 13427062, 18673342, 12861463,
15862021, 13092220, 17721717
13043012, 16619892, 13685544, 18325460,
13499128, 15862018, 19727057
13839336, 13866372, 13561750, 12718090,
13848402, 13725395, 12401111
5144934, 12796518, 13362079, 12917230,
12614359, 13042639, 14408859
13923374, 11732473, 14220725, 12621588,
13524899, 14480674, 14751895
13916709, 14781609, 14076523, 15905421,
12731940, 13343438, 14205448
17748835, 15853081, 17082364, 14127231,
14273397, 16844448, 14467061
12971775, 16864562, 20074391, 14489591,
14497307, 13872868, 12748538
10242202, 14230270, 13931044, 13686047,
16382353, 14095982, 17333203
19121548, 13591624, 14523004, 13440516,
16794241, 13499412, 13035360
14062795, 12411746, 13040943, 12905053,
13843646, 20296213, 18173592
16794243, 13477790, 14841409, 14609690,
14062797, 13059165, 12959852
12345082, 16703112, 13890080, 17333198,
16048375, 16450169, 12658411
13780035, 14062793, 19271438, 19259446,
13038684, 18740215, 16742095
13742464, 14052474, 13066936, 13060271,
13911821, 13457582, 7509451
19710542, 13791364, 12821418, 13502183,
13705338, 15856660, 14237793
16794239, 13554409, 15862024, 13103913,
13645917, 12772404
Rac system comprising
of multiple nodes
Local node = rac131
Remote node = rac132
Remote node = rac133
--------------------------------------------------------------------------------
OPatch succeeded.
[oracle@rac131
20299017]$
Prepare the Restore script to restore the database on target cluster.
[oracle@rac131
BACKUP] vi restore.sh
export ORACLE_SID=OCM11G1
export
ORACLE_HOME=/u01/app/oracle/product/11.2.0.3/DB_1
export
PATH=$ORACLE_HOME/bin:$PATH:.
$ORACLE_HOME/bin/rman
target <<! > /tmp/RESTORE_OCM11G.log
set dbid 2272913883;
run
{
SET NEWNAME FOR
DATABASE TO '+DG_DATA/OCM11G/datafile/%b';
set until sequence 28
thread 1 ;
restore controlfile ;
sql 'alter database
mount';
restore database;
switch datafile all ;
recover database;
}
!
Create SPFILE/PFILE on new server using source database using below
contents.
[oracle@rac131
BACKUP]$ more PFILE_NEW_OCM11G.ora
OCM11G1.__db_cache_size=599785472
OCM11G1.__java_pool_size=4194304
OCM11G1.__large_pool_size=4194304
OCM11G1.__oracle_base='/u01/app/oracle'#ORACLE_BASE
set from environment
OCM11G1.__pga_aggregate_target=209715200
OCM11G1.__sga_target=838860800
OCM11G1.__shared_io_pool_size=0
OCM11G1.__shared_pool_size=222298112
OCM11G1.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/OCM11G/adump'
*.audit_trail='db'
*.cluster_database_instances=3
*.cluster_database=TRUE
*.compatible='11.2.0.0.0'
*.control_files='+DG_DATA/ocm11g/control01.ctl','+DG_FLASH/ocm11g/control02.ctl'#Restore
Controlfile
*.db_block_size=8192
*.db_create_file_dest='+DG_DATA'
*.db_create_online_log_dest_1='+DG_FLASH'
*.db_create_online_log_dest_2='+DG_DATA'
*.db_domain=''
*.db_name='OCM11G'
*.db_recovery_file_dest='+DG_FLASH'
*.db_recovery_file_dest_size=8516534272
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP)
(SERVICE=OCM11GXDB)'
*.event='10262 trace
name context forever, level 4000'
OCM11G3.instance_number=3
OCM11G1.instance_number=1
OCM11G2.instance_number=2
OCM11G1.local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac131.ora.com)(PORT=1521))))'
OCM11G2.local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac132.ora.com)(PORT=1521))))'
OCM11G3.local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac133.ora.com)(PORT=1521))))'
*.log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST'
*.log_file_name_convert='/u01/app/oracle/oradata/OCM11G','+DG_FLASH'
*.open_cursors=300
*.pga_aggregate_target=200m
*.processes=500
*.remote_listener='rac-scan.ora.com:1521'
*.remote_login_passwordfile='exclusive'
*.sec_case_sensitive_logon=FALSE
*.sessions=610
*.sga_target=800m
OCM11G3.thread=3
OCM11G2.thread=2
OCM11G1.thread=1
*.undo_retention=172800
*.undo_tablespace='UNDOTBS1'
OCM11G2.undo_tablespace='UNDOTBS2'
OCM11G3.undo_tablespace='UNDOTBS3'
OCM11G1.undo_tablespace='UNDOTBS1'
Add the Instance in /etc/oratab for OCM11G
On Target
·
Start the
database using above pfile/spfile.
·
Restore
the controlfile from latest backup
·
Run the restore.sh script to restore and recover the database. You can use your own restoration statigy.
[oracle@rac131 BACKUP]$ nohup ./restore.sh &
executing
command: SET NEWNAME
Starting
restore at 11-MAR-16
using target
database control file instead of recovery catalog
allocated
channel: ORA_DISK_1
channel
ORA_DISK_1: SID=33 device type=DISK
channel
ORA_DISK_1: starting datafile backup set restore
channel
ORA_DISK_1: specifying datafile(s) to restore from backup set
channel
ORA_DISK_1: restoring datafile 00001 to +DG_DATA/OCM11G/datafile/system01.dbf
channel
ORA_DISK_1: restoring datafile 00002 to +DG_DATA/OCM11G/datafile/sysaux01.dbf
channel
ORA_DISK_1: restoring datafile 00003 to +DG_DATA/OCM11G/datafile/undotbs01.dbf
channel
ORA_DISK_1: restoring datafile 00004 to +DG_DATA/OCM11G/datafile/users01.dbf
channel
ORA_DISK_1: restoring datafile 00005 to +DG_DATA/OCM11G/datafile/example01.dbf
channel
ORA_DISK_1: reading from backup piece /ACFS/BACKUP/RMAN_OCM11G_FULL_07r1f4ca_1_1
………….
After restoration and recovery the database.
Run the
catclust.sql script to enable the cluster related view/programs/packages…
SQL> @?/rdbms/admin/catclust
Package
created.
Package body
created.
……..
PL/SQL
procedure successfully completed.
Drop the old redo log group and add the new for Thread 1/2/3.
SQL>
select * from v$logfile ;
GROUP# STATUS TYPE
MEMBER
IS_
----------
------- ------- ------------------------------------------------------- ---
3 ONLINE
/u01/app/oracle/oradata/OCM11G/redo03.log NO
2 ONLINE
/u01/app/oracle/oradata/OCM11G/redo02.log NO
1 ONLINE
/u01/app/oracle/oradata/OCM11G/redo01.log NO
SQL> alter
database add logfile thread 1;
Database
altered.
SQL>
select * from v$logfile ;
GROUP# STATUS TYPE
MEMBER
IS_
----------
------- ------- ------------------------------------------------------- ---
3 ONLINE
/u01/app/oracle/oradata/OCM11G/redo03.log NO
2 ONLINE
/u01/app/oracle/oradata/OCM11G/redo02.log NO
1 ONLINE
/u01/app/oracle/oradata/OCM11G/redo01.log NO
4 ONLINE
+DG_FLASH/ocm11g/onlinelog/group_4.266.906183737 NO
4 ONLINE
+DG_DATA/ocm11g/onlinelog/group_4.302.906183739 NO
SQL>
alter database add logfile thread 1 ;
Database
altered.
SQL>
alter database add logfile thread 1 ;
Database
altered.
SQL>
alter database add logfile thread 2 ;
Database
altered.
SQL> /
Database
altered.
SQL> /
Database
altered.
SQL>
alter database add logfile thread 3 ;
Database
altered.
SQL> /
Database
altered.
SQL> /
Database
altered.
SQL>
select * from v$logfile ;
GROUP# STATUS TYPE
MEMBER
IS_
----------
------- ------- ------------------------------------------------------- ---
3 ONLINE
/u01/app/oracle/oradata/OCM11G/redo03.log NO
2 ONLINE
/u01/app/oracle/oradata/OCM11G/redo02.log NO
1 ONLINE
/u01/app/oracle/oradata/OCM11G/redo01.log NO
4 ONLINE
+DG_FLASH/ocm11g/onlinelog/group_4.266.906183737 NO
4 ONLINE
+DG_DATA/ocm11g/onlinelog/group_4.302.906183739 NO
5 ONLINE
+DG_FLASH/ocm11g/onlinelog/group_5.265.906183755 NO
5 ONLINE
+DG_DATA/ocm11g/onlinelog/group_5.303.906183757 NO
6 ONLINE
+DG_FLASH/ocm11g/onlinelog/group_6.264.906183759 NO
6 ONLINE
+DG_DATA/ocm11g/onlinelog/group_6.304.906183761 NO
7 ONLINE
+DG_FLASH/ocm11g/onlinelog/group_7.263.906183773 NO
7 ONLINE
+DG_DATA/ocm11g/onlinelog/group_7.305.906183775 NO
8 ONLINE
+DG_FLASH/ocm11g/onlinelog/group_8.262.906183777 NO
8 ONLINE
+DG_DATA/ocm11g/onlinelog/group_8.306.906183779 NO
9 ONLINE
+DG_FLASH/ocm11g/onlinelog/group_9.267.906183785 NO
9 ONLINE
+DG_DATA/ocm11g/onlinelog/group_9.307.906183789 NO
10 ONLINE
+DG_FLASH/ocm11g/onlinelog/group_10.268.906183797 NO
10 ONLINE
+DG_DATA/ocm11g/onlinelog/group_10.308.906183799 NO
11 ONLINE
+DG_FLASH/ocm11g/onlinelog/group_11.269.906183803 NO
11 ONLINE
+DG_DATA/ocm11g/onlinelog/group_11.309.906183803 NO
12 ONLINE
+DG_FLASH/ocm11g/onlinelog/group_12.270.906183807 NO
12 ONLINE
+DG_DATA/ocm11g/onlinelog/group_12.310.906183809 NO
21 rows
selected.
SQL>
alter system switch logfile ;
System
altered.
SQL> /
System
altered.
SQL> /
System altered.
SQL> alter system checkpoint ;
System altered.
SQL> alter database drop logfile group 1 ;
Database altered.
SQL> alter database drop logfile group 2 ;
Database altered.
SQL> alter database drop logfile group 3 ;
Database altered.
SQL>
select * from v$logfile ;
GROUP# STATUS TYPE MEMBER
IS_
---------- ------- -------
------------------------------------------------------- ---
4 ONLINE
+DG_FLASH/ocm11g/onlinelog/group_4.266.906183737 NO
4 ONLINE
+DG_DATA/ocm11g/onlinelog/group_4.302.906183739 NO
5 ONLINE
+DG_FLASH/ocm11g/onlinelog/group_5.265.906183755 NO
5 ONLINE
+DG_DATA/ocm11g/onlinelog/group_5.303.906183757 NO
6 ONLINE
+DG_FLASH/ocm11g/onlinelog/group_6.264.906183759 NO
6 ONLINE
+DG_DATA/ocm11g/onlinelog/group_6.304.906183761 NO
7 ONLINE
+DG_FLASH/ocm11g/onlinelog/group_7.263.906183773 NO
7 ONLINE
+DG_DATA/ocm11g/onlinelog/group_7.305.906183775 NO
8 ONLINE
+DG_FLASH/ocm11g/onlinelog/group_8.262.906183777 NO
8 ONLINE
+DG_DATA/ocm11g/onlinelog/group_8.306.906183779 NO
9 ONLINE
+DG_FLASH/ocm11g/onlinelog/group_9.267.906183785 NO
9 ONLINE
+DG_DATA/ocm11g/onlinelog/group_9.307.906183789 NO
10 ONLINE
+DG_FLASH/ocm11g/onlinelog/group_10.268.906183797 NO
10 ONLINE
+DG_DATA/ocm11g/onlinelog/group_10.308.906183799 NO
11 ONLINE
+DG_FLASH/ocm11g/onlinelog/group_11.269.906183803 NO
11 ONLINE +DG_DATA/ocm11g/onlinelog/group_11.309.906183803 NO
12 ONLINE
+DG_FLASH/ocm11g/onlinelog/group_12.270.906183807 NO
12 ONLINE
+DG_DATA/ocm11g/onlinelog/group_12.310.906183809 NO
18 rows selected.
CREATE UNDO
TABLESPACE FOR NEW INSTANCE
SQL> CREATE UNDO TABLESPACE UNDOTBS2 DATAFILE
'+DG_DATA' SIZE 200M ;
Tablespace created.
SQL> CREATE UNDO TABLESPACE UNDOTBS3
DATAFILE '+DG_DATA' SIZE 200M ;
Tablespace created.
SQL> SELECT FILE_ID, FILE_NAME,
TABLESPACE_NAME FROM DBA_DATA_FILES ;
FILE_ID FILE_NAME
TABLESPACE_NAME
----------
------------------------------------------------------------
------------------------------
6 +DG_DATA/ocm11g/datafile/undotbs2.311.906184045 UNDOTBS2
7 +DG_DATA/ocm11g/datafile/undotbs3.312.906184055 UNDOTBS3
4 +DG_DATA/ocm11g/datafile/users01.dbf USERS
3 +DG_DATA/ocm11g/datafile/undotbs01.dbf UNDOTBS1
2 +DG_DATA/ocm11g/datafile/sysaux01.dbf SYSAUX
1 +DG_DATA/ocm11g/datafile/system01.dbf SYSTEM
5 +DG_DATA/ocm11g/datafile/example01.dbf EXAMPLE
7 rows selected.
Change the Cluster
Parameter in SPFILE
Setting
cluster related parameter cluster_database and cluster_database_instance as per
your configuration.
SQL> show parameter cluster
NAME TYPE VALUE
------------------------------------
----------- ------------------------------
cluster_database boolean FALSE
cluster_database_instances integer 1
cluster_interconnects string
SQL> alter system set
cluster_database_instances=3 scope=spfile ;
System altered.
SQL> alter system set
cluster_database=TRUE SCOPE=SPFILE ;
System altered.
Bounce the database
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 835104768 bytes
Fixed Size 2232960 bytes
Variable Size 230690176 bytes
Database Buffers 599785472 bytes
Redo Buffers 2396160 bytes
Database mounted.
Database opened.
SQL>
SQL>
SQL> show parameter cluster
NAME TYPE VALUE
------------------------------------
----------- ------------------------------
cluster_database boolean TRUE
cluster_database_instances integer 3
cluster_interconnects string
SQL>
SQL>
SQL>
Enable thread for
node 2 and node 3
SQL>
SQL> alter database enable thread 2 ;
Database altered.
SQL> alter database enable thread 3 ;
Database altered.
Create link
parameter file on all nodes (rac132 and rac133)
SQL> CREATE
PFILE='/ACFS/BACKUP/PFILE_NEW_OCM11G.ora' from spfile ;
File created.
SQL> create
spfile='+DG_DATA/OCM11G/parameterfile/spfileOCM11G.ora' from
pfile='/ACFS/BACKUP/PFILE_NEW_OCM11G.ora'
;
File created.
SQL> !
[oracle@rac131 BACKUP]$
[oracle@rac131 BACKUP]$ cd $ORACLE_HOME/dbs
[oracle@rac131 dbs]$ vi initOCM11G1.ora
[oracle@rac131 dbs]$ vi initOCM11G1.ora
[oracle@rac131 dbs]$
scp initOCM11G1.ora
oracle@rac132:/u01/app/oracle/product/11.2.0.3/DB_1/dbs/initOCM11G2.ora
initOCM11G1.ora 100% 56
0.1KB/s 00:00
[oracle@rac131 dbs]$
scp initOCM11G1.ora
oracle@rac133:/u01/app/oracle/product/11.2.0.3/DB_1/dbs/initOCM11G3.ora
initOCM11G1.ora
100% 56 0.1KB/s
00:00
[oracle@rac131 dbs]$
Register the
database to cluster.
[oracle@rac131 dbs]$ . oraenv
ORACLE_SID = [OCM11G1] ?
The Oracle base remains unchanged with value
/u01/app/oracle
[oracle@rac131 dbs]$ cd
[oracle@rac131
~]$ srvctl add database -d OCM11G -o /u01/app/oracle/product/11.2.0.3/DB_1 -p
+DG_DATA/OCM11G/parameterfile/spfileOCM11G.ora
PRCR-1006 : Failed to add resource
ora.ocm11g.db for ocm11g
PRCD-1184 : Failed to upgrade
configuration of database type to version 11.2.0.3.0
PRCR-1071 : Failed to register or
update resource type ora.database.type
CRS-0245: User doesn't have enough privilege to perform
the operation
[oracle@rac131 ~]$
[oracle@rac131 ~]$
During database
registration from 11.2.0.3 binary to 12c Cluster, we are getting above
error. This is an published bug which
need to fix before the registration. Bug
13460353 - Registration of 11.2 database fails against 12.1 CRS stack (required
fix for 11g DB with 12c GI) (Doc ID 13460353.8)
Workaround
Rediscovery Notes
Registration of an 11.2 database
fails against a 12.1 CRS stack
Workaround
The preference is to use the
patch for this issue.
If required the following
commands may be used to work around the problems:
crsctl modify type
ora.database.type -attr
"ATTRIBUTE=TYPE_VERSION,DEFAULT_VALUE=3.2" "-unsupported
crsctl modify type
ora.service.type -attr "ATTRIBUTE=TYPE_VERSION,DEFAULT_VALUE=2.2"
"-unsupported
(note that -unsupported flag is
required on the above commands otherrwise they will error)
Note:
This fix is needed in the 11.2 DB
home in order to work with 12c GI.
The fix is included in 11.2.0.3.4
GI PSU onwards and interim patches
are available for other 11.2
releases here: Patch:13460353
Download
the patch 13460353 for your database binary version and apply patch one by one
on all 11.2.0.3 database home.
After
download unzip the patch in stage directory and apply.
Applying the
patch
[oracle@rac131
13460353]$ /u01/app/oracle/product/11.2.0.3/DB_1/OPatch/opatch napply -oh
/u01/app/oracle/product/11.2.0.3/DB_1 -local /nfs/Maintenance/software/Oracle/database/PSU/13460353/custom/server/13460353
Oracle Interim Patch Installer version
11.2.0.3.11
Copyright (c) 2016, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0.3/DB_1
Central Inventory : /grid/app/oraInventory
from : /u01/app/oracle/product/11.2.0.3/DB_1/oraInst.loc
OPatch version : 11.2.0.3.11
OUI version : 11.2.0.3.0
Log file location :
/u01/app/oracle/product/11.2.0.3/DB_1/cfgtoollogs/opatch/opatch2016-03-11_06-41-53AM_1.log
Verifying environment and performing prerequisite
checks...
OPatch continues with these patches: 13460353
Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Provide your email address to be informed of
security issues, install and
initiate Oracle Configuration Manager. Easier
for you if you use your My
Oracle Support Email address/User Name.
Visit
http://www.oracle.com/support/policies.html for details.
Email address/User Name:
You have not provided an email address for
notification of security issues.
Do you wish to remain uninformed of security
issues ([Y]es, [N]o) [N]: y
Please shutdown Oracle instances running out
of this ORACLE_HOME on the local system.
(Oracle Home =
'/u01/app/oracle/product/11.2.0.3/DB_1')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '13460353' to OH
'/u01/app/oracle/product/11.2.0.3/DB_1'
Patching component oracle.rdbms,
11.2.0.3.0...
Verifying the update...
OPatch found the word "warning" in
the stderr of the make command.
Please look at this stderr. You can re-run
this make command.
Stderr output:
ins_srvm.mk:68: warning: overriding commands
for target `libsrvm11.so'
ins_srvm.mk:31: warning: ignoring old commands
for target `libsrvm11.so'
ins_srvm.mk:71: warning: overriding commands
for target `libsrvmocr11.so'
ins_srvm.mk:34: warning: ignoring old
commands for target `libsrvmocr11.so'
ins_srvm.mk:74: warning: overriding commands
for target `libsrvmhas11.so'
ins_srvm.mk:37: warning: ignoring old commands for
target `libsrvmhas11.so'
Patch 13460353 successfully applied.
OPatch Session completed with warnings.
Log file location:
/u01/app/oracle/product/11.2.0.3/DB_1/cfgtoollogs/opatch/opatch2016-03-11_06-41-53AM_1.log
OPatch completed with warnings.
[oracle@rac132
13460353]$ /u01/app/oracle/product/11.2.0.3/DB_1/OPatch/opatch napply -oh
/u01/app/oracle/product/11.2.0.3/DB_1 -local /nfs/Maintenance/software/Oracle/database/PSU/13460353/custom/server/13460353
[oracle@rac133
13460353]$ /u01/app/oracle/product/11.2.0.3/DB_1/OPatch/opatch napply -oh
/u01/app/oracle/product/11.2.0.3/DB_1 -local /nfs/Maintenance/software/Oracle/database/PSU/13460353/custom/server/13460353
Applied
this patch to all 11.2.0.3 home (rac132/133)
Once applied the patch on all
cluster database nodes. Then proceed the
database registration on 12c Cluster
[oracle@rac131
~]$ srvctl add database -d OCM11G -o /u01/app/oracle/product/11.2.0.3/DB_1 -p +DG_DATA/OCM11G/parameterfile/spfileOCM11G.ora
[oracle@rac131 ~]$ srvctl add instance -d
OCM11G -i OCM11G1 -n rac131
[oracle@rac131 ~]$ srvctl add instance -d
OCM11G -i OCM11G2 -n rac132
[oracle@rac131 ~]$ srvctl add instance -d
OCM11G -i OCM11G3 -n rac133
[oracle@rac131 ~]$ srvctl start database -d
OCM11G
Validate the configuration
[oracle@rac131
~]$ srvctl config database -d OCM11G
Database unique name: OCM11G
Database name:
Oracle home:
/u01/app/oracle/product/11.2.0.3/DB_1
Oracle user: oracle
Spfile:
+DG_DATA/OCM11G/parameterfile/spfileOCM11G.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: OCM11G
Database instances: OCM11G1,OCM11G2,OCM11G3
Disk Groups: DG_DATA,DG_FLASH
Mount point paths:
Services:
Type: RAC
Database is administrator managed
Adding services to cluster
[oracle@rac131
~]$ srvctl add service -d OCM11G -s OCM11G_CRM -r OCM11G1,OCM11G3 -a OCM11G2
[oracle@rac131 ~]$ srvctl status service -d
OCM11G
Service OCM11G_CRM is not running.
[oracle@rac131 ~]$ srvctl start service -d
OCM11G
[oracle@rac131 ~]$ srvctl status service -d
OCM11G
Service OCM11G_CRM is running on instance(s)
OCM11G1,OCM11G3
Validate the configuration
[oracle@rac131
~]$ crsctl stat res -t
--------------------------------------------------------------------
Name Target State
Server State details
--------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
ONLINE ONLINE
rac131 STABLE
ONLINE ONLINE
rac132 STABLE
ONLINE ONLINE
rac133 STABLE
ora.DG_ACFS.ACFS_VOL.advm
ONLINE ONLINE
rac131 Volume device /dev/asm/acfs_vol-287 is online,STABLE
ONLINE ONLINE
rac132 Volume device /dev/asm/acfs_vol-287 is online,STABLE
ONLINE ONLINE
rac133 Volume device /dev/asm/acfs_vol-287 is online,STABLE
ora.DG_ACFS.dg
ONLINE ONLINE
rac131 STABLE
ONLINE ONLINE
rac132 STABLE
ONLINE ONLINE
rac133 STABLE
ora.DG_DATA.dg
ONLINE ONLINE
rac131 STABLE
ONLINE
ONLINE rac132 STABLE
ONLINE ONLINE
rac133 STABLE
ora.DG_FLASH.dg
ONLINE ONLINE
rac131 STABLE
ONLINE ONLINE
rac132 STABLE
ONLINE ONLINE
rac133 STABLE
ora.DG_OCR.dg
ONLINE ONLINE
rac131 STABLE
ONLINE ONLINE
rac132 STABLE
ONLINE ONLINE
rac133 STABLE
ora.LISTENER.lsnr
ONLINE ONLINE
rac131 STABLE
ONLINE ONLINE
rac132 STABLE
ONLINE ONLINE
rac133 STABLE
ora.dg_acfs.acfs_vol.acfs
ONLINE ONLINE
rac131 mounted on /ACFS,STABLE
ONLINE ONLINE
rac132 mounted on /ACFS,STABLE
ONLINE ONLINE
rac133 mounted on /ACFS,STABLE
ora.net1.network
ONLINE ONLINE
rac131 STABLE
ONLINE ONLINE
rac132 STABLE
ONLINE ONLINE
rac133 STABLE
ora.ons
ONLINE
ONLINE rac131 STABLE
ONLINE ONLINE
rac132 STABLE
ONLINE ONLINE
rac133 STABLE
ora.proxy_advm
ONLINE ONLINE
rac131 STABLE
ONLINE ONLINE
rac132 STABLE
ONLINE ONLINE
rac133 STABLE
--------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1
ONLINE ONLINE rac133
STABLE
ora.LISTENER_SCAN2.lsnr
1
ONLINE ONLINE rac132
STABLE
ora.LISTENER_SCAN3.lsnr
1
ONLINE ONLINE rac131
STABLE
ora.MGMTLSNR
1
ONLINE ONLINE rac132
169.254.94.174 10.10.10.132
20.20.20.132,STABLE
ora.asm
1
ONLINE ONLINE rac131
Started,STABLE
2
ONLINE ONLINE rac132
Started,STABLE
3
ONLINE ONLINE rac133
Started,STABLE
ora.cvu
1
ONLINE ONLINE rac132
STABLE
ora.mgmtdb
1
ONLINE ONLINE rac132
Open,STABLE
ora.oc4j
1
ONLINE ONLINE rac132
STABLE
ora.ocm11g.db
1
ONLINE ONLINE rac131
Open,STABLE
2
ONLINE ONLINE rac132
Open,STABLE
3
ONLINE ONLINE rac133
Open,STABLE
ora.ocm11g.ocm11g_crm.svc
1
ONLINE ONLINE rac131
STABLE
2
ONLINE ONLINE rac133
STABLE
…
…
Now database has been
registered to Cluster.
Execute the post task as per
your environment. Like Backup
Configuration, TNS /Ldap/EUS Configuration for customer.
Hope this helps J