当前位置:Gxlcms > mysql > 重新配置或卸载11gR2GridInfrastructure

重新配置或卸载11gR2GridInfrastructure

时间:2021-07-01 10:21:17 帮助过:46人阅读

Oracle 11g R2 Grid Infrastructure 的安装与配置较之前的版本提供了更多的灵活性。在Grid Infrastructure安装完毕前执行root.sh经常容易出现错误,并且需要修复该错误才能得以继续。在这个版本中我们可以直接通过执行脚本rootcrs.pl来重新配置Grid Infrastr

Oracle 11g R2 Grid Infrastructure 的安装与配置较之前的版本提供了更多的灵活性。在Grid Infrastructure安装完毕前执行root.sh经常容易出现错误,并且需要修复该错误才能得以继续。在这个版本中我们可以直接通过执行脚本rootcrs.pl来重新配置Grid Infrastructure而无需先卸载Grid Infrastructure,然后修复故障后进行再次安装。下面描述了rootcrs.pl的用法以及使用deinstall彻底卸载Grid Infrastructure。

1、rootcrs.pl命令介绍

[python] view plaincopyprint?

  1. #命令位置:$GRID_HOME/crs/install
  2. #命令说明:
  3. # 该命令主要是用于对crs进行维护与管理,包括patch,upgrade,downgrade,deconfig等等
  4. # perldoc rootcrs.pl执行这个命令获得完整的介绍
  5. [root@linux1 install]# ./rootcrs.pl -h
  6. Unknown option: h
  7. Usage:
  8. rootcrs.pl [-verbose] [-upgrade | -patch] [-hahome ]
  9. [-paramfile ]
  10. [-deconfig | -downgrade] [-force] [-lastnode]
  11. [-downgrade] [-oldcrshome ] [-version ]
  12. [-unlock [-crshome ]]
  13. Options:
  14. -verbose Run this script in verbose mode
  15. -upgrade Oracle HA is being upgraded from previous version
  16. -patch Oracle HA is being upgraded to a patch version
  17. -hahome Complete path of Oracle Clusterware home
  18. -paramfile Complete path of file specifying HA parameter values
  19. -lastnode Force the node this is executing on to be considered the
  20. last node of the install and perform actions associated
  21. with configurig the last node
  22. -downgrade Downgrade the clusterware
  23. -version For use with downgrade; special handling is required if
  24. downgrading to 9i. This is the old crs version in the format
  25. A.B.C.D.E (e.g 11.1.0.6.0).
  26. -deconfig Remove Oracle Clusterware to allow it to be uninstalled or reinstalled.
  27. -force Force the executon of steps in delete that cannot be verified
  28. to be safe
  29. -unlock Unlock CRS home
  30. -crshome Complete path of crs home. Use with unlock option.
  31. -oldcrshome For use with downgrade. Complete path of the old crs home.
  32. If neither -upgrade nor -patch is supplied, a new install is performed
  33. To see the full manpage for this program, execute:
  34. perldoc rootcrs.pl

#对于执行root.sh失败时,我们可以通过该命令以-deconfig 参数来清除crs的配置信息,然后根据log修复故障或使用patch之后再重新执行root.sh
#对于该命令的patch,upgrade,downgrade用法再此不作详细介绍

2、重新配置Grid Infrastructure及ASM

[python] view plaincopyprint?

  1. #重新配置Grid Infrastructure并不会移除已经复制的二进制文件,仅仅是回复到配置crs之前的状态,下面是其步骤
  2. a、使用root用户登录,并执行下面的命令(所有节点,但最后一个节点除外)
  3. # perl $GRID_HOME/crs/install/rootcrs.pl -verbose -deconfig -force
  4. b、同样使用root用户在最后一个节点执行下面的命令。该命令将清空ocr 配置和voting disk
  5. # perl $GRID_HOME/crs/install/rootcrs.pl -verbose -deconfig -force -lastnode
  6. c、如果使用了ASM磁盘,继续下面的操作以使得ASM重新作为候选磁盘(清空所有的ASM磁盘组)
  7. # dd if=/dev/zero of=/dev/sdb1 bs=1024 count=100
  8. # /etc/init.d/oracleasm deletedisk DATA /dev/sdb1
  9. # /etc/init.d/oracleasm createdisk DATA /dev/sdb1
  10. #Author : Robinson
  11. #Blog : http://blog.csdn.net/robinson_0612

3、彻底删除Grid Infrastructure

[python] view plaincopyprint?

  1. #11g R2 Grid Infrastructure也提供了彻底卸载的功能,deinstall该命令取代了使用OUI方式来清除clusterware以及ASM,回复到安装grid之前的环境。
  2. #该命令将停止集群,移除二进制文件及其相关的所有配置信息。
  3. #命令位置:$GRID_HOME/deinstall
  4. #下面是该命令操作的具体事例,操作期间,需要提供一些交互信息,以及在新的session以root身份清除一些/tmp下的文件
  5. [root@linux1 bin]# ./crsctl check crs
  6. CRS-4638: Oracle High Availability Services is online
  7. CRS-4537: Cluster Ready Services is online
  8. CRS-4529: Cluster Synchronization Services is online
  9. CRS-4533: Event Manager is online
  10. [root@linux1 bin]# cd ../deinstall/
  11. [root@linux1 deinstall]# pwd
  12. /u01/app/11.2.0/grid/deinstall
  13. [root@linux1 deinstall]# ./deinstall
  14. You must not be logged in as root to run ./deinstall.
  15. Log in as Oracle user and rerun ./deinstall.
  16. [root@linux1 deinstall]# su grid
  17. [grid@linux1 deinstall]$ ./deinstall
  18. Checking for required files and bootstrapping ...
  19. Please wait ...
  20. Location of logs /tmp/deinstall2013-07-16_05-54-03-PM/logs/
  21. ############ ORACLE DEINSTALL & DECONFIG TOOL START ############
  22. ######################## CHECK OPERATION START ########################
  23. Install check configuration START
  24. Checking for existence of the Oracle home location /u01/app/11.2.0/grid
  25. Oracle Home type selected for de-install is: CRS
  26. Oracle Base selected for de-install is: /u01/app/grid
  27. Checking for existence of central inventory location /u01/app/oraInventory
  28. Checking for existence of the Oracle Grid Infrastructure home /u01/app/11.2.0/grid
  29. The following nodes are part of this cluster: linux1,linux2
  30. Install check configuration END
  31. Traces log file: /tmp/deinstall2013-07-16_05-54-03-PM/logs//crsdc.log
  32. Network Configuration check config START
  33. Network de-configuration trace file location: /tmp/deinstall2013-07-16_05-54-03-PM/logs/netdc_check207506844451155733.log
  34. Network Configuration check config END
  35. Asm Check Configuration START
  36. ASM de-configuration trace file location: /tmp/deinstall2013-07-16_05-54-03-PM/logs/asmcadc_check2698133635629979531.log
  37. ASM configuration was not detected in this Oracle home. Was ASM configured in this Oracle home (y|n) [n]: y
  38. Automatic Storage Management (ASM) instance is detected in this Oracle home /u01/app/11.2.0/grid.
  39. ASM Diagnostic Destination : /u01/app/grid
  40. ASM Diskgroups : +DATA
  41. Diskgroups will be dropped
  42. De-configuring ASM will drop all the diskgroups and it's contents at cleanup time. This will affect all of the databases and ACFS
  43. that use this ASM instance(s).
  44. If you want to retain the existing diskgroups or if any of the information detected is incorrect, you can modify by entering 'y'.
  45. Do you want to modify above information (y|n) [n]:
  46. ######################### CHECK OPERATION END #########################
  47. ####################### CHECK OPERATION SUMMARY #######################
  48. Oracle Grid Infrastructure Home is: /u01/app/11.2.0/grid
  49. The cluster node(s) on which the Oracle home exists are: (Please input nodes seperated by ",", eg: node1,node2,...)linux1,linux2
  50. Oracle Home selected for de-install is: /u01/app/11.2.0/grid
  51. Inventory Location where the Oracle home registered is: /u01/app/oraInventory
  52. ASM instance will be de-configured from this Oracle home
  53. Do you want to continue (y - yes, n - no)? [n]: y
  54. A log of this session will be written to: '/tmp/deinstall2013-07-16_05-54-03-PM/logs/deinstall_deconfig2013-07-16_05-54-37-PM.out'
  55. Any error messages from this session will be written to: '/tmp/deinstall2013-07-16_05-54-03-PM/logs/deinstall_deconfig2013-07-16_05-54-37-PM.err'
  56. ######################## CLEAN OPERATION START ########################
  57. ASM de-configuration trace file location: /tmp/deinstall2013-07-16_05-54-03-PM/logs/asmcadc_clean3319637107726750003.log
  58. ASM Clean Configuration START
  59. ASM Clean Configuration END
  60. Network Configuration clean config START
  61. Network de-configuration trace file location: /tmp/deinstall2013-07-16_05-54-03-PM/logs/netdc_clean9055263637610505743.log
  62. De-configuring Naming Methods configuration file on all nodes...
  63. Naming Methods configuration file de-configured successfully.
  64. De-configuring Local Net Service Names configuration file on all nodes...
  65. Local Net Service Names configuration file de-configured successfully.
  66. De-configuring Directory Usage configuration file on all nodes...
  67. Directory Usage configuration file de-configured successfully.
  68. De-configuring backup files on all nodes...
  69. Backup files de-configured successfully.
  70. The network configuration has been cleaned up successfully.
  71. Network Configuration clean config END
  72. ---------------------------------------->
  73. Run the following command as the root user or the administrator on node "linux2".
  74. /tmp/deinstall2013-07-16_05-54-03-PM/perl/bin/perl -I/tmp/deinstall2013-07-16_05-54-03-PM/perl/lib
  75. -I/tmp/deinstall2013-07-16_05-54-03-PM/crs/install /tmp/deinstall2013-07-16_05-54-03-PM/crs/install/rootcrs.pl -force
  76. -delete -paramfile /tmp/deinstall2013-07-16_05-54-03-PM/response/deinstall_Ora11g_gridinfrahome1.rsp
  77. Run the following command as the root user or the administrator on node "linux1".
  78. /tmp/deinstall2013-07-16_05-54-03-PM/perl/bin/perl -I/tmp/deinstall2013-07-16_05-54-03-PM/perl/lib
  79. -I/tmp/deinstall2013-07-16_05-54-03-PM/crs/install /tmp/deinstall2013-07-16_05-54-03-PM/crs/install/rootcrs.pl -force
  80. -delete -paramfile /tmp/deinstall2013-07-16_05-54-03-PM/response/deinstall_Ora11g_gridinfrahome1.rsp -lastnode
  81. Press Enter after you finish running the above commands
  82. <----------------------------------------
  83. Oracle Universal Installer clean START
  84. Detach Oracle home '/u01/app/11.2.0/grid' from the central inventory on the local node : Done
  85. Delete directory '/u01/app/11.2.0/grid' on the local node : Done
  86. Delete directory '/u01/app/oraInventory' on the local node : Done
  87. Delete directory '/u01/app/grid' on the local node : Done
  88. Detach Oracle home '/u01/app/11.2.0/grid' from the central inventory on the remote nodes 'linux2' : Done
  89. Delete directory '/u01/app/11.2.0/grid' on the remote nodes 'linux2' : Done
  90. Delete directory '/u01/app/oraInventory' on the remote nodes 'linux2' : Done
  91. Delete directory '/u01/app/grid' on the remote nodes 'linux2' : Done
  92. Oracle Universal Installer cleanup was successful.
  93. Oracle Universal Installer clean END
  94. Oracle install clean START
  95. Clean install operation removing temporary directory '/tmp/install' on node 'linux1'
  96. Clean install operation removing temporary directory '/tmp/install' on node 'linux2'
  97. Oracle install clean END
  98. ######################### CLEAN OPERATION END #########################
  99. ####################### CLEAN OPERATION SUMMARY #######################
  100. ASM instance was de-configured successfully from the Oracle home
  101. Oracle Clusterware is stopped and successfully de-configured on node "linux2"
  102. Oracle Clusterware is stopped and successfully de-configured on node "linux1"
  103. Oracle Clusterware is stopped and de-configured successfully.
  104. Successfully detached Oracle home '/u01/app/11.2.0/grid' from the central inventory on the local node.
  105. Successfully deleted directory '/u01/app/11.2.0/grid' on the local node.
  106. Successfully deleted directory '/u01/app/oraInventory' on the local node.
  107. Successfully deleted directory '/u01/app/grid' on the local node.
  108. Successfully detached Oracle home '/u01/app/11.2.0/grid' from the central inventory on the remote nodes 'linux2'.
  109. Successfully deleted directory '/u01/app/11.2.0/grid' on the remote nodes 'linux2'.
  110. Successfully deleted directory '/u01/app/oraInventory' on the remote nodes 'linux2'.
  111. Successfully deleted directory '/u01/app/grid' on the remote nodes 'linux2'.
  112. Oracle Universal Installer cleanup was successful.
  113. Run 'rm -rf /etc/oraInst.loc' as root on node(s) 'linux1,linux2' at the end of the session.
  114. Oracle install successfully cleaned up the temporary directories.
  115. #######################################################################
  116. ############# ORACLE DEINSTALL & DECONFIG TOOL END #############

更多参考

有关Oracle RAC请参考
使用crs_setperm修改RAC资源的所有者及权限
使用crs_profile管理RAC资源配置文件
RAC 数据库的启动与关闭
再说 Oracle RAC services
Services in Oracle Database 10g
Migrate datbase from single instance to Oracle RAC
Oracle RAC 连接到指定实例
Oracle RAC 负载均衡测试(结合服务器端与客户端)
Oracle RAC 服务器端连接负载均衡(Load Balance)
Oracle RAC 客户端连接负载均衡(Load Balance)
ORACLE RAC 下非缺省端口监听配置(listener.ora tnsnames.ora)
ORACLE RAC 监听配置 (listener.ora tnsnames.ora)
配置 RAC 负载均衡与故障转移
CRS-1006 , CRS-0215 故障一例
基于Linux (RHEL 5.5) 安装Oracle 10g RAC
使用 runcluvfy 校验Oracle RAC安装环境

有关Oracle 网络配置相关基础以及概念性的问题请参考:
配置非默认端口的动态服务注册
配置sqlnet.ora限制IP访问Oracle
Oracle 监听器日志配置与管理
设置 Oracle 监听器密码(LISTENER)
配置ORACLE 客户端连接到数据库

有关基于用户管理的备份和备份恢复的概念请参考
Oracle 冷备份
Oracle 热备份
Oracle 备份恢复概念
Oracle 实例恢复
Oracle 基于用户管理恢复的处理
SYSTEM 表空间管理及备份恢复
SYSAUX表空间管理及恢复
Oracle 基于备份控制文件的恢复(unsing backup controlfile)

有关RMAN的备份恢复与管理请参考
RMAN 概述及其体系结构
RMAN 配置、监控与管理
RMAN 备份详解
RMAN 还原与恢复
RMAN catalog 的创建和使用
基于catalog 创建RMAN存储脚本
基于catalog 的RMAN 备份与恢复
RMAN 备份路径困惑
使用RMAN实现异机备份恢复(WIN平台)
使用RMAN迁移文件系统数据库到ASM
linux 下RMAN备份shell脚本
使用RMAN迁移数据库到异机

有关ORACLE体系结构请参考
Oracle 表空间与数据文件
Oracle 密码文件
Oracle 参数文件
Oracle 联机重做日志文件(ONLINE LOG FILE)
Oracle 控制文件(CONTROLFILE)
Oracle 归档日志
Oracle 回滚(ROLLBACK)和撤销(UNDO)
Oracle 数据库实例启动关闭过程
Oracle 10g SGA 的自动化管理
Oracle 实例和Oracle数据库(Oracle体系结构)

人气教程排行