重建控制文件

找到最近的trace文件从中获得重建控制文件的脚本
 Set #2. RESETLOGS case
--
-- The following commands will create a new control file and use it
-- to open the database.
-- Data used by Recovery Manager will be lost.
-- The contents of online logs will be lost and all backups will
-- be invalidated. Use this only if online logs are damaged.
-- After mounting the created controlfile, the following SQL
-- statement will place the database in the appropriate
-- protection mode:
--  ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "RHEL6" RESETLOGS  ARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 '/u01/app/oracle/oradata/rhel6/redo01.log'  SIZE 50M BLOCKSIZE 512,
  GROUP 2 '/u01/app/oracle/oradata/rhel6/redo02.log'  SIZE 50M BLOCKSIZE 512,
  GROUP 3 '/u01/app/oracle/oradata/rhel6/redo03.log'  SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE

DATAFILE
  '/u01/app/oracle/oradata/rhel6/system01.dbf',
  '/u01/app/oracle/oradata/rhel6/sysaux01.dbf',
  '/u01/app/oracle/oradata/rhel6/undotbs01.dbf',
  '/u01/app/oracle/oradata/rhel6/users01.dbf'
CHARACTER SET AL32UTF8
;
然后依次执行下面的过程
RECOVER DATABASE USING BACKUP CONTROLFILE                  (1)
-- Database can now be opened zeroing the online logs.
ALTER DATABASE OPEN RESETLOGS;                           (2)
-- Commands to add tempfiles to temporary tablespaces.
-- Online tempfiles have complete space information.
-- Other tempfiles may require adjustment.
ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/app/oracle/oradata/rhel6/temp01.dbf'
     SIZE 62914560  REUSE AUTOEXTEND ON NEXT 655360  MAXSIZE 32767M;                                (3)
-- End of tempfile additions.
在执行(1)的时候如果出现 ORA-00289: Specify log: {=suggested | filename | AUTO | CANCEL}
就把日志组一个文件写上去/u01/app/oracle/oradata/rhel6/redo03.log,之后查看 select  *  from  v$log;redo3。log为current。此后就可以正常执行(2),(3)了

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

转载于:http://blog.itpub.net/30166973/viewspace-1570658/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值