0% found this document useful (0 votes)
4 views

Converting RAC Database to Single Instance database

The document outlines the steps to convert a RAC database to a single instance database, including checking the database status, stopping services, removing instances, and starting the database with a new configuration. It details commands to disable clustering, drop unnecessary log files, and create new parameter files. Finally, it mentions relinking the Oracle binaries to unregister from RAC, ensuring the database operates as a single instance.

Uploaded by

Nagaraju Peeta
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Converting RAC Database to Single Instance database

The document outlines the steps to convert a RAC database to a single instance database, including checking the database status, stopping services, removing instances, and starting the database with a new configuration. It details commands to disable clustering, drop unnecessary log files, and create new parameter files. Finally, it mentions relinking the Oracle binaries to unregister from RAC, ensuring the database operates as a single instance.

Uploaded by

Nagaraju Peeta
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

Converting RAC Database to Single Instance database (Not ONE NODE RAC).

Check the database status


=======================

oleracrs01p.in.sensis.com.au::/home/oratest#srvctl status db -d ONLT2 -v


Instance ONLT21 is running on node oleracrs01p with online services OCMSTSRV,ONLT2SRV. Instance
status: Open.
Instance ONLT22 is running on node oleracrs02p with online services OCMSTSRV,ONLT2SRV. Instance
status: Open.

Stop all the services which are enabled


=================================

oleracrs01p.in.sensis.com.au:ONLT21:/home/oratest#srvctl stop service -s ONLT2SRV -d ONLT2


oleracrs01p.in.sensis.com.au:ONLT21:/home/oratest#srvctl stop service -s OCMSTSRV -d ONLT2

oleracrs01p.in.sensis.com.au:ONLT21:/home/oratest#sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jan 21 11:00:01 2016

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 and Real Application Clusters options

SQL> select * from global_name;

GLOBAL_NAME
--------------------------------------------------------------------------------
ONLT2

SQL> set lines 200 pages 300


SQL> select * from v$option order by 1;

PARAMETER VALUE
------------------------------------------------------------------------
Real Application Clusters TRUE
Real Application Testing FALSE

SQL> exit

Remove all the services


=========================

oleracrs01p.in.sensis.com.au:ONLT21:/home/oratest#srvctl remove service -s ONLT2SRV -d ONLT2


oleracrs01p.in.sensis.com.au:ONLT21:/home/oratest#srvctl remove service -s OCMSTSRV -d ONLT2

Stop the database


=====================
oleracrs01p.in.sensis.com.au:ONLT21:/home/oratest#srvctl stop database -d ONLT2

Remove the database from cluster


==================================
oleracrs01p.in.sensis.com.au:ONLT21:/ora/app/oratest/product/11.2.0/dbhome_2/dbs#srvctl remove
db -d ONLT2
Remove the database ONLT2? (y/[n]) y
Remove the instances from cluster
===================================
oleracrs01p.in.sensis.com.au:ONLT21:/home/oratest#srvctl remove instance -i ONLT21 -d ONLT2
Remove instance from the database ONLT2? (y/[n]) y

oleracrs01p.in.sensis.com.au:ONLT21:/home/oratest#srvctl remove instance -i ONLT22 -d ONLT2


Remove instance from the database ONLT2? (y/[n]) y

Start the database with startup command


==========================================

oleracrs01p.in.sensis.com.au:ONLT21:/home/oratest#. oraenv
ORACLE_SID = [ONLT21] ?
The Oracle base remains unchanged with value /ora/app/oratest
oleracrs01p.in.sensis.com.au:ONLT21:/home/oratest#sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jan 21 11:05:33 2016

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 2087780352 bytes


Fixed Size 2229944 bytes
Variable Size 1291848008 bytes
Database Buffers 754974720 bytes
Redo Buffers 38727680 bytes
Database mounted.
Database opened.

Fire below queries


=====================

SQL> alter system set cluster_database=false scope=spfile;

System altered.

SQL> alter system set cluster_database_instances=1 scope=spfile;

System altered.

Disable thread 2 and remove thread 2 logs


============================================

SQL> alter database disable thread 2;

Database altered.

SQL> select thread#, group# from v$log order by 1;

THREAD# GROUP#
---------- ----------
1 1
1 2
1 3
2 4
2 5
2 6

6 rows selected.

SQL> alter database drop logfile group 4;

Database altered.

SQL> alter database drop logfile group 5;

Database altered.

SQL> alter database drop logfile group 6;

Database altered.

SQL> select thread#, group# from v$log order by 1;

THREAD# GROUP#
---------- ----------
1 1
1 3
1 2

Drop Instance - 2 Undo Tablespace


==================================
SQL> drop tablespace UNDOTBS2 including contents and datafiles;

Tablespace dropped.

SQL> create pfile from spfile;

File created.

Shut down the database


===========================

SQL> shut immediate;


Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit

startup the database with newly created pfile. In this pfile, make sure you
commented/removed all the thread 2 related entries
==============================================

oleracrs01p.in.sensis.com.au:ONLT21:/ora/app/oratest/product/11.2.0/dbhome_2/dbs#sqlplus / as
sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jan 21 11:15:25 2016

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

Connected to an idle instance.

SQL> startup pfile='/ora/app/oratest/product/11.2.0/dbhome_2/dbs/initONLT21.ora'


ORACLE instance started.
Total System Global Area 2087780352 bytes
Fixed Size 2229944 bytes
Variable Size 1291848008 bytes
Database Buffers 754974720 bytes
Redo Buffers 38727680 bytes
Database mounted.
Database opened.

Create spfile
================

SQL> create spfile from pfile;

File created.

SQL> shut immediate;


Database closed.
Database dismounted.
ORACLE instance shut down.

Startup again with spfile


===========================

SQL> startup
ORACLE instance started.

Total System Global Area 2087780352 bytes


Fixed Size 2229944 bytes
Variable Size 1291848008 bytes
Database Buffers 754974720 bytes
Redo Buffers 38727680 bytes
Database mounted.
Database opened.
SQL> select * from global_name;

GLOBAL_NAME
--------------------------------------------------------------------------------
ONLT2

SQL> set lines 200 pages 300


SQL> col HOST_NAME for a50;
select INSTANCE_NAME,HOST_NAME,to_char(STARTUP_TIME,'YYYY-MM-DD HH24:MI:SS')
STARTUP_TIME,LOGINS from gv$instance;SQL>

INSTANCE_NAME HOST_NAME STARTUP_TIME LOGINS


---------------- -------------------------------------------------- ------------------- ----------
ONLT21 oleracrs01p.in.sensis.com.au 2016-01-21 11:17:43 ALLOWED

SQL> select unique e.inst_id,instance_name,name DATABASE,OPEN_MODE,LOG_MODE from


gv$instance e, gv$database ORDER BY 1;

INST_ID INSTANCE_NAME DATABASE OPEN_MODE LOG_MODE


---------- ---------------- --------- -------------------- ------------
1 ONLT21 ONLT2 READ WRITE NOARCHIVELOG

even though once after creation of this you RAC option will still show Real Application Cluster as TRUE
only. Why means here we are not cloned oracle home to new location. We need to fire below
commands to unregister from RAC
oleracrs01p.in.sensis.com.au::/ora/app/oratest/product/11.2.0/dbhome_1/rdbms/lib#ls -rlt *rdbms*
-rw-r--r-- 1 oratest oinstall 40678 Sep 17 2011 ins_rdbms.mk
-rw-r--r-- 1 oratest oinstall 142652 Sep 17 2011 env_rdbms.mk

oleracrs01p.in.sensis.com.au::/ora/app/oratest/product/11.2.0/dbhome_1/rdbms/lib# make -f
ins_rdbms.mk rac_off

make -f ins_rdbms.mk ioracle  relinking the Oracle binaries

You might also like