- 浏览: 1022877 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (529)
- 服务器 (8)
- jsp (1)
- java (6)
- AIX (1)
- solaris (3)
- linux学习 (53)
- javaScript (2)
- hibernate (1)
- 数据库 (74)
- sql语句 (8)
- oracle 学习 (75)
- oracle 案例 (42)
- oracle 管理 (42)
- Oracle RAC (27)
- oracle data guard (12)
- oracle 参数讲解 (14)
- Oracle 字符集 (8)
- oracle性能调优 (24)
- oracle备份与恢复 (12)
- oracle Tablespace (9)
- oracle性能诊断艺术 (1)
- oracle 11g学习 (5)
- oracle streams (1)
- oracle upgrade and downgrade (4)
- db2学习 (13)
- db2命令学习 (2)
- mysql (28)
- sql server (30)
- sql server 2008 (0)
- 工具 (10)
- 操作系统 (3)
- c++ (1)
- stock (1)
- 生活 (5)
- HADOOP (2)
最新评论
-
massjcy:
...
如何将ubuntu文件夹中文名改为英文 -
skypiea:
谢谢。。。
终于解决了。。。
Oracle 10.2.0.4(5)EM不能启动的解决方案(Patch 8350262) -
qwe_rt:
引用vi /etc/sysconfig/network 请问 ...
Linux操作系统下配置静态IP上网 -
liuqiang:
sudo killall -9 apache2
ps 和 kill 命令详解 -
dazuiba:
引用*绝杀 kill -9 PID 当使用此命令时,一定要通过 ...
ps 和 kill 命令详解
Modifying the VIP or VIP Hostname of a 10g or 11g Oracle Clusterware Node [ID 27
- 博客分类:
- Oracle RAC
Applies to:
Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 11.1.0.8
Information in this document applies to any platform.
The purpose of this note is to illustrate the changing of a Virtual IP Address (VIP) or VIP hostname or other VIP parameters in an Oracle10g RAC/Oracle Clusterware environment. Caution: This note can only be used to change the VIP IP address or Hostname or other parameters associated with the VIP. It is not meant to cover changing the public hostname or the public host IP address.
Oracle 10g use a VIP (Virtual IP) for clients to connect to the database. This VIP is a static IP with a hostname defined and resolved thru DNS. During the installation of Oracle Clusterware users are prompted to enter a Virtual IP and Virtual hostname for each of the node in the cluster. These are stored within the OCR (Oracle Cluster Registry) and different components within 10g HA framework depend on these VIPs. If for some reason the need arises to change either the VIP or the VIP/hostname - perhpas due to a data center move, or changing IP subnets in a Data Center, this procedure should be followed.
Changing the VIP involves modification of the nodeapps, which includes the Virtual IP address, the GSD, the Listener, and Oracle Notification Services (ONS). The VIP can be modified while the nodeapps are running, however changes will not take effect until the VIP, and hence the nodeapps, are restarted.
Depending on the version of Oracle Clusterware that you are running, other resources on a node, such as database instances and ASM instances, are dependent on the VIP, so stopping the nodeapps may cause other resources to be stopped - therefore, this change should be made during a scheduled outage.
In most cases, changing Data Centers or IP addresses within a Data Center will already incur an outage for other reasons, because changes need to be made at the operating system level, and servers may even need to be moved - so there is most likely a scheduled outage for this type of maintenence already.
However, in some cases - for example, if a VIP IP address was perhaps mistyped in DNS and needs to be corrected, you may be able to minimize the downtime by only modifying a single node. Also, as of 10.2.0.3 and higher versions, the ASM instance and DB instances no longer depend on the VIP, so it is possible to stop the nodeapps without bringing down the ASM instance or DB instance - but client connectivity is limited while the VIP is offline.
Verifying Current VIP configuration
Below, we will provide examples on how to modify the nodeapps to change the VIP or VIP hostname.
1. The first step that should be done is to confirm the current configuration of the VIP. This is most easily accomplished by running the command:
srvctl config nodeapps -n <nodename> -a
Using the '-a' switch will give you the current VIP Hostname, VIP IP address and interface. The following example is from a Windows System. Note that the nodename is 'node1' as passed via the '-n' argument.
C:\>srvctl config nodeapps -n node1 -a
VIP exists.: /node1-v/10.148.44.94/255.255.255.0/Public
These outputs show that:
The VIP Hostname is 'node1-v'
The VIP IP address is '10.148.44.94'
The VIP subnet mask is '255.255.255.0'
The Interface Name used by the VIP is called 'Public'
Any of the above configuration parameters associated with the VIP can be changed if they were 4input incorrectly, or perhaps they need to be changed due to external reasons (such as a data center move, or IP change as mentioned above).
Note:
In addition, you can also verify the IP address and interface of the VIP by running the 'ifconfig' command or 'ifconfig -a', and looking for the IP address associated with an interface ending in ':1'. The example below, on Linux, shows the interface as 'eth0:1'
=============================
eth0:1 Link encap:Ethernet HWaddr 00:01:03:2C:69:BB
inet addr:192.168.1.125 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
...
...
=============================
On the Windows platform, run the command 'ipconfig /all'. This will list all IP addresses bound to a given adapter, including the VIP, but it will not be obvious just from this output which one is the VIP address and which is the actual host IP address. Therefore, using 'srvctl config nodeapps -n <nodename> -a' is the surest bet.
2. Once you have determined what the current configuration of the nodeapps is, be sure to make note of what values will remain unchanged, and what the correct/new values that you need will be. For example, if you are just changing the "Interface Name" you will need to know what the correct interface name is, but you also need to note the VIP hostname, IP address and subnet mask to ensure that this information is re-entered correctly.
3. Once you are ready to make the change, stop all resources that are dependent on the VIP on a given node. This includes all RAC database instances on that node, as well as the ASM instance on that node, if it exists and is being used (Note that starting with 10.2.0.3, the dependency between the VIP and the database and ASM instances has been removed):
3a). Stop database instances:
$ srvctl stop instance -d grid -i grid1
Where the database name is specified via the '-d' option, and the instance on the appropriate node is specified with the '-i' option.
Alternatively, to stop the entire database, on all nodes, you can issue the stop database command:
$ srvctl stop database -d grid
3b). To stop the ASM instance on the node, issue the following command:
$ srvctl stop asm -n node1
This command should be issued for each ASM instance using the appropriate node name. Alternatively, it is also possible to stop these resources via SQL*Plus and/or, on the Windows platform by stopping the associated services.
4. Next, stop the nodeapps using srvctl - i.e:
$ srvctl stop nodeapps -n node1
This will stop the VIP, GSD, Listener, and ONS daemon currently running on the nodes specified
If this is being done as part of a data center move, then you will most likely be stopping these resources prior to moving the equipment. In that case, you may want to disable the resources after stopping them, to prevent them from re-starting once the machines are brought back up and the Oracle Clusterware stack is started. You can do this via commands such as:
$ srvctl -h | grep disable
Usage: srvctl disable database -d <name>
Usage: srvctl disable instance -d <name> -i "<inst_name_list>"
Usage: srvctl disable service -d <name> -s "<service_name_list>" [-i <inst_name>]
Usage: srvctl disable asm -n <node_name> [-i <inst_name>]
On 11gR1 and earlier, it is not possible to disable the nodeapps.
5. Verify that the VIP is no longer running by executing the 'ifconfig -a' or 'ipconfig /all' command again, and confirm that the IP address is no longer listed as running in the output.
If the interface still shows as online, this may be an indication that a resource which is dependent on the VIP is still running. The crs_stat command can help to show resources that are still online.
6. If the VIP IP Address or VIP Hostname are being changed, update the HOSTS file entries to reflect the updated information on all nodes - i.e.
/etc/hosts files (on Unix/Linux)
or the
\WINDOWS\System32\drivers\etc\hosts file (on Windows)
and/or make the necessary DNS additions, to associate the new IP address with the old VIP hostname.
Note: If changing one node at a time, be sure to only update the hosts/DNS entries for the VIP that is actually being changed.
7. To make the actual modification to the nodeapps, the Oracle Clusterware stack must be up on the node where you are running srvctl from. To modify the nodeapps use the 'srvctl modify nodeapps' command with the following syntax:
srvctl modify nodeapps -n <node_name> [-o <oracle_home>] [-A <new_vip_address>]
Options Description:
-n <node_name> Node name.
-o <oracle_home> Oracle home for the cluster software (CRS-Home).
-A <new_vip_address> The node level VIP address (<name|ip>/netmask[/if1[|if2|...]]).
As noted previously, any of the above parameters can be changed from their original values (though it is unlikely that the ORACLE_HOME would change), provided that the match the expected characteristics.
So - for example, be sure that the interface name specified is the correct name as seen from the OS (refer to Note:283684.1 ), be sure that the subnet mask used for the VIP matches the subnet mask used for the actual public IP addresses, and that the VIP hostname is correctly registered in DNS and/or the hosts file. An example of the 'modify nodeapps' command is as follows:
$ srvctl modify nodeapps -n node1 -A 192.168.2.125/255.255.255.0/eth0
It should be noted that for the first parameter, you can specify either the hostname associated with the VIP, or the IP address associated with the VIP. Either way, the srvctl command will actually attempt to resolve the IP to a hostname, or the hostname to an IP, and it will store both entries in the OCR. So, assuming that the virtual hostname of 'node1-v' resolves to an IP address 192.168.2.125, the below command would have the same effect as the command using the IP address:
$ srvctl modify nodeapps -n node1 -A node1-v/255.255.255.0/eth0
Note that the interface names are case sensitive on all platforms. On some platforms, such as Windows, the Interface Name may have spaces in it - i.e. "Local Area Connection 1". If that is the case, you must enclose the interface name in double quotes - i.e.
srvctl modify nodeapps -n node1 -A 192.168.2.125/255.255.255.0/"Local Area Connection 1"
On Unix and Linux systems, this command should be run as root. Attempting to run this command
as the 'oracle' user or software owner will result in the following error:
PRKO-2117 : This command should be executed as the system privilege user.
On Windows systems, this command should be run as the user who did the original installation. This account should be an account with Local Administrator privileges on each node.
8. After making the change, you should verify that it is correct by re-running
'srvctl config nodeapps -n <nodename> -a'
Double-check the output to confirm that all parameters are correct.
9. Once the modify nodeapps has been executed, you can re-start node-level applications via srvctl with the following syntax:
srvctl start nodeapps -n <node_name>
i.e.:
$ srvctl start nodeapps -n rnode1
If any resources (such as database or ASM) were previously disabled, then they should now be re-enabled and re-started as well.
Repeat the same steps for all the nodes in the cluster. Since SRVCTL is a cluster wide management tool, you can accomplish these tasks for any specific nodes from one node, without the need to login individually to each of the cluster nodes.
Note: If only the IP address is changed, it should not be necessary to make changes to the LISTENER.ORA and TNSNAMES.ORA, provided they are using the vip hostnames for
the 'HOST=' entries.
If changing both the hostname and the VIP for a node, it will be necessary to modify the LISTENER.ORA and change the 'HOST=' entries to the new VIP hostname. This can be done manually, or by using the NETCA to reconfigure the listener. In addition, changes may need to be made to the TNSNAMES.ORA of any clients connecting to the old HOSTNAME.
In addition to modifying the nodeapps after an IP address or network change of some type, it may also be necessary to modify the networks that are stored in the OCR. If that is the case, please refer to the following note:
发表评论
-
11gR2 RAC dbca无法发现ASM磁盘组
2012-07-30 11:28 1455安装好Grid Infrastructure和Database ... -
RAC dbca无法发现ASM磁盘组
2012-07-30 11:20 0查看( 1501 ) / 评论( 10 ) / 评分( 0 / ... -
RAC优化要点
2011-01-19 23:03 1965RAC环境下,DB CACHE的命中率对系统的性能影响 ... -
11gR2 cluvfy tools usage
2011-01-05 03:01 1290Note that the following only s ... -
配置11gR2 RAC SCAN
2011-01-02 21:11 348411G RAC scan即用DNA解析的I ... -
CRS-0215: Could not start resource 'ora..vip' [ID 356535.1]
2010-12-17 17:34 3382Oracle Server - Enterprise Edit ... -
Oracle RAC选件技术的价值何在?
2010-07-14 11:38 1675随着IT技术的发展,网格计算目前已经成为一个热点,它所带来的低 ... -
怎样修改 SCAN信息(来自于metalink)
2010-06-06 00:34 1572Applies to: Oracle Server ... -
RAC或OPS环境下重新创建控制文件 引自Metalink
2010-05-13 13:33 1673PURPOSE-------This article desc ... -
How to Change Interconnect/Public Interface IP or Subnet in Oracle Clusterware [
2010-04-30 12:06 2460Applies to: Oracle Server ... -
10gR2 RAC Install issues on Oracle EL5 or RHEL5 or SLES10 (VIPCA / SRVCTL / OUI
2010-04-30 12:04 1585Applies to: Oracle Server ... -
RAC环境下listener无法启动案例分析
2010-04-26 21:24 2483RAC系统重新配置listener后无法启动: [root@ ... -
CRS-1019: Resource ora.rac02.ons (application) cannot run on rac01 问题解决
2010-04-25 16:15 2700[root@rac01 bin]# ./crs_stat -t ... -
AIX集群修改IP步骤
2010-04-25 01:50 4404集群修改IP步骤 环境: AIX 5L HACMP ... -
关于虚拟 IP
2010-04-23 11:14 1840关于虚拟 IP10g 中为什么使用虚拟 IP (VIP)?为什 ... -
RAC Ocfs2文件系统常见问题解决方法
2010-01-11 14:28 1617现象一:mount -t ocfs2 -o datavolum ... -
启动OCFS2时出错:o2cb_ctl Unable load configuration file
2010-01-11 14:22 2205操作系统版本:RedHat-AS5 ... -
RAC User Equivalence Check Failed
2010-01-11 14:17 1662在使用SSH方式配置RAC时,可能会在检查用户等价时失败。 ... -
ORACLE RAC:监听原理 简介
2010-01-11 14:15 3670RAC1 RAC2 都需需要配置监听,各自监听自己的 实例 ... -
Oracle集群文件系统(OCFS2)用户指南
2010-01-11 14:02 2819http://oss.oracle.com/projects/ ...
相关推荐
By covering these topics, "Oracle Database 10g PL/SQL Programming" provides a comprehensive guide for developers looking to leverage the power of PL/SQL within the Oracle database environment....
The goal of this book is to share the art of hacking with everyone. Understanding hacking techniques is often difficult, since it requires both breadth and depth of knowledge. Many hacking texts seem ...
- Bug # 4918539: ORA-ORA-06502 or ORA-01460 may occurs if a procedure is executed through the Run PL/SQL dialog box and a string with multibyte characters is assigned to one of the parameters. ...
with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute ...
5.2.3 for any allegations or findings of infringement of copyright or other proprietary rights as a result of your use of the Software. 6. Copyright Infringement 6.1 Vagaa respects copyright and ...
on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may ...
on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may ...
根据提供的文档信息,“RACGuides_Rac10gR2OnLinux.pdf”这份文档主要介绍了如何在Linux环境下安装和配置Oracle Real Application Clusters (RAC) 10g Release 2。下面是针对该文档标题、描述以及部分章节内容所涉及...
A number of features make The Language of SQL unique among introductory SQL books. First, you will not be required to download software or sit with a computer as you read the text. The intent of this...
This Cortex-A Series Programmer’s Guide is protected by copyright and the practice or implementation of the information herein may be protected by one or more patents or pending applications. No part...
Take note of the username, password, database name and hostname as you create the database. You will enter these items in the install script. 4. RUN THE INSTALL SCRIPT To run the install script ...
and that legislation avoids or prohibits provisions in an agreement excluding or modifying application of or exercise of liability under such condition or warranty, the condition or warranty will be ...
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the ...
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the ...
Some Final Comments on the MOV Instructions <br>4.9 Laboratory ...A Quick Look at CodeView 4.9.5.2 The Source Window 4.9.5.3 The Memory Window 4.9.5.4 The Register Window 4.9.5.5 The ...
The main objective of NAMESEA is to significantly reduce the system overhead associated with predicting node labels while maintaining a certain level of prediction accuracy. NSGA2, or Non-dominated ...
* The name and exact version of your operating system (e.g. NT4 SP5). * The exact version of the Internet Explorer installed on your system. If you can provide me with a minimal application which ...
(c) modifying the Software, (d) attempting to reverse engineer, decompile or disassemble any portion of the Software, or (e) exporting the Software or any underlying technology in contravention of ...
An intent lock indicates that SQL Server wants to acquire a shared (S) lock or exclusive (X) lock on some of the resources lower down in the hierarchy. For example, a shared intent lock placed at the ...