'rac to single'에 해당되는 글 2건

  1. 2024.01.28 12.2.0.1 기준 rac to single로 변환
  2. 2016.06.10 oracle rac to single
ORACLE/ADMIN2024. 1. 28. 00:41
반응형

-- 12.2.0.1 기준 rac 에서 single로 변환

 

SQL*Plus: Release 12.2.0.1.0 Production on Sat Jan 27 22:13:02 2024
Copyright (c) 1982, 2016, Oracle.  All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> show parameter pfile;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +DATA/ARACDB/PARAMETERFILE/spf
                                                 ile.276.1136924839
SQL> create pfile from spfile;

File created.

[aracdb1:/u01/app/oracle/product/12c/db_1/dbs]> ls -ltr
합계 19272
-rw-r--r--. 1 oracle oinstall     3079  5월 15  2015 init.ora
-rw-r-----. 1 oracle oinstall     2048  5월 23  2023 orapwaracdb1
-rw-r--r--. 1 oracle oinstall       71  5월 23  2023 afiedt.buf
-rw-r-----. 1 oracle asmadmin 19709952  1월 25 16:34 snapcf_aracdb1.f
-rw-rw----. 1 oracle asmadmin     1544  1월 27 22:12 hc_aracdb1.dat
-rw-r--r--. 1 oracle asmadmin     1816  1월 27 22:13 initaracdb1.ora
[aracdb1:/u01/app/oracle/product/12c/db_1/dbs]> cat  initaracdb1.ora
aracdb1.__data_transfer_cache_size=0
aracdb2.__data_transfer_cache_size=0
aracdb1.__db_cache_size=2264924160
aracdb2.__db_cache_size=2264924160
aracdb1.__inmemory_ext_roarea=0
aracdb2.__inmemory_ext_roarea=0
aracdb1.__inmemory_ext_rwarea=0
aracdb2.__inmemory_ext_rwarea=0
aracdb1.__java_pool_size=16777216
aracdb2.__java_pool_size=16777216
aracdb1.__large_pool_size=33554432
aracdb2.__large_pool_size=33554432
aracdb1.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
aracdb2.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
aracdb1.__pga_aggregate_target=1056964608
aracdb2.__pga_aggregate_target=1056964608
aracdb1.__sga_target=3154116608
aracdb2.__sga_target=3154116608
aracdb1.__shared_io_pool_size=167772160
aracdb2.__shared_io_pool_size=167772160
aracdb1.__shared_pool_size=654311424
aracdb2.__shared_pool_size=654311424
aracdb1.__streams_pool_size=0
aracdb2.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/aracdb/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='12.2.0'
*.control_files='+DATA/ARACDB/CONTROLFILE/current.269.1136924667','+FRA/ARACDB/CONTROLFILE/current.259.1136924667'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_name='aracdb'
*.db_recovery_file_dest='+FRA'
*.db_recovery_file_dest_size=10g
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=aracdbXDB)'
family:dw_helper.instance_mode='read-only'
aracdb1.instance_number=1
aracdb2.instance_number=2
*.local_listener='-oraagent-dummy-'
*.log_archive_format='%t_%s_%r.dbf'
*.nls_language='KOREAN'
*.nls_territory='KOREA'
*.open_cursors=300
*.pga_aggregate_target=1000m
*.processes=320
*.remote_login_passwordfile='exclusive'
*.sga_target=2998m
aracdb2.thread=2
aracdb1.thread=1
aracdb1.undo_tablespace='UNDOTBS1'
aracdb2.undo_tablespace='UNDOTBS2'

[root@arac1 ~]# crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.CRS.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.DATA.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.FRA.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.MGMT.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.chad
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.net1.network
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.ons
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.proxy_advm
               OFFLINE OFFLINE      arac1                    STABLE
               OFFLINE OFFLINE      arac2                    STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       arac1                    STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       arac1                    169.254.51.97 192.16
                                                             8.0.111,STABLE
ora.arac1.vip
      1        ONLINE  ONLINE       arac1                    STABLE
ora.arac2.vip
      1        ONLINE  ONLINE       arac2                    STABLE
ora.aracdb.db
      1        ONLINE  OFFLINE      arac1                    Instance Shutdown,ST
                                                             ARTING
      2        ONLINE  OFFLINE      arac2                    Instance Shutdown,ST
                                                             ARTING
ora.asm
      1        ONLINE  ONLINE       arac1                    Started,STABLE
      2        ONLINE  ONLINE       arac2                    Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       arac1                    STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       arac1                    Open,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       arac1                    STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       arac1                    STABLE
--------------------------------------------------------------------------------

1.  Shutdown all the instance in RAC environment.
[root@arac1 ~]# srvctl stop database -d aracdb
[root@arac1 ~]# crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.CRS.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.DATA.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.FRA.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.MGMT.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.chad
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.net1.network
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.ons
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.proxy_advm
               OFFLINE OFFLINE      arac1                    STABLE
               OFFLINE OFFLINE      arac2                    STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       arac1                    STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       arac1                    169.254.51.97 192.16
                                                             8.0.111,STABLE
ora.arac1.vip
      1        ONLINE  ONLINE       arac1                    STABLE
ora.arac2.vip
      1        ONLINE  ONLINE       arac2                    STABLE
ora.aracdb.db
      1        OFFLINE OFFLINE                               Instance Shutdown,ST
                                                             ABLE
      2        OFFLINE OFFLINE                               Instance Shutdown,ST
                                                             ABLE
ora.asm
      1        ONLINE  ONLINE       arac1                    Started,STABLE
      2        ONLINE  ONLINE       arac2                    Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       arac1                    STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       arac1                    Open,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       arac1                    STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       arac1                    STABLE
--------------------------------------------------------------------------------

2.  Shutdown all the listeners.

[root@arac1 ~]# srvctl stop listener -n arac1
[root@arac1 ~]# srvctl stop listener -n arac2
[aracdb1:/u01/app/oracle/product/12c/db_1/dbs]> srvctl stop scan_listener
[aracdb1:/u01/app/oracle/product/12c/db_1/dbs]> crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.CRS.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.DATA.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.FRA.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.LISTENER.lsnr
               OFFLINE OFFLINE      arac1                    STABLE
               OFFLINE OFFLINE      arac2                    STABLE
ora.MGMT.dg
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.chad
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.net1.network
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.ons
               ONLINE  ONLINE       arac1                    STABLE
               ONLINE  ONLINE       arac2                    STABLE
ora.proxy_advm
               OFFLINE OFFLINE      arac1                    STABLE
               OFFLINE OFFLINE      arac2                    STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        OFFLINE OFFLINE                               STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       arac1                    169.254.51.97 192.16
                                                             8.0.111,STABLE
ora.arac1.vip
      1        ONLINE  ONLINE       arac1                    STABLE
ora.arac2.vip
      1        ONLINE  ONLINE       arac2                    STABLE
ora.aracdb.db
      1        OFFLINE OFFLINE                               Instance Shutdown,ST
                                                             ABLE
      2        OFFLINE OFFLINE                               Instance Shutdown,ST
                                                             ABLE
ora.asm
      1        ONLINE  ONLINE       arac1                    Started,STABLE
      2        ONLINE  ONLINE       arac2                    Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       arac1                    STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       arac1                    Open,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       arac1                    STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       arac1                    STABLE
--------------------------------------------------------------------------------

3.  Relink Oracle executable with rac_off option.

  $ make -f ins_rdbms.mk rac_off
  $ make -f ins_rdbms.mk ioracle
  
  
[aracdb1:/u01/app/oracle/product/12c/db_1/rdbms/lib]> make -f ins_rdbms.mk rac_off
rm -f /u01/app/oracle/product/12c/db_1/lib/libskgxp12.so
cp /u01/app/oracle/product/12c/db_1/lib//libskgxpg.so /u01/app/oracle/product/12c/db_1/lib/libskgxp12.so
rm -f /u01/app/oracle/product/12c/db_1/lib/libskgxn2.so
cp /u01/app/oracle/product/12c/db_1/lib//libskgxns.so \
      /u01/app/oracle/product/12c/db_1/lib/libskgxn2.so
/usr/bin/ar d /u01/app/oracle/product/12c/db_1/rdbms/lib/libknlopt.a kcsm.o
/usr/bin/ar cr /u01/app/oracle/product/12c/db_1/rdbms/lib/libknlopt.a /u01/app/oracle/product/12c/db_1/rdbms/lib/ksnkcs.o 

[aracdb1:/u01/app/oracle/product/12c/db_1/rdbms/lib]> make -f ins_rdbms.mk ioracle
chmod 755 /u01/app/oracle/product/12c/db_1/bin

 - Linking Oracle 
rm -f /u01/app/oracle/product/12c/db_1/rdbms/lib/oracle
/u01/app/oracle/product/12c/db_1/bin/orald  -o /u01/app/oracle/product/12c/db_1/rdbms/lib/oracle -m64 -z noexecstack -Wl,--disable-new-dtags -L/u01/app/oracle/product/12c/db_1/rdbms/lib/ -L/u01/app/oracle/product/12c/db_1/lib/ -L/u01/app/oracle/product/12c/db_1/lib/stubs/   -Wl,-E /u01/app/oracle/product/12c/db_1/rdbms/lib/opimai.o /u01/app/oracle/product/12c/db_1/rdbms/lib/ssoraed.o /u01/app/oracle/product/12c/db_1/rdbms/lib/ttcsoi.o -Wl,--whole-archive -lperfsrv12 -Wl,--no-whole-archive /u01/app/oracle/product/12c/db_1/lib/nautab.o /u01/app/oracle/product/12c/db_1/lib/naeet.o /u01/app/oracle/product/12c/db_1/lib/naect.o /u01/app/oracle/product/12c/db_1/lib/naedhs.o /u01/app/oracle/product/12c/db_1/rdbms/lib/config.o  -ldmext -lserver12 -lodm12 -lofs -lcell12 -lnnet12 -lskgxp12 -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lclient12  -lvsn12 -lcommon12 -lgeneric12 -lknlopt `if /usr/bin/ar tv /u01/app/oracle/product/12c/db_1/rdbms/lib/libknlopt.a | grep xsyeolap.o > /dev/null 2>&1 ; then echo "-loraolap12" ; fi` -lskjcx12 -lslax12 -lpls12  -lrt -lplp12 -ldmext -lserver12 -lclient12  -lvsn12 -lcommon12 -lgeneric12 `if [ -f /u01/app/oracle/product/12c/db_1/lib/libavserver12.a ] ; then echo "-lavserver12" ; else echo "-lavstub12"; fi` `if [ -f /u01/app/oracle/product/12c/db_1/lib/libavclient12.a ] ; then echo "-lavclient12" ; fi` -lknlopt -lslax12 -lpls12  -lrt -lplp12 -ljavavm12 -lserver12  -lwwg  `cat /u01/app/oracle/product/12c/db_1/lib/ldflags`    -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lngsmshd12 -lnro12 `cat /u01/app/oracle/product/12c/db_1/lib/ldflags`    -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lngsmshd12 -lnnzst12 -lzt12 -lztkg12 -lmm -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lztkg12 `cat /u01/app/oracle/product/12c/db_1/lib/ldflags`    -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lngsmshd12 -lnro12 `cat /u01/app/oracle/product/12c/db_1/lib/ldflags`    -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lngsmshd12 -lnnzst12 -lzt12 -lztkg12   -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 `if /usr/bin/ar tv /u01/app/oracle/product/12c/db_1/rdbms/lib/libknlopt.a | grep "kxmnsd.o" > /dev/null 2>&1 ; then echo " " ; else echo "-lordsdo12 -lserver12"; fi` -L/u01/app/oracle/product/12c/db_1/ctx/lib/ -lctxc12 -lctx12 -lzx12 -lgx12 -lctx12 -lzx12 -lgx12 -lordimt12 -lclsra12 -ldbcfg12 -lhasgen12 -lskgxn2 -lnnzst12 -lzt12 -lxml12 -lgeneric12 -locr12 -locrb12 -locrutl12 -lhasgen12 -lskgxn2 -lnnzst12 -lzt12 -lxml12 -lgeneric12  -lgeneric12 -lorazip -loraz -llzopro5 -lorabz2 -lipp_z -lipp_bz2 -lippdcemerged -lippsemerged -lippdcmerged  -lippsmerged -lippcore  -lippcpemerged -lippcpmerged  -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lsnls12 -lunls12  -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lasmclnt12 -lcommon12 -lcore12  -laio -lons  -lfthread12   `cat /u01/app/oracle/product/12c/db_1/lib/sysliblist` -Wl,-rpath,/u01/app/oracle/product/12c/db_1/lib -lm    `cat /u01/app/oracle/product/12c/db_1/lib/sysliblist` -ldl -lm   -L/u01/app/oracle/product/12c/db_1/lib `test -x /usr/bin/hugeedit -a -r /usr/lib64/libhugetlbfs.so && test -r /u01/app/oracle/product/12c/db_1/rdbms/lib/shugetlbfs.o && echo -Wl,-zcommon-page-size=2097152 -Wl,-zmax-page-size=2097152 -lhugetlbfs`
test ! -f /u01/app/oracle/product/12c/db_1/bin/oracle || (\
   mv -f /u01/app/oracle/product/12c/db_1/bin/oracle /u01/app/oracle/product/12c/db_1/bin/oracleO &&\
   chmod 600 /u01/app/oracle/product/12c/db_1/bin/oracleO )
mv /u01/app/oracle/product/12c/db_1/rdbms/lib/oracle /u01/app/oracle/product/12c/db_1/bin/oracle
chmod 6751 /u01/app/oracle/product/12c/db_1/bin/oracle
[aracdb1:/u01/app/oracle/product/12c/db_1/rdbms/lib]> 


4.  Remove all the parameters from init.ora which points to second instance and it is on other node.
[aracdb1:/u01/app/oracle/product/12c/db_1/dbs]> cat  initaracdb1.ora
*.audit_file_dest='/u01/app/oracle/admin/aracdb/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='12.2.0'
*.control_files='+DATA/ARACDB/CONTROLFILE/current.269.1136924667','+FRA/ARACDB/CONTROLFILE/current.259.1136924667'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_name='aracdb'
*.db_recovery_file_dest='+FRA'
*.db_recovery_file_dest_size=10g
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=aracdbXDB)'
family:dw_helper.instance_mode='read-only'
aracdb1.instance_number=1
*.local_listener='-oraagent-dummy-'
*.log_archive_format='%t_%s_%r.dbf'
*.nls_language='KOREAN'
*.nls_territory='KOREA'
*.open_cursors=300
*.pga_aggregate_target=1000m
*.processes=320
*.remote_login_passwordfile='exclusive'
*.sga_target=2998m
aracdb1.thread=1
aracdb1.undo_tablespace='UNDOTBS1'


5.  Remove cluster_database parameter
-- 주석 처리
#*.cluster_database=true

6.  Remove undo_tablespace parameter which points to second instance
-- 주석 처리
#aracdb1.undo_tablespace='UNDOTBS2'
7.  Start-up the database in mount stage and execute..

SQL> startup pfile='/u01/app/oracle/product/12c/db_1/dbs/initaracdb1.ora'
ORACLE instance started.

Total System Global Area 3154116608 bytes
Fixed Size                  8625656 bytes
Variable Size             788529672 bytes
Database Buffers         2348810240 bytes
Redo Buffers                8151040 bytes
Database mounted.
Database opened.



alter database disable thread <thread of other instance>

SQL> select INSTANCE_NUMBER,INSTANCE_NAME,THREAD#,STATUS from v$instance;

INSTANCE_NUMBER INSTANCE_NAME       THREAD# STATUS
--------------- ---------------- ---------- ------------
              1 aracdb                    1 OPEN

 

 

 


파라미터 파일 인식

SQL> create spfile from pfile;

-- +data에 spfilearacdb1.ora 생긴다
ASMCMD> pwd
+data
ASMCMD> ls -al
Type           Redund  Striped  Time             Sys  Name
                                                 Y    ASM/
                                                 N    aracdb/
PARAMETERFILE  UNPROT  COARSE   JAN 29 14:00:00  N    spfilearacdb1.ora => +DATA/aracdb/PARAMETERFILE/spfile.278.1159539453

mv initaracdb1.ora initaracdb1.ora.old

vi initaracdb1.ora
spfile='+DATA/aracdb/PARAMETERFILE/spfile.278.1159539453'

SQL> startup
ORACLE instance started.

Total System Global Area 3154116608 bytes
Fixed Size                  8625656 bytesvi initaracdb1.ora
Variable Size             788529672 bytes
Database Buffers         2348810240 bytes
Redo Buffers                8151040 bytes
Database mounted.
Database opened.
SQL> show parameter pfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +DATA/aracdb/PARAMETERFILE/spf
                                                 ile.278.1159539453

 

 

반응형
Posted by [PineTree]
ORACLE/RAC2016. 6. 10. 13:29
반응형


다른서버에 엔진을 묶어서 싱글로 올릴때는 tar로 말아서 옮긴후 아래 내용중 relink 단계까지만 하고 dbca로 생성 하니 잘되네요


My last post about Turn on/off RAC basically is to implement Converting/Migrating Oracle RAC to Single instance. I try to find a way to do this in Google but it seem no result regarding this. You can find thousand of article on converting Single Instance to Oracle RAC but not the other way around. Why?

You'll find a Doc. on Metalink with step by step instructions on "How to convert a
single instance Database to RAC", but not the other way round.
The analyst's response from Oracle is "We cannot convert a RAC database into a Single
instance database, that is the reason why you didnt find any steps.
It is not supported.

Why Oracle mentioned it is not supported? It does not makes any sense that you cannot convert from RAC to non-RAC environment, unless Oracle does not want their customers to go away from RAC.
Anyway…it’s all about $$$$$.
So, based on my knowledge on how Oracle RAC work, I’ve successfully done it.


This is based on Oracle 10G Release 2 and assumes:

1. Oracle RAC running with cluster file system
2. You have basic knowledge about Oracle RAC


Test Server:
OS : Red Hat Enterprise Linux Server release 5.4
Database Version : 10.2.0.4
File system: OCFS2


1. Stop database and CRS on both node

$ srvctl stop database -d mydb
# crsctl stop crs

2. Turn Off RAC

SQL> startup
ORA-29702 error occurred in Cluster Group Service operation


Relink with the RAC OFF.
$ cd $ORACLE_HOME/rdbms/lib
$ /usr/ccs/bin/make -f ins_rdbms.mk rac_off
Relinking oracle
$ make -f ins_rdbms.mk ioracle
## OR , both working fine
$ cd $ORACLE_HOME/bin
$ relink oracle


If ASM Instance Exist, run below command as root
# /oracle/product/10.2.0/db/bin/localconfig delete
# /oracle/product/10.2.0/db/bin/localconfig add

3. Parameter(Pfile/spfile) & database changes

SQL> startup
SQL> alter database disable thread 2;
SQL> alter system set remote_listener='';


3a. Remove unwanted logfile
SQL> select thread#, group# from v$log;
SQL> alter database drop logfile group 3;
SQL> alter database drop logfile group 4;


3b. Remove unwanted tablespace
SQL> drop tablespace UNDOTBS2 including contents and datafiles;


3c. Rename instance name.
SQL> alter system set instance_name=<new_name> scope=spfile;
SQL> shutdown immediate
SQL> startup
- Change your ORACLE_SID environment


4. Run $ORA_CRS_HOME/install/rootdelete.sh on both node
- This will stop and remove all CRS startup related file

5. Remove $ORA_CRS_HOME binary using Clusterware OUI installer
- Ignore any error if 2nd node already down
- rm -rf $ORA_CRS_HOME


6. Modify listener file
$ vi $ORACLE_HOME/network/admin/listener.ora


6a. Modify tnsname file
$ vi $ORACLE_HOME/network/admin/tnsnames.ora

반응형
Posted by [PineTree]