zoukankan      html  css  js  c++  java
  • 将RAC软件转换为单实例软件

     

     

    将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部分,我们可以删除,也可以保留。




     
    单击此项可添加到收藏夹

    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宝典)、添加小麦苗微信,学习最实用的数据库技术。

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

    欢迎与我联系

     

     



  • 相关阅读:
    Java网络编程:OSI七层模型和TCP/IP模型介绍
    Java网络编程:IP地址和端口号
    Java缓冲流的优点和原理
    Java线程的优先级设置遵循什么原则?
    java笔试题大全带答案(经典11题)
    java笔试题大全之IO流常见选择题
    java笔试手写算法面试题大全含答案
    java笔试常见的选择题
    Java的类加载器都有哪些,每个类加载器都有加载那些类,什么是双亲委派模型,是做什么的?
    Java的安全性如何理解
  • 原文地址:https://www.cnblogs.com/lhrbest/p/9304050.html
Copyright © 2011-2022 走看看