將RAC軟體轉換為單例項軟體

lhrbest發表於2018-06-05

將RAC軟體轉換為單例項軟體

 



http://blog.itpub.net/26736162/viewspace-2155632/

 

 

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

應該還要把初始化引數中的cluster_database改成false

 

The node cloning procedure from a RAC database creates a cloned single instance RAC DB, so the new cloned DB contains an extra thread/instance as in the original RAC environment.

The following steps will remove the other node's files or any existing information in the DB that might contains information for the other instances that should not exist in this single instance environment:

1.  Shutdown all the instance in RAC environment.

2.  Shutdown all the listeners.

3.  Relink Oracle executable with rac_off option.

  $ make -f ins_rdbms.mk rac_off

  $ make -f ins_rdbms.mk ioracle

4.  Remove all the parameters from init.ora which points to second instance and it is on other node.

5.  Remove cluster_database parameter

6.  Remove undo_tablespace parameter which points to second instance

7.  Start-up the database in mount stage and execute..

alter database disable thread <thread of other instance>

8.  Open the database.

9.  After opening database you can drop the redo-log groups which are for other instance. You can also drop any other tablespace of other instance.

10.  Run the following command as the Oracle software install owner, and make sure the $ORACLE_HOME is defined before running the following command:

$ORACLE_HOME/oui/bin/runInstaller -updateNodeList ORACLE_HOME=$ORACLE_HOME

"CLUSTER_NODES={node_list}" CRS=FALSE

Note: Replace the {node_list} with the current node only as this is a single instance database so you should write down the existing only node name of the node that is hosting this database instance.

 

1.1  將RAC軟體轉換為單例項軟體

http://blog.itpub.net/26736162/viewspace-2155632/

 

rac環境中,只有在叢集正常啟動的情況下才能建立和啟動單例項的資料庫,否則報錯:

[oracle@raclhr-11gR2-N1 ~]$ sqlplus / as sysdba

 

SQL*Plus: Release 11.2.0.3.0 Production on Tue Jun 5 09:40:26 2018

 

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

 

Connected to an idle instance.

 

SYS@OGGS> startup

ORA-29702: error occurred in Cluster Group Service operation

SYS@OGGS>

 

解決辦法:

NON-RAC Database Startup Giving Error ORA-29702 (文件 ID 433310.1)

1. Shutdown the database completely.

2. Relink with RAC OFF use oracle owner:

$ cd $ORACLE_HOME/rdbms/lib

$ make -f ins_rdbms.mk rac_off

$ make -f ins_rdbms.mk ioracle

1. Startup the database.

 

在執行編譯後,叢集仍然能正常啟動,但是叢集中的RAC資料庫不能正常啟動,會報錯:

SYS@lhrrac11> startup

ORA-01078: failure in processing system parameters

ORA-00439: feature not enabled: Real Application Clusters

SYS@lhrrac11>

恢復操作:

$ cd $ORACLE_HOME/rdbms/lib

$ make -f ins_rdbms.mk rac_on

$ make -f ins_rdbms.mk ioracle

 

至於grid部分,我們可以刪除,也可以保留。




將RAC軟體轉換為單例項軟體

 

NON-RAC Database Startup Giving Error ORA-29702 (文件 ID 433310.1)

In this Document

 Symptoms
 Cause
 Solution

 

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.

APPLIES TO:

Oracle Database - Enterprise Edition - Version 10.2.0.3 and later
Oracle Solaris on SPARC (64-bit)
***Checked for relevance on 15-Jun-2012***
***Checked for relevance on 27-Aug-2014***

SYMPTOMS

While starting up the database, Getting error ORA-29702

Messages in the Alert Log file:

Cluster communication is configured to use the following interface(s) for this instance  192.168.193.2 
Wed May 23 16:00:55 2007 
cluster interconnect IPC version:Oracle UDP/IP (generic) 
WARNING: Failed to set buffer limit on IPC interconnect socket Oracle requires that the
SocketReceive buffer size be tunable upto 1MB
Please make sure the kernel parameterwhich limits SO_RCVBUF value set by applications is atleast 1MB
MMNL started with pid=15, OS id=14908 
Wed May 23 16:00:56 2007 
starting up 1 shared server(s) ... 
USER: terminating instance due to error 29702 
Instance terminated by USER, pid = 14841
 

CAUSE

RDBMS install is not running on RAC but still it is assuming it to be RAC instance.

Cluster information required according to alert.log

SOLUTION

1. Shutdown the database completely.

2. Relink with RAC OFF :

$ cd $ORACLE_HOME/rdbms/lib

$ make -f ins_rdbms.mk rac_off

$ make -f ins_rdbms.mk ioracle


3. Startup the database.

 

 



........................................................................................................................

● 本文作者:小麥苗,部分內容整理自網路,若有侵權請聯絡小麥苗刪除

● 本文在itpub(http://blog.itpub.net/26736162)、部落格園(http://www.cnblogs.com/lhrbest)和個人微信公眾號(xiaomaimiaolhr)上有同步更新

● 本文itpub地址:http://blog.itpub.net/26736162

● 本文部落格園地址:http://www.cnblogs.com/lhrbest

● 本文pdf版、個人簡介及小麥苗雲盤地址:http://blog.itpub.net/26736162/viewspace-1624453/

● 資料庫筆試面試題庫及解答:http://blog.itpub.net/26736162/viewspace-2134706/

● DBA寶典今日頭條號地址:http://www.toutiao.com/c/user/6401772890/#mid=1564638659405826

........................................................................................................................

● QQ群號:230161599(滿)、618766405

● 微信群:可加我微信,我拉大家進群,非誠勿擾

● 聯絡我請加QQ好友646634621,註明新增緣由

● 於 2018-07-01 06:00 ~ 2018-07-31 24:00 在魔都完成

● 最新修改時間:2018-07-01 06:00 ~ 2018-07-31 24:00

● 文章內容來源於小麥苗的學習筆記,部分整理自網路,若有侵權或不當之處還請諒解

● 版權所有,歡迎分享本文,轉載請保留出處

........................................................................................................................

小麥苗的微店https://weidian.com/s/793741433?wfr=c&ifr=shopdetail

小麥苗出版的資料庫類叢書http://blog.itpub.net/26736162/viewspace-2142121/

小麥苗OCP、OCM、高可用網路班http://blog.itpub.net/26736162/viewspace-2148098/

........................................................................................................................

使用微信客戶端掃描下面的二維碼來關注小麥苗的微信公眾號(xiaomaimiaolhr)及QQ群(DBA寶典)、新增小麥苗微信,學習最實用的資料庫技術。

將RAC軟體轉換為單例項軟體

........................................................................................................................

將RAC軟體轉換為單例項軟體將RAC軟體轉換為單例項軟體

 

 



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26736162/viewspace-2155632/,如需轉載,請註明出處,否則將追究法律責任。

相關文章