当前位置:  数据库>oracle

Oracle RAC无备份情况恢复ocr和olr

    来源: 互联网  发布时间:2017-06-02

    本文导语: 今天是2014-04-01,忙碌了一天终于有时间写点东西了。前段时间写了RAc中ocr存在备份的情况下如何恢复,今天写一下在没有备份情况下如何去重建ocr和olr呢? 最大的悲剧莫过于数据库坏了备份没了。让我想起了前几年流行的一句...

今天是2014-04-01,忙碌了一天终于有时间写点东西了。前段时间写了RAc中ocr存在备份的情况下如何恢复,今天写一下在没有备份情况下如何去重建ocr和olr呢?

最大的悲剧莫过于数据库坏了备份没了。让我想起了前几年流行的一句话:“最大的悲剧是人活着,钱没了”。总之备份重于一切。

情景介绍:

在11G中ocr的asm磁盘组被用户不小心删了且所有备份都误删,olr呢也损坏了。至此悲剧重演。

恢复过程:(其实就是使用root.sh重建ocr的过程,重建之后可能需要重新注册相关资源如listener or database 实例等!)

1、清空所有节点cluster配置信息:(11G中存在rootcrs.sh脚本,该脚本默认存在于$GRID_HOME/crs/install)。

注,该脚本需要在root下执行,否则会有错误提示

[grid@rac-one install]$ ./rootcrs.pl
You must be logged in as root to run this script.
Log in as root and rerun this script.
2014-04-01 17:08:12: Not running as authorized user
Insufficient privileges to execute this script.
root or administrative privileges needed to run the script.

了解该脚本的功能可以查看-help。如升级、回退、重新配置等待》

[root@rac-two install]# ./rootcrs.pl  -help
Usage:
      rootcrs.pl [-verbose] [-upgrade [-force] | -patch]
                [-paramfile ]
                [-deconfig [-deinstall] [-keepdg] [-force] [-lastnode]]
                [-downgrade -oldcrshome -version [-force] [-lastnode]] 
                [-unlock [-crshome ] [-nocrsstop]]
                [-init]

      Options:
      -verbose    Run this script in verbose mode
      -upgrade    Oracle HA is being upgraded from previous version
      -patch      Oracle HA is being upgraded to a patch version
      -paramfile  Complete path of file specifying HA parameter values
      -lastnode  Force the node this script is executing on to be considered
                  as the last node of deconfiguration or downgrade, and perform
                  actions associated with deconfiguring or downgrading the
                  last node
      -downgrade  Downgrade the clusterware
      -version    For use with downgrade; special handling is required if
                  downgrading to 9i. This is the old crs version in the format
                  A.B.C.D.E (e.g 11.1.0.6.0).
      -deconfig  Remove Oracle Clusterware to allow it to be uninstalled or reinstalled
      -force      Force the execution of steps in delete or dwongrade that cannot
                  be verified to be safe
      -deinstall  Reset the permissions on CRS home during de-configuration
      -keepdg    Keep existing diskgroups during de-configuration
      -unlock    Unlock CRS home
      -crshome    Complete path of crs home. Use with unlock option
      -oldcrshome For use with downgrade. Complete path of the old crs home
      -nocrsstop  used with unlock option to reset permissions on an inactive grid home
      -init      Reset the permissions of all files and directories under CRS home


      If neither -upgrade nor -patch is supplied, a new install is performed

      To see the full manpage for this program, execute:
        perldoc rootcrs.pl

[root@rac-two install]#

在root下清除所有节点cluster 信息:

节点2:

[grid@rac-one install]$ su
Password:
[root@rac-one install]# ./rootcrs.pl -deconfig -force
Using configuration parameter file: ./crsconfig_params
Network exists: 1/192.168.4.0/255.255.255.0/eth0, type static
VIP exists: /rac-one-vip/192.168.4.113/192.168.4.0/255.255.255.0/eth0, hosting node rac-one
VIP exists: /rac-two-vip/192.168.4.114/192.168.4.0/255.255.255.0/eth0, hosting node rac-two
GSD exists
ONS exists: Local port 6100, remote port 6200, EM port 2016
CRS-2673: Attempting to stop 'ora.registry.acfs' on 'rac-one'
CRS-2677: Stop of 'ora.registry.acfs' on 'rac-one' succeeded
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac-one'
CRS-2673: Attempting to stop 'ora.crsd' on 'rac-one'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac-one'
CRS-2673: Attempting to stop 'ora.oc4j' on 'rac-one'
CRS-2673: Attempting to stop 'ora.GIDG.dg' on 'rac-one'
CRS-2673: Attempting to stop 'ora.DATADG.dg' on 'rac-one'
CRS-2677: Stop of 'ora.DATADG.dg' on 'rac-one' succeeded
CRS-2677: Stop of 'ora.GIDG.dg' on 'rac-one' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac-one'
CRS-2677: Stop of 'ora.oc4j' on 'rac-one' succeeded
CRS-2672: Attempting to start 'ora.oc4j' on 'rac-two'
CRS-2677: Stop of 'ora.asm' on 'rac-one' succeeded
CRS-2676: Start of 'ora.oc4j' on 'rac-two' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac-one' has completed
CRS-2677: Stop of 'ora.crsd' on 'rac-one' succeeded
CRS-2673: Attempting to stop 'ora.crf' on 'rac-one'
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac-one'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac-one'
CRS-2673: Attempting to stop 'ora.asm' on 'rac-one'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'rac-one'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac-one'
CRS-2677: Stop of 'ora.crf' on 'rac-one' succeeded
CRS-2677: Stop of 'ora.evmd' on 'rac-one' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'rac-one' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'rac-one' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac-one' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'rac-one'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'rac-one' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac-one'
CRS-2677: Stop of 'ora.cssd' on 'rac-one' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'rac-one'
CRS-2677: Stop of 'ora.drivers.acfs' on 'rac-one' succeeded
CRS-2677: Stop of 'ora.gipcd' on 'rac-one' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac-one'
CRS-2677: Stop of 'ora.gpnpd' on 'rac-one' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac-one' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Removing Trace File Analyzer
Successfully deconfigured Oracle clusterware stack on this node
[root@rac-one install]#

节点1,因为我的RAC是双节点的,那么在清除最后一个使用lastnode参数:

[grid@rac-two crs]$ cd install/
[grid@rac-two install]$ su
Password:
[root@rac-two install]# ./rootcrs.pl -deconfig -force -lastnode
Using configuration parameter file: ./crsconfig_params
CRS resources for listeners are still configured
Network exists: 1/192.168.4.0/255.255.255.0/eth0, type static
VIP exists: /rac-two-vip/192.168.4.114/192.168.4.0/255.255.255.0/eth0, hosting node rac-two
GSD exists
ONS exists: Local port 6100, remote port 6200, EM port 2016
CRS-2673: Attempting to stop 'ora.registry.acfs' on 'rac-two'
CRS-2677: Stop of 'ora.registry.acfs' on 'rac-two' succeeded
CRS-2673: Attempting to stop 'ora.crsd' on 'rac-two'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac-two'
CRS-2673: Attempting to stop 'ora.oc4j' on 'rac-two'
CRS-2673: Attempting to stop 'ora.GIDG.dg' on 'rac-two'
CRS-2673: Attempting to stop 'ora.DATADG.dg' on 'rac-two'
CRS-2677: Stop of 'ora.DATADG.dg' on 'rac-two' succeeded
CRS-2677: Stop of 'ora.oc4j' on 'rac-two' succeeded
CRS-2677: Stop of 'ora.GIDG.dg' on 'rac-two' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac-two'
CRS-2677: Stop of 'ora.asm' on 'rac-two' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac-two' has completed
CRS-2677: Stop of 'ora.crsd' on 'rac-two' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac-two'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac-two'
CRS-2673: Attempting to stop 'ora.asm' on 'rac-two'
CRS-2677: Stop of 'ora.evmd' on 'rac-two' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac-two' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'rac-two'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'rac-two' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'rac-two' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac-two'
CRS-2677: Stop of 'ora.cssd' on 'rac-two' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac-two'
CRS-2676: Start of 'ora.cssdmonitor' on 'rac-two' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'rac-two'
CRS-2672: Attempting to start 'ora.diskmon' on 'rac-two'
CRS-2676: Start of 'ora.diskmon' on 'rac-two' succeeded
CRS-2676: Start of 'ora.cssd' on 'rac-two' succeeded
CRS-4611: Successful deletion of voting disk +GIDG.
ASM de-configuration trace file location: /tmp/asmcadc_clean2014-04-01_05-14-52-PM.log
ASM Clean Configuration START
ASM Clean Configuration END

ASM with SID +ASM1 deleted successfully. Check /tmp/asmcadc_clean2014-04-01_05-14-52-PM.log for details.

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac-two'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac-two'
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac-two'
CRS-2673: Attempting to stop 'ora.asm' on 'rac-two'
CRS-2677: Stop of 'ora.mdnsd' on 'rac-two' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'rac-two' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac-two' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'rac-two'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'rac-two' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac-two'
CRS-2677: Stop of 'ora.cssd' on 'rac-two' succeeded
CRS-2673: Attempting to stop 'ora.crf' on 'rac-two'
CRS-2677: Stop of 'ora.crf' on 'rac-two' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'rac-two'
CRS-2677: Stop of 'ora.gipcd' on 'rac-two' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac-two'
CRS-2677: Stop of 'ora.gpnpd' on 'rac-two' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac-two' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Removing Trace File Analyzer
Successfully deconfigured Oracle clusterware stack on this node
[root@rac-two install]#


    
 
 

您可能感兴趣的文章:

  • 如何将Aix上的oracle 物理备份 然后再在linux 系统上还原oracle
  • Oracle数据库设置任务计划备份一周的备份记录
  • Oracle数据库备份和恢复工具 RMan
  • oracle10g 数据备份与导入
  • aix下自动备份oracle 的输出日志问题,急!!
  • hp unix下备份oracle表的问题
  • linux小白提问linux备份oracle数据库的问题
  • oracle不能自动备份
  • Oracle数据库逻辑备份的SH文件
  • Linux环境中Oracle数据导入与导出备份操作
  • oracle数据库备份急???????????
  • oracle定时备份压缩的实现步骤
  • Unix系统下如何将oracle数据库备份
  • 详解如何应用改变跟踪技术加速Oracle递增备份
  • Oracle中备份表的简单sql命令语句
  • 实战Oracle数据库备份与恢复
  • Linux下实现自动备份Oracle数据库
  • oracle备份恢复的具体方法
  • 利用windows任务计划实现oracle的定期备份
  • Oracle11g备份和恢复功能的提高
  • Oracle数据库恢复后心得
  • 关于系统重装后Oracle数据库完全恢复的解决办法
  • oracle drop table(表)数据恢复方法
  • oracle中误删除表后恢复语句(FLASHBACK)
  • oracle冷备份恢复和oracle异机恢复使用方法
  • 在Oracle 10gR2中设定指定的恢复点实现轻松闪回
  • Oracle重做日志文件损坏或丢失后的恢复
  • oracle下实现恢复一个丢失的数据文件的代码
  • 详解通过Backup Exec来实施Oracle灾难恢复
  • Oracle的恢复管理器及DBMS_JOB包分析
  • Oracle数据库文件恢复以及备份思路
  •  
    本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
    本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • Oracle 8x监控sysdba角色用户登陆情况
  • oracle中不知道某数据库用户密码的情况下也能登陆
  • 在Oracle中监控和跟踪索引使用情况
  • 查看Oracle CPU情况
  • Oracle10g使用sql获得ADDM报告以及利用ADDM监控表的dml情况
  • Oracle 查看表空间的大小及使用情况sql语句
  • oracle查询锁表与解锁情况提供解决方案
  • [Oracle] 解析在没有备份的情况下undo损坏怎么办
  • 有关Oracle数据库的备份情况
  • Oracle 12c发布简单介绍及官方下载地址
  • 在linux下安装oracle,如何设置让oracle自动启动!也就是让oracle那个服务自动启动,不是手动的
  • oracle 11g最新版官方下载地址
  • 请问su oracle 和su - oracle有什么不同?
  • Oracle 数据库(oracle Database)Select 多表关联查询方式
  • 虚拟机装Oracle R12与Oracle10g
  • Oracle数据库(Oracle Database)体系结构及基本组成介绍
  • Oracle 数据库开发工具 Oracle SQL Developer
  • 如何设置让Oracle SQL Developer显示的时间包含时分秒
  • Oracle EBS R12 支持 Oracle Database 11g
  • Oracle 10g和Oracle 11g网格技术介绍
  • SCO unix下安装oracle,但没有光盘,请大家推荐一个oracle下载站点(unix版本的)。谢谢!!!!
  • oracle中如何把表中具有相同值列的多行数据合并成一行
  • 请问大家用oracle数据库, 用import oracle.*;下的东西么? 还是用标准库?
  • Oracle 数据库(oracle Database)性能调优技术详解
  • Linux /$ORACLE_HOME $ORACLE_HOME
  • ORACLE日期相关操作
  • Linux系统下Oracle的启动与Oracle监听的启动
  • ORACLE数据库常用字段数据类型介绍
  • 请问在solaris下安装ORACLE,用root用户和用oracle用户安装有什么区别么?
  • Oracle 12c的九大最新技术特性介绍
  • 网间Oracle的连接,远程连接Oracle服务器??


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,