要做实验报告 oracle坏了
其实从 ora-01033 : oracle initialization or shutdown in progress
开始
解决的时候查了一些东西 修的时候着急了 没有及时记录 (下次注意)
ora-01033 : oracle initialization or shutdown in progress网上查询 说数据库文件损坏
按照这个
2、运行sqlplus "/as sysdba"
SQL>shutdownimmediate 停止服务
SQL>startup 启动服务,观察启动时有无数据文件加载报错,并记住出错数据文件标号
SQL>shutdownimmediate 再次停止服务
SQL>startupmount
SQL>recover datafile 2 恢复出错的数据文件
SQL>shutdownimmediate 再次停止服务
SQL>startup 启动服务,此次正常
这是修好后的 提示 一开始 在redo buffers 下面有两行错误 根据我的搜索历史 是这样的提示
第 1 行出现错误:
ORA-00600: 内部错误代码, 参数: [kcratr_nab_less_than_odr], [1], [99189],
[43531], [43569], [], [], [], [], [], [], [] 然后[1]后面的参数不太一样
没有截下图来(这是修好的截图)
另外一段命令是
报的是 ora-001152 和ora-01110 (没截图 当时第一行是中文 第二行是个文件路径)
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '+DATA/dprod/datafile/system01.dbf'
应该是file1的问题
下边是 参照方法
在登陆sys账户上,报了ora-01152错误 按照http://blog.itpub.net/26252014/viewspace-755312/的方法
在报ORA-01152错误后
RMAN> alter database open resetlogs;
RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of alter db command at 03/05/2013 14:56:41 ORA-01152: file 1 was not restored from a sufficiently old backup ORA-01110: data file 1: '/oracle/u01/app/oracle/oradata/orcl/system01.dbf' |
j) 重启数据库
SQL> startup force; ORA-32004: obsolete and/or deprecated parameter(s) specified ORACLE instance started.
Total System Global Area 1224736768 bytes Fixed Size 2020384 bytes Variable Size 352324576 bytes Database Buffers 855638016 bytes Redo Buffers 14753792 bytes Database mounted. ORA-01589: must use RESETLOGS or NORESETLOGS option for database open |
k) 更改参数
SQL> alter system set "_allow_resetlogs_corruption"=true scope=spfile;
System altered. |
l) 恢复数据库
SQL> recover database using backup controlfile until cancel; ORA-00279: change 5638424 generated at 03/05/2013 14:48:17 needed for thread 1 ORA-00289: suggestion : /oracle/u01/app/oracle/oradata/orcl/archive/1_1_809275697.dbf ORA-00280: change 5638424 for thread 1 is in sequence #1
Specify log: {=suggested | filename | AUTO | CANCEL} cancel ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below ORA-01152: file 1 was not restored from a sufficiently old backup ORA-01110: data file 1: '/oracle/u01/app/oracle/oradata/orcl/system01.dbf'
ORA-01112: media recovery not started
SQL> alter database open resetlogs; alter database open resetlogs * ERROR at line 1: ORA-01092: ORACLE instance terminated. Disconnection forced
SQL> startup force; ORA-32004: obsolete and/or deprecated parameter(s) specified ORACLE instance started.
Total System Global Area 1224736768 bytes Fixed Size 2020384 bytes Variable Size 352324576 bytes Database Buffers 855638016 bytes Redo Buffers 14753792 bytes Database mounted. Database opened.
|
m) 将内置参数改回来
SQL> alter system set "_allow_resetlogs_corruption"=false scope=spfile;
System altered. |
执行完这个以后 就能连接上数据库了
-----------------------------------------------------------------------------------