码迷,mamicode.com
首页 > 其他好文 > 详细

控制文件丢失解决方法

时间:2016-12-01 15:00:50      阅读:118      评论:0      收藏:0      [点我收藏+]

标签:控制文件 oracle

控制文件丢失解决方式:
1 alter database backup controlfile to trace;
2 在trace文件中粘贴出这一段
vi /home/oracle/control.sql
CREATE CONTROLFILE REUSE DATABASE "ORA11GR2" NORESETLOGS  NOARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 ‘/u01/app/oracle/oradata/ORA11GR2/redo01.log‘  SIZE 50M BLOCKSIZE 512,
  GROUP 2 ‘/u01/app/oracle/oradata/ORA11GR2/redo02.log‘  SIZE 50M BLOCKSIZE 512,
  GROUP 3 ‘/u01/app/oracle/oradata/ORA11GR2/redo03.log‘  SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
  ‘/u01/app/oracle/oradata/ORA11GR2/system01.dbf‘,
  ‘/u01/app/oracle/oradata/ORA11GR2/sysaux01.dbf‘,
  ‘/u01/app/oracle/oradata/ORA11GR2/undotbs01.dbf‘,
  ‘/u01/app/oracle/oradata/ORA11GR2/users01.dbf‘,
  ‘/u01/app/oracle/oradata/ORA11GR2/example01.dbf‘
CHARACTER SET WE8MSWIN1252
;

3 shutdown immediate
4
[oracle@wdd58 ORA11GR2]$ mv control01.ctl control01.ctl.bak
[oracle@wdd58 ORA11GR2]$ mv control02.ctl control02.ctl.bak
5 startup nomount
 @/home/oracle/control.sql
 SQL> select status from v$instance;   

STATUS
------------
MOUNTED
6 alter database open;
7 select name from v$tempfile;
发现没有临时表空间对应的文件
8
alter tablespace temp add tempfile ‘/u01/app/oracle/oradata/ORA11GR2/temp01.dbf‘ reuse;
9
select name from v$tempfile;

控制文件丢失解决方法

标签:控制文件 oracle

原文地址:http://duxiutemp.blog.51cto.com/10788420/1878439

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!