【总文档】rac增加新节点的方法步骤 How to Add Node/Instance or Remove Node/Instance in 10gR2, 11gR1, 11gR2 and 12c Oracle Clusterware and RAC

时间:2022-10-05 20:48:58

【总文档】How to Add Node/Instance or Remove Node/Instance in 10gR2, 11gR1, 11gR2 and 12c Oracle Clusterware and RAC (Doc ID 1332451.1)

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=441102606823997&id=1332451.1&_afrWindowMode=0&_adf.ctrl-state=idclk5aai_80

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

【分文档】

10 Adding and Deleting Oracle RAC from Nodes on Linux and UNIX Systems

This chapter describes how to extend an existing Oracle Real Application Clusters (Oracle RAC) home to other nodes and instances in the cluster, and delete Oracle RAC from nodes and instances in the cluster. This chapter provides instructions for Linux and UNIX systems.

If your goal is to clone an existing Oracle RAC home to create multiple new Oracle RAC installations across the cluster, then use the cloning procedures that are described in Chapter 8, "Cloning Oracle RAC to Nodes in a Cluster".

The topics in this chapter include the following:

Note:

The phrase "target node" as used in this chapter refers to the node to which you plan to extend Oracle RAC environment.

See Also:

Oracle Database 2 Day + Real Application Clusters Guide for additional information about configuring a new Oracle RAC cluster or scaling up an existing Oracle RAC cluster

Adding Oracle RAC to Nodes with Oracle Clusterware Installed

Before beginning this procedure, ensure that your existing nodes have the correct path to the Grid_home and that the $ORACLE_HOME environment variables are set correctly.

See Also:

Oracle Clusterware Administration and Deployment Guide for information about adding nodes to a cluster

To add Oracle RAC to nodes that have Oracle Clusterware installed, you must extend the Oracle RAC home that is on an existing node (node1 in this procedure) of the cluster to the target nodes.

  1. Navigate to the Oracle_home/oui/bin directory on node1 and run the addNode.sh script using the following syntax:

    $ ./addNode.sh -silent "CLUSTER_NEW_NODES={node2}"
    
  2. Run the root.sh script on node2 as root.

  3. If you store your policy-managed database on Oracle Automatic Storage Management (Oracle ASM), Oracle Managed Files (OMF) is enabled, and if there is space in a server pool for node2, then crsd adds the Oracle RAC instance to node2 and no further action is necessary. If OMF is not enabled, then you must manually add undo and redo logs.

    If there is no space in a server pool, then node2 moves into the FREE server pool. Use the srvctl modify srvpool command to increase the cardinality of the server pool to accommodate node2, after which time node2 moves out of the FREE server pool and into the modified server pool, and crsd adds the Oracle RAC instance to node2.

  4. If you have an administrator-managed database, then add a new instance on node2 as described in "Adding Oracle RAC Database Instances to Target Nodes".

Note:

Oracle recommends that you back up your voting disk and Oracle Cluster Registry (OCR) files after you complete the node addition process.

Adding Oracle RAC Database Instances to Target Nodes

Note:

The procedures in this section only apply to administrator-managed databases. Policy-managed databases use nodes when the nodes are available in the databases' server pool.

You can use either Oracle Enterprise Manager or DBCA to add Oracle RAC database instances to the target nodes. To add a database instance to a target node with Oracle Enterprise Manager, see the Oracle Database 2 Day + Real Application Clusters Guide for complete information.

This section describes using DBCA to add Oracle RAC database instances under the following topics:

These tools guide you through the following tasks:

  • Creating a new database instance on each target node

  • Creating and configuring high availability components

  • Creating the Oracle Net configuration for a non-default listener from the Oracle home

  • Starting the new instance

  • Creating and starting services if you entered services information on the Services Configuration page

After adding the instances to the target nodes, you should perform any necessary service configuration procedures, as described in Chapter 5, "Introduction to Automatic Workload Management".

Using DBCA in Interactive Mode to Add Database Instances to Target Nodes

To add a database instance to a target node with DBCA in interactive mode, perform the following steps:

  1. Ensure that your existing nodes have the ORACLE_HOME environment variable set correctly.

  2. Start DBCA by entering dbca at the system prompt from the Oracle_home/bin directory.

    DBCA performs certain CVU checks while running. However, you can also run CVU from the command line to perform various verifications.

    See Also:

    Oracle Clusterware Administration and Deployment Guide for more information about CVU

    DBCA displays the Welcome page for Oracle RAC. Click Help on any DBCA page for additional information.

  3. Select Oracle Real Application Clusters (RAC) database, click Next, and DBCA displays the Operations page.

    Alternatively, you can choose either Oracle RAC One Node database or Oracle single instance database.

    If you choose Oracle RAC One Node database, then select either Admin-Managed or Policy-Managed:

    If you select Admin-Managed:

    1. Enter a name for the database in the form of name.domain in the Global Database Name field.

    2. Enter a prefix to be used to name the cluster database instances in the SID Prefix field.

    3. Enter a name to be used by applications to connect to the Oracle RAC One Node database in the Service Name field.

    4. Select the nodes on which you want to create the cluster database and click Next.

    If you select Policy-Managed:

    1. Enter a name for the database in the form of name.domain in the Global Database Name field.

    2. Enter a name to be used by applications to connect to the Oracle RAC One Node database in the Service Name field.

    3. Select either Create New Server Pool for this database or Use Existing Server Pool for this database.

      If you select Create New Server Pool for this database, then enter a name for the server pool in the Server Pool Name field and assign cardinality to the server pool in the Cardinality field and click Next.

      If you select Use Existing Server Pool for this database, then select an existing server pool from the Select Server Pool [cardinality] field and click Next.

  4. If your database is administrator managed, select Instance Management, click Next, and DBCA displays the Instance Management page.

    If your database is policy-managed, then the Instance Management option is not available. To increase the number of database instances, add more nodes to the server pool.

  5. Select Add Instance and click Next. DBCA displays the List of Cluster Databases page that shows the databases and their current status, such as ACTIVE or INACTIVE.

  6. From the List of Cluster Databases page, select the active Oracle RAC database to which you want to add an instance. Enter user name and password for the database user that has SYSDBA privileges. Click Next and DBCA displays the List of Cluster Database Instances page showing the names of the existing instances for the Oracle RAC database that you selected.

  7. Click Next to add a new instance and DBCA displays the Adding an Instance page.

  8. On the Adding an Instance page, enter the instance name in the field at the top of this page if the instance name that DBCA provides does not match your existing instance naming scheme. Then select the target node name from the list, click Next, and DBCA displays the Services Page.

  9. Enter the services information for the target node's instance, click Next, and DBCA displays the Instance Storage page.

  10. If you are using raw devices or raw partitions, then on the Instance Storage page select the Tablespaces folder and expand it. Select the undo tablespace storage object and a dialog appears on the right-hand side. Change the default data file name to the raw device name for the tablespace.

  11. If you are using raw devices or raw partitions or if you want to change the default redo log group file name, then on the Instance Storage page select and expand the Redo Log Groups folder. For each redo log group number that you select, DBCA displays another dialog box.

  12. If you are using a cluster file system, then click Finish on the Instance Storage page. If you are using raw devices, then repeat step 11 for all of the other redo log groups, click Finish, and DBCA displays a Summary dialog.

  13. Review the information on the Summary dialog and click OK or click Cancel to end the instance addition operation. DBCA displays a progress dialog showing DBCA performing the instance addition operation. When DBCA completes the instance addition operation, DBCA displays a dialog asking whether you want to perform another operation.

  14. After you terminate your DBCA session, run the following command to verify the administrative privileges on the target node and obtain detailed information about these privileges where nodelist consists of the target nodes:

    cluvfy comp admprv -o db_config -d oracle_home -n nodelist [-verbose]
    
  15. Perform any necessary service configuration procedures, as described in Chapter 5, "Introduction to Automatic Workload Management".

Using DBCA in Silent Mode to Add Database Instances to Target Nodes

You can use DBCA in silent mode to add instances to nodes on which you have extended an Oracle Clusterware home and an Oracle Database home. Before you run the dbcacommand, ensure that you have set the ORACLE_HOME environment variable correctly on the existing nodes. Run DBCA, supplying values for the variables described in Table 10-1,as follows:

dbca -silent -addInstance -nodeList node_name -gdbName gdb_name
[-instanceName instance_name -sysDBAUserName sysdba -sysDBAPassword password]

Table 10-1 Variables in the DBCA Silent Mode Syntax

Variable Description

node_name

The node on which you want to add (or delete) the instance.

gdb_name

Global database name.

instance_name

Name of the instance. Provide an instance name only if you want to override the Oracle naming convention for Oracle RAC instance names.

sysdba

Name of the Oracle user with SYSDBA privileges.

password

Password for the SYSDBA user.

Perform any necessary service configuration procedures, as described in Chapter 5, "Introduction to Automatic Workload Management".

Deleting Oracle RAC from a Cluster Node

To remove Oracle RAC from a cluster node, you must delete the database instance and the Oracle RAC software before removing the node from the cluster.

Note:

If there are no database instances on the node you want to delete, then proceed to "Removing Oracle RAC".

This section includes the following procedures to delete nodes from clusters in an Oracle RAC environment:

Deleting Instances from Oracle RAC Databases

The procedures for deleting instances are different for policy-managed and administrator-managed databases.

Deleting Policy-Managed Databases

If you plan to delete the node on which the database resides from the cluster, then, before deleting the database instance, run the following command on a remaining node to deconfigure Oracle Enterprise Manager on the node you plan to delete:

emca -deleteNode db

The Oracle Enterprise Manager Configuration Assistant prompts you for database and node information.

To delete a policy-managed database, decrease the size of the server pool in which a database instance resides. This effectively removes the instance without having to remove the Oracle RAC software from the node or the node from the cluster.

For example, you can delete a policy-managed database by running the following commands on any node in the cluster:

$ srvctl stop instance -d db_unique_name -n node_name
$ srvctl relocate server -n node_name -g Free

The first command stops on the instance on a particular node and the second command moves the node out of its current server pool and into the Free server pool.

See Also:

"Removing Oracle RAC" for information about removing the Oracle RAC software from a node

Deleting Instances from Administrator-Managed Databases

Note:

Before deleting an instance from an Oracle RAC database, use either SRVCTL or Oracle Enterprise Manager to do the following:

  • If you have services configured, then relocate the services

  • Modify the services so that each service can run on one remaining instance

  • Ensure that the instance to be removed from an administrator-managed database is neither a preferred nor an available instance of any service

The procedures in this section explain how to use DBCA in interactive or silent mode, to delete an instance from an Oracle RAC database.

See Also:

Oracle Database 2 Day + Real Application Clusters Guide for information about how to delete a database instance from a target node with Oracle Enterprise Manager

This section includes the following topics:

Using DBCA in Interactive Mode to Delete Instances from Nodes

To delete an instance using DBCA in interactive mode, perform the following steps:

  1. Verify there is a current backup of the OCR.

    Run the ocrconfig -showbackup command to ensure there is a valid backup.

  2. Start DBCA.

    Start DBCA on a node other than the node that hosts the instance that you want to delete. The database and the instance that you plan to delete should continue to be started and running during this step.

  3. On the DBCA Welcome page select Oracle Real Application Clusters Database, click Next. DBCA displays the Operations page.

  4. On the DBCA Operations page, select Instance Management and click Next. DBCA displays the Instance Management page.

  5. On the DBCA Instance Management page, select the instance to be deleted, select Delete Instance, and click Next.

  6. On the List of Cluster Databases page, select the Oracle RAC database from which to delete the instance, as follows:

    1. On the List of Cluster Database Instances page, DBCA displays the instances that are associated with the Oracle RAC database that you selected and the status of each instance. Select the cluster database from which you will delete the instance.

    2. Enter a user name and password for the database user that has SYSDBA privileges. Click Next.

    3. Click OK on the Confirmation dialog to proceed to delete the instance.

      DBCA displays a progress dialog showing that DBCA is deleting the instance. During this operation, DBCA removes the instance and the instance's Oracle Net configuration. When DBCA completes this operation, DBCA displays a dialog asking whether you want to perform another operation.

      Click No and exit DBCA or click Yes to perform another operation. If you click Yes, then DBCA displays the Operations page.

  7. Verify that the dropped instance's redo thread has been removed by querying the V$LOG view. If the redo thread is not disabled, then disable the thread. For example:

    SQL> ALTER DATABASE DISABLE THREAD 2;
    
  8. Verify that the instance has been removed from the OCR by running the following command:

    srvctl config database -d db_unique_name
    
  9. If you are deleting more than one node, then repeat these steps to delete the instances from all the nodes that you are going to delete.

Using DBCA in Silent Mode to Delete Instances from Nodes

You can use DBCA in silent mode to delete a database instance from a node.

Run the following command, where the variables are the same as those shown in Table 10-1 for the DBCA command to add an instance. Provide a node name only if you are deleting an instance from a node other than the one on where DBCA is running as shown in the following example where password is the password:

dbca -silent -deleteInstance [-nodeList node_name] -gdbName gdb_name
-instanceName instance_name -sysDBAUserName sysdba -sysDBAPassword password

At this point, you have accomplished the following:

  • Deregistered the selected instance from its associated Oracle Net Services listeners

  • Deleted the selected database instance from the instance's configured node

  • Removed the Oracle Net configuration

  • Deleted the Oracle Flexible Architecture directory structure from the instance's configured node.

Removing Oracle RAC

This procedure removes Oracle RAC from the node you are deleting from the cluster and updates inventories on the remaining nodes.

  1. If there is a listener in the Oracle RAC home on the node you are deleting, then you must disable and stop it before deleting the Oracle RAC software. Run the following commands on any node in the cluster, specifying the name of the listener and the name of the node you are deleting:

    $ srvctl disable listener -l listener_name -n name_of_node_to_delete
    $ srvctl stop listener -l listener_name -n name_of_node_to_delete
  2. Run the following command from $ORACLE_HOME/oui/bin on the node that you are deleting to update the inventory on that node:

    $ ./runInstaller -updateNodeList ORACLE_HOME=Oracle_home_location
    "CLUSTER_NODES={name_of_node_to_delete}" -local
  3. Depending on whether you have a shared or nonshared Oracle home, complete one of the following two procedures to remove the Oracle RAC software:

    • For a shared home, detach the node instead of deinstalling it by running the following command from the $ORACLE_HOME/oui/bin directory on each of the nodes that you want to delete:

      $ ./runInstaller -detachHome ORACLE_HOME=Oracle_home_location
      
    • For a nonshared home, deinstall the Oracle home from the node that you are deleting by running the following command from the $ORACLE_HOME/deinstall directory:

      $ ./deinstall -local
      

      See Also:

      Oracle Clusterware Administration and Deployment Guide for more information about deleting nodes

  4. Run the following command from the $ORACLE_HOME/oui/bin directory on any one of the remaining nodes in the cluster to update the inventories of those nodes, specifying a comma-delimited list of remaining node names:

    $ ./runInstaller -updateNodeList ORACLE_HOME=Oracle_home_location
    "CLUSTER_NODES={remaining_node_list}"

Deleting Nodes from the Cluster

After you delete the instance, you can begin the process of deleting the node from the cluster. You accomplish this by running scripts on the node you want to delete to remove the Oracle Clusterware installation and you run scripts on the remaining nodes to update the node list.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

【细分文档】 增加grid

Extending the Oracle Grid Infrastructure Home to the New Node
Now that the new node has been configured to support Oracle Clusterware, you use Oracle Universal Installer (OUI) to
add a Grid home to the node being added to your cluster.

This section assumes that you are adding a node named racnode3 and that you have successfully installed Oracle Clusterware on racnode1 in a nonshared home,
where Grid_home represents the successfully installed Oracle Clusterware home.

To extend the Oracle Grid Infrastructure for a cluster home to include the new node:

Verify the new node has been properly prepared for an Oracle Clusterware installation by running the following CLUVFY command on the racnode1 node:

cluvfy stage -pre nodeadd -n racnode3 -verbose

As the oracle user (owner of the Oracle Grid Infrastructure for a cluster software installation) on racnode1,
go to Grid_home/oui/bin and run the addNode.sh script in silent mode:

If you are using Grid Naming Service (GNS):

./addNode.sh -silent "CLUSTER_NEW_NODES={racnode3}"
If you are not using Grid Naming Service (GNS):

./addNode.sh -silent "CLUSTER_NEW_NODES={racnode3}" "CLUSTER_NEW_VIRTUAL_
HOSTNAMES={racnode3-vip}"
When running this command, the curly braces ( { } ) are not optional and must be included or the command returns an error.

You can alternatively use a response file instead of placing all the arguments in the command line.
See Oracle Clusterware Administration and Deployment Guide for more information on using response files.

When the script finishes, run the root.sh script as the root user on the new node, racnode3, from the Oracle home directory on that node.

If you are not using Oracle Grid Naming Service (GNS), then you must add the name and address for racnode3 to DNS.

You should now have Oracle Clusterware running on the new node. To verify the installation of Oracle Clusterware on the new node,
you can run the following command on the newly configured node, racnode3:

$ cd /u01/app/11.2.0/grid/bin
$ ./cluvfy stage -post nodeadd -n racnode3 -verbose
Note:

Avoid changing host names after you complete the Oracle Clusterware installation, including adding or deleting domain qualifications.
Nodes with changed host names must be deleted from the cluster and added back with the new name.
See Also:

"Completing the Oracle Clusterware Configuration"

Oracle Real Application Clusters Administration and Deployment Guide for more information about adding and removing nodes from your cluster database

Extending the Oracle RAC Home Directory
Now that you have extended the Grid home to the new node, you must extend the Oracle home on racnode1 to racnode3.
The following steps assume that you have completed the tasks described in the previous sections,
"Preparing the New Node" and "Extending the Oracle Grid Infrastructure Home to the New Node",
and that racnode3 is a member node of the cluster to which racnode1 belongs.

The procedure for adding an Oracle home to the new node is very similar to the procedure you just completed for extending the Grid home to the new node.

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

【细分文档】 增加oracle

To extend the Oracle RAC installation to include the new node:

Ensure that you have successfully installed the Oracle RAC software on at least one node in your cluster environment. To use these procedures as shown,
replace Oracle_home with the location of your installed Oracle home directory.

Go to the Oracle_home/oui/bin directory on racnode1 and run the addNode.sh script in silent mode as shown in the following example:

$ cd /u01/app/oracle/product/11.2.0/dbhome_1/oui/bin
$ ./addNode.sh -silent "CLUSTER_NEW_NODES={racnode3}"
When the script finishes, run the root.sh script as the root user on the new node, racnode3, from the Oracle home directory on that node.

For policy-managed databases with Oracle Managed Files (OMF) enabled, no further actions are needed.

For a policy-managed database, when you add a new node to the cluster, it is placed in the Free pool by default.
If you increase the cardinality of the database server pool, then an Oracle RAC instance is added to the new node, racnode3,
and it is moved to the database server pool. No further action is necessary.

Add shared storage for the undo tablespace and redo log files.

If OMF is not enabled for your database, then you must manually add an undo tablespace and redo logs.

If you have an administrator-managed database, then add a new instance on the new node as described in "Creating an Instance on the New Node".

If you followed the installation instructions in this guide, then your cluster database is an administrator-managed database
and stores the database files on Oracle Automatic Storage Management (Oracle ASM) with OMF enabled.

After completing these steps, you should have an installed Oracle home on the new node.

See Also:

"Verifying Your Oracle RAC Database Installation"

Oracle Real Application Clusters Administration and Deployment Guide for more information about adding and removing nodes from your cluster database

Adding the New Node to the Cluster using Enterprise Manager

【总文档】rac增加新节点的方法步骤 How to Add Node/Instance or Remove Node/Instance in 10gR2, 11gR1, 11gR2 and 12c Oracle Clusterware and RAC的更多相关文章

  1. oracle 11g r1 RAC增加新节点

    在一套两节点的rac上增加一个新的节点,详细的操作记录如下:   已有节点RAC1,RAC2 一,环境及版本: 公司环境:Vmware Esxi 5.5  操作系统:Redhat 5.8 x86_64 ...

  2. C#如何向word文档插入一个新段落及隐藏段落

    编辑Word文档时,我们有时会突然想增加一段新内容:而将word文档给他人浏览时,有些信息我们是不想让他人看到的.那么如何运用C#编程的方式巧妙地插入或隐藏段落呢?本文将与大家分享一种向Word文档插 ...

  3. XMLHelper类 源码(XML文档帮助类,静态方法,实现对XML文档的创建,及节点和属性的增、删、改、查)

    以下是代码: using System; using System.Collections.Generic; using System.Linq; using System.Web; using Sy ...

  4. javascrit2.0完全参考手册(第二版) 第1章第1节 在XHTML文档中增加javascript

    通常,向文档中增加script脚本使用<script>元素,在HTML中增加脚本的方式有4中: (1)放到<script></script>块中: (2)<s ...

  5. Hadoop概念学习系列之Hadoop集群动态增加新节点或删除已有某节点及复制策略导向 (四十三)

    不多说,直接上干货! hadoop-2.6.0动态添加新节点 https://blog.csdn.net/baidu_25820069/article/details/52225216 Hadoop集 ...

  6. javaScript获取文档中所有元素节点的个数

    HTML+JS 代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset=&qu ...

  7. rac添加新节点的步骤与方法(官方步骤与自我测试)

    Extending the Oracle Grid Infrastructure Home to the New NodeNow that the new node has been configur ...

  8. 修复jquery&period;treeview的增加子节点的方法的bug

    1.修复理由 在一个android项目中用到了treeview控件(本来自己通过android的原生api实现了一个http://www.cnblogs.com/Mr-Nobody/p/3527688 ...

  9. java&colon; (正则表达式,XML文档,DOM和DOM4J解析方法)

    常见的XML解析技术: 1.DOM(基于XML树结构,比较耗资源,适用于多次访问XML): 2.SAX(基于事件,消耗资源小,适用于数量较大的XML): 3.JDOM(比DOM更快,JDOM仅使用具体 ...

随机推荐

  1. Configure the Windows Firewall to Allow SQL Server Access

    参考微软链接: https://msdn.microsoft.com/zh-tw/library/cc646023.aspx

  2. Local Database Sample Model

    [Table] public class AddTableNameHere : INotifyPropertyChanged, INotifyPropertyChanging { // // TODO ...

  3. Coding the Matrix &lpar;0&rpar;:映射、复数和域

    1. 非常好的 Python 教程 <深入 Python 3.0> 以及 IBM 开发社区的博客探索 Python. 2. 子集: s 是 S 的子集 >>>S = {2 ...

  4. Windows Server

    1. Windows Server 在试用license过期后会出现2小时一次的关机.如果暂时无法注册或者激活,下面的方法可以试试 taskkill /f /im wlms.exe ping -n 1 ...

  5. Yii 2&period;0&colon; yii2-highcharts-widget创建饼状图

    安装 The preferred way to install this extension is through composer. 项目根目录下执行: php composer.phar requ ...

  6. linux打印彩色字

    echo显示带颜色,需要使用参数-e格式如下:echo -e "\033[字背景颜色;文字颜色m字符串\033[0m"例如: echo -e "\033[41;37m T ...

  7. java jdbc操作数据库通用代码

    1.准备工作 1> 新建一个配置文件,名为jdbc.properties将其放入src中 2>在项目中导入jdbc驱动,注意连接不同的数据库,所用到的驱动是不一样的,这些在网上都能找到 具 ...

  8. 使用Git Bash从Git上下载代码到本地以及上传代码到码云Git

    前提是在码云上已经新建一个空的项目,可参考:https://www.cnblogs.com/babysbreath/p/9170455.html 1.新建一个目录,存放下载下来的项目,我在D盘新建了一 ...

  9. linux下apt安装mysql导致mysql&period;user table is damaged

    笔者在ubuntu下用 apt install mysql-server类似的命令安装mysql, 安装了最新版的mysql5.7,覆盖了操作系统内置的数据库mysql系统库. 最初启动mysql出错 ...

  10. box-sizing布局

    box-sizing 语法:box-sizing: content-box | border-box | inherit; 参考: https://www.jianshu.com/p/e2eb0d8c ...