搜尋
首頁資料庫mysql教程重新配置或卸载 11gR2 Grid Infrastructure

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.   
  14.       Options:  
  15.        -verbose    Run this script in verbose mode  
  16.        -upgrade    Oracle HA is being upgraded from previous version  
  17.        -patch      Oracle HA is being upgraded to a patch version  
  18.        -hahome     Complete path of Oracle Clusterware home  
  19.        -paramfile  Complete path of file specifying HA parameter values  
  20.        -lastnode   Force the node this is executing on to be considered the  
  21.                    last node of the install and perform actions associated  
  22.                    with configurig the last node  
  23.        -downgrade  Downgrade the clusterware  
  24.        -version    For use with downgrade; special handling is required if  
  25.                    downgrading to 9i. This is the old crs version in the format  
  26.                    A.B.C.D.E (e.g 11.1.0.6.0).  
  27.        -deconfig   Remove Oracle Clusterware to allow it to be uninstalled or reinstalled.  
  28.        -force      Force the executon of steps in delete that cannot be verified   
  29.                    to be safe  
  30.        -unlock     Unlock CRS home   
  31.        -crshome    Complete path of crs home. Use with unlock option.  
  32.        -oldcrshome For use with downgrade. Complete path of the old crs home.  
  33.   
  34.       If neither -upgrade nor -patch is supplied, a new install is performed  
  35.   
  36.       To see the full manpage for this program, execute:  
  37.         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.   
  3. a、使用root用户登录,并执行下面的命令(所有节点,但最后一个节点除外)  
  4.   # perl $GRID_HOME/crs/install/rootcrs.pl -verbose -deconfig -force  
  5.     
  6. b、同样使用root用户在最后一个节点执行下面的命令。该命令将清空ocr 配置和voting disk    
  7.   # perl $GRID_HOME/crs/install/rootcrs.pl -verbose -deconfig -force -lastnode  
  8.   
  9. c、如果使用了ASM磁盘,继续下面的操作以使得ASM重新作为候选磁盘(清空所有的ASM磁盘组)  
  10.   # dd if=/dev/zero of=/dev/sdb1 bs=1024 count=100  
  11.   # /etc/init.d/oracleasm deletedisk DATA /dev/sdb1  
  12.   # /etc/init.d/oracleasm createdisk DATA /dev/sdb1  
  13.   
  14. #Author : Robinson  
  15. #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.   
  22. ############ ORACLE DEINSTALL & DECONFIG TOOL START ############  
  23.   
  24. ######################## CHECK OPERATION START ########################  
  25. Install check configuration START  
  26.   
  27. Checking for existence of the Oracle home location /u01/app/11.2.0/grid  
  28. Oracle Home type selected for de-install is: CRS  
  29. Oracle Base selected for de-install is: /u01/app/grid  
  30. Checking for existence of central inventory location /u01/app/oraInventory  
  31. Checking for existence of the Oracle Grid Infrastructure home /u01/app/11.2.0/grid  
  32. The following nodes are part of this cluster: linux1,linux2  
  33.   
  34. Install check configuration END  
  35.   
  36. Traces log file: /tmp/deinstall2013-07-16_05-54-03-PM/logs//crsdc.log  
  37.   
  38. Network Configuration check config START  
  39.   
  40. Network de-configuration trace file location: /tmp/deinstall2013-07-16_05-54-03-PM/logs/netdc_check207506844451155733.log  
  41.   
  42. Network Configuration check config END  
  43.   
  44. Asm Check Configuration START  
  45.   
  46. ASM de-configuration trace file location: /tmp/deinstall2013-07-16_05-54-03-PM/logs/asmcadc_check2698133635629979531.log  
  47.   
  48. ASM configuration was not detected in this Oracle home. Was ASM configured in this Oracle home (y|n) [n]: y  
  49. Automatic Storage Management (ASM) instance is detected in this Oracle home /u01/app/11.2.0/grid.  
  50. ASM Diagnostic Destination : /u01/app/grid  
  51. ASM Diskgroups : +DATA  
  52. Diskgroups will be dropped  
  53. De-configuring ASM will drop all the diskgroups and it's contents at cleanup time. This will affect all of the databases and ACFS   
  54.   that use this ASM instance(s).  
  55.  If you want to retain the existing diskgroups or if any of the information detected is incorrect, you can modify by entering 'y'.   
  56.  Do you  want to modify above information (y|n) [n]:   
  57.   
  58. ######################### CHECK OPERATION END #########################  
  59.   
  60. ####################### CHECK OPERATION SUMMARY #######################  
  61. Oracle Grid Infrastructure Home is: /u01/app/11.2.0/grid  
  62. The cluster node(s) on which the Oracle home exists are: (Please input nodes seperated by ",", eg: node1,node2,...)linux1,linux2  
  63. Oracle Home selected for de-install is: /u01/app/11.2.0/grid  
  64. Inventory Location where the Oracle home registered is: /u01/app/oraInventory  
  65. ASM instance will be de-configured from this Oracle home  
  66. Do you want to continue (y - yes, n - no)? [n]: y  
  67. 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'  
  68. 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'  
  69.   
  70. ######################## CLEAN OPERATION START ########################  
  71. ASM de-configuration trace file location: /tmp/deinstall2013-07-16_05-54-03-PM/logs/asmcadc_clean3319637107726750003.log  
  72. ASM Clean Configuration START  
  73. ASM Clean Configuration END  
  74.   
  75. Network Configuration clean config START  
  76.   
  77. Network de-configuration trace file location: /tmp/deinstall2013-07-16_05-54-03-PM/logs/netdc_clean9055263637610505743.log  
  78.   
  79. De-configuring Naming Methods configuration file on all nodes...  
  80. Naming Methods configuration file de-configured successfully.  
  81.   
  82. De-configuring Local Net Service Names configuration file on all nodes...  
  83. Local Net Service Names configuration file de-configured successfully.  
  84.   
  85. De-configuring Directory Usage configuration file on all nodes...  
  86. Directory Usage configuration file de-configured successfully.  
  87.   
  88. De-configuring backup files on all nodes...  
  89. Backup files de-configured successfully.  
  90.   
  91. The network configuration has been cleaned up successfully.  
  92.   
  93. Network Configuration clean config END  
  94.   
  95. ---------------------------------------->  
  96.   
  97. Run the following command as the root user or the administrator on node "linux2".  
  98.   
  99. /tmp/deinstall2013-07-16_05-54-03-PM/perl/bin/perl -I/tmp/deinstall2013-07-16_05-54-03-PM/perl/lib   
  100. -I/tmp/deinstall2013-07-16_05-54-03-PM/crs/install /tmp/deinstall2013-07-16_05-54-03-PM/crs/install/rootcrs.pl -force    
  101. -delete -paramfile /tmp/deinstall2013-07-16_05-54-03-PM/response/deinstall_Ora11g_gridinfrahome1.rsp  
  102.   
  103. Run the following command as the root user or the administrator on node "linux1".  
  104.   
  105. /tmp/deinstall2013-07-16_05-54-03-PM/perl/bin/perl -I/tmp/deinstall2013-07-16_05-54-03-PM/perl/lib  
  106. -I/tmp/deinstall2013-07-16_05-54-03-PM/crs/install /tmp/deinstall2013-07-16_05-54-03-PM/crs/install/rootcrs.pl -force   
  107. -delete -paramfile /tmp/deinstall2013-07-16_05-54-03-PM/response/deinstall_Ora11g_gridinfrahome1.rsp -lastnode  
  108.   
  109. Press Enter after you finish running the above commands  
  110.   
  111.   
  112. Oracle Universal Installer clean START  
  113.   
  114. Detach Oracle home '/u01/app/11.2.0/grid' from the central inventory on the local node : Done  
  115.   
  116. Delete directory '/u01/app/11.2.0/grid' on the local node : Done  
  117.   
  118. Delete directory '/u01/app/oraInventory' on the local node : Done  
  119.   
  120. Delete directory '/u01/app/grid' on the local node : Done  
  121.   
  122. Detach Oracle home '/u01/app/11.2.0/grid' from the central inventory on the remote nodes 'linux2' : Done  
  123.   
  124. Delete directory '/u01/app/11.2.0/grid' on the remote nodes 'linux2' : Done  
  125.   
  126. Delete directory '/u01/app/oraInventory' on the remote nodes 'linux2' : Done  
  127.   
  128. Delete directory '/u01/app/grid' on the remote nodes 'linux2' : Done  
  129.   
  130. Oracle Universal Installer cleanup was successful.  
  131.   
  132. Oracle Universal Installer clean END  
  133.   
  134.   
  135. Oracle install clean START  
  136.   
  137. Clean install operation removing temporary directory '/tmp/install' on node 'linux1'  
  138. Clean install operation removing temporary directory '/tmp/install' on node 'linux2'  
  139.   
  140. Oracle install clean END  
  141.   
  142. ######################### CLEAN OPERATION END #########################  
  143.   
  144. ####################### CLEAN OPERATION SUMMARY #######################  
  145. ASM instance was de-configured successfully from the Oracle home  
  146. Oracle Clusterware is stopped and successfully de-configured on node "linux2"  
  147. Oracle Clusterware is stopped and successfully de-configured on node "linux1"  
  148. Oracle Clusterware is stopped and de-configured successfully.  
  149. Successfully detached Oracle home '/u01/app/11.2.0/grid' from the central inventory on the local node.  
  150. Successfully deleted directory '/u01/app/11.2.0/grid' on the local node.  
  151. Successfully deleted directory '/u01/app/oraInventory' on the local node.  
  152. Successfully deleted directory '/u01/app/grid' on the local node.  
  153. Successfully detached Oracle home '/u01/app/11.2.0/grid' from the central inventory on the remote nodes 'linux2'.  
  154. Successfully deleted directory '/u01/app/11.2.0/grid' on the remote nodes 'linux2'.  
  155. Successfully deleted directory '/u01/app/oraInventory' on the remote nodes 'linux2'.  
  156. Successfully deleted directory '/u01/app/grid' on the remote nodes 'linux2'.  
  157. Oracle Universal Installer cleanup was successful.  
  158.   
  159. Run 'rm -rf /etc/oraInst.loc' as root on node(s) 'linux1,linux2' at the end of the session.  
  160.   
  161. Oracle install successfully cleaned up the temporary directories.  
  162. #######################################################################  
  163.   
  164. ############# ORACLE DEINSTALL & DECONFIG TOOL END #############  

 

  重新配置或卸载 11gR2 Grid Infrastructure

更多参考

有关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体系结构) 


 

陳述
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
您什麼時候應該使用複合索引與多個單列索引?您什麼時候應該使用複合索引與多個單列索引?Apr 11, 2025 am 12:06 AM

在數據庫優化中,應根據查詢需求選擇索引策略:1.當查詢涉及多個列且條件順序固定時,使用複合索引;2.當查詢涉及多個列但條件順序不固定時,使用多個單列索引。複合索引適用於優化多列查詢,單列索引則適合單列查詢。

如何識別和優化MySQL中的慢速查詢? (慢查詢日誌,performance_schema)如何識別和優化MySQL中的慢速查詢? (慢查詢日誌,performance_schema)Apr 10, 2025 am 09:36 AM

要優化MySQL慢查詢,需使用slowquerylog和performance_schema:1.啟用slowquerylog並設置閾值,記錄慢查詢;2.利用performance_schema分析查詢執行細節,找出性能瓶頸並優化。

MySQL和SQL:開發人員的基本技能MySQL和SQL:開發人員的基本技能Apr 10, 2025 am 09:30 AM

MySQL和SQL是開發者必備技能。 1.MySQL是開源的關係型數據庫管理系統,SQL是用於管理和操作數據庫的標準語言。 2.MySQL通過高效的數據存儲和檢索功能支持多種存儲引擎,SQL通過簡單語句完成複雜數據操作。 3.使用示例包括基本查詢和高級查詢,如按條件過濾和排序。 4.常見錯誤包括語法錯誤和性能問題,可通過檢查SQL語句和使用EXPLAIN命令優化。 5.性能優化技巧包括使用索引、避免全表掃描、優化JOIN操作和提升代碼可讀性。

描述MySQL異步主奴隸複製過程。描述MySQL異步主奴隸複製過程。Apr 10, 2025 am 09:30 AM

MySQL異步主從復制通過binlog實現數據同步,提升讀性能和高可用性。 1)主服務器記錄變更到binlog;2)從服務器通過I/O線程讀取binlog;3)從服務器的SQL線程應用binlog同步數據。

mysql:簡單的概念,用於輕鬆學習mysql:簡單的概念,用於輕鬆學習Apr 10, 2025 am 09:29 AM

MySQL是一個開源的關係型數據庫管理系統。 1)創建數據庫和表:使用CREATEDATABASE和CREATETABLE命令。 2)基本操作:INSERT、UPDATE、DELETE和SELECT。 3)高級操作:JOIN、子查詢和事務處理。 4)調試技巧:檢查語法、數據類型和權限。 5)優化建議:使用索引、避免SELECT*和使用事務。

MySQL:數據庫的用戶友好介紹MySQL:數據庫的用戶友好介紹Apr 10, 2025 am 09:27 AM

MySQL的安裝和基本操作包括:1.下載並安裝MySQL,設置根用戶密碼;2.使用SQL命令創建數據庫和表,如CREATEDATABASE和CREATETABLE;3.執行CRUD操作,使用INSERT,SELECT,UPDATE,DELETE命令;4.創建索引和存儲過程以優化性能和實現複雜邏輯。通過這些步驟,你可以從零開始構建和管理MySQL數據庫。

InnoDB緩衝池如何工作,為什麼對性能至關重要?InnoDB緩衝池如何工作,為什麼對性能至關重要?Apr 09, 2025 am 12:12 AM

InnoDBBufferPool通過將數據和索引頁加載到內存中來提升MySQL數據庫的性能。 1)數據頁加載到BufferPool中,減少磁盤I/O。 2)臟頁被標記並定期刷新到磁盤。 3)LRU算法管理數據頁淘汰。 4)預讀機制提前加載可能需要的數據頁。

MySQL:初學者的數據管理易用性MySQL:初學者的數據管理易用性Apr 09, 2025 am 12:07 AM

MySQL適合初學者使用,因為它安裝簡單、功能強大且易於管理數據。 1.安裝和配置簡單,適用於多種操作系統。 2.支持基本操作如創建數據庫和表、插入、查詢、更新和刪除數據。 3.提供高級功能如JOIN操作和子查詢。 4.可以通過索引、查詢優化和分錶分區來提升性能。 5.支持備份、恢復和安全措施,確保數據的安全和一致性。

See all articles

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

AI Hentai Generator

AI Hentai Generator

免費產生 AI 無盡。

熱門文章

R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
3 週前By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.最佳圖形設置
3 週前By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.如果您聽不到任何人,如何修復音頻
3 週前By尊渡假赌尊渡假赌尊渡假赌
WWE 2K25:如何解鎖Myrise中的所有內容
3 週前By尊渡假赌尊渡假赌尊渡假赌

熱工具

WebStorm Mac版

WebStorm Mac版

好用的JavaScript開發工具

DVWA

DVWA

Damn Vulnerable Web App (DVWA) 是一個PHP/MySQL的Web應用程序,非常容易受到攻擊。它的主要目標是成為安全專業人員在合法環境中測試自己的技能和工具的輔助工具,幫助Web開發人員更好地理解保護網路應用程式的過程,並幫助教師/學生在課堂環境中教授/學習Web應用程式安全性。 DVWA的目標是透過簡單直接的介面練習一些最常見的Web漏洞,難度各不相同。請注意,該軟體中

SublimeText3 Linux新版

SublimeText3 Linux新版

SublimeText3 Linux最新版

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser是一個安全的瀏覽器環境,安全地進行線上考試。該軟體將任何電腦變成一個安全的工作站。它控制對任何實用工具的訪問,並防止學生使用未經授權的資源。

MantisBT

MantisBT

Mantis是一個易於部署的基於Web的缺陷追蹤工具,用於幫助產品缺陷追蹤。它需要PHP、MySQL和一個Web伺服器。請查看我們的演示和託管服務。