磁带备份导致数据库异常的处理方法

周末的时候进行系统备份,ORACLE没有关闭的情况下进行了磁带备份.没有预计到会导致数据库异常.根据分析,磁带备份时会将备份文件占用并锁定,这样数据库在读写时无法正常进行,导致某些文件需要RECOVER.
 
  1. 1. Start SQLPLUS:
    sqlplus "/ as sysdba"
  1. 2. Check whether tablespaces are set OFFLINE (only possible if the database is in OPEN state. If you cannot do this, skip steps 2 and 3, and execute them later, if required, when the database is running):    SELECT TABLESPACE_NAME FROM DBA_TABLESPACES
                              WHERE STATUS = 'OFFLINE';
  1. 3. If tablespaces are returned, reset them to ONLINE:    ALTER TABLESPACE ONLINE;
  1. 4. Check which data files have the status RECOVER: SELECT NAME FROM V$DATAFILE WHERE STATUS = 'RECOVER';
  1. 5. If you receive data files with the status RECOVER, recover each of these files with the following command:
    RECOVER DATAFILE '';
      (for example RECOVER DATAFILE
             '/oracle/HX1/sapdata8/stabi_2/stabi.data2';)
  1. 6. Check which data files have the status OFFLINE:
       SELECT NAME FROM V$DATAFILE WHERE STATUS = 'OFFLINE';
  1. 7. Set all these data files ONLINE:
       ALTER DATABASE DATAFILE '' ONLINE;
  1. 8. If the calls in steps 2, 4 and 6 do not return lines anymore, the problem is correcte

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22078283/viewspace-617435/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/22078283/viewspace-617435/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值