欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

恢复备份文件后,无法正常启动数据库

程序员文章站 2022-07-13 12:35:43
...

 

控制文件损坏,需从备份文件中恢复,

但将备份文件恢复后,启动数据库是报错,如下:

ORA-00205: error in identifying control file, check alert log for more info

 

SQL> startup
ORACLE instance started.

Total System Global Area  603979776 bytes
Fixed Size                  2022664 bytes
Variable Size             130024184 bytes
Database Buffers          469762048 bytes
Redo Buffers                2170880 bytes
ORA-00205: error in identifying control file, check alert log for more info

   

1、查询日志

cat  /opt/oracle/admin/orcl/bdump/alert_orcl.log

  

2、显示读取控制文件权限不够 

ORA-00202: control file: '/opt/oracle/oradata/orcl/control01.ctl'
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 2
Thu Jan 22 23:00:13 2015
ORA-205 signalled during: ALTER DATABASE   MOUNT...

  

3、查询文件权限,权限都是640

y10:/opt/oracle/oradata/orcl # ll
total 3045708
-rw-r----- 1 root root    7946240 Jan 22 22:55 control01.ctl
-rw-r----- 1 root root    7946240 Jan 22 22:55 control02.ctl
-rw-r----- 1 root root    7946240 Jan 22 22:55 control03.ctl
-rw-r----- 1 root root  104865792 Jan 22 22:57 example01.dbf
-rw-r----- 1 root root   52429312 Jan 22 22:58 redo01.log
-rw-r----- 1 root root   52429312 Jan 22 22:58 redo02.log
-rw-r----- 1 root root   52429312 Jan 22 22:58 redo03.log
-rw-r----- 1 root root  492838912 Jan 22 22:57 sysaux01.dbf
-rw-r----- 1 root root  524296192 Jan 22 22:57 system01.dbf
-rw-r----- 1 root root   20979712 Jan 22 22:57 temp01.dbf
-rw-r----- 1 root root 1017126912 Jan 22 22:58 undotbs01.dbf
-rw-r----- 1 root root    5251072 Jan 22 22:58 users01.dbf

  

4、下面将其全部改成777 吧

y10:/opt/oracle/oradata/orcl # chmod -R 777 *

  

5、改完后的样子

y10:/opt/oracle/oradata/orcl # ll
total 3045708
-rwxrwxrwx 1 root root    7946240 Jan 22 22:55 control01.ctl
-rwxrwxrwx 1 root root    7946240 Jan 22 22:55 control02.ctl
-rwxrwxrwx 1 root root    7946240 Jan 22 22:55 control03.ctl
-rwxrwxrwx 1 root root  104865792 Jan 22 22:57 example01.dbf
-rwxrwxrwx 1 root root   52429312 Jan 22 22:58 redo01.log
-rwxrwxrwx 1 root root   52429312 Jan 22 22:58 redo02.log
-rwxrwxrwx 1 root root   52429312 Jan 22 22:58 redo03.log
-rwxrwxrwx 1 root root  492838912 Jan 22 22:57 sysaux01.dbf
-rwxrwxrwx 1 root root  524296192 Jan 22 22:57 system01.dbf
-rwxrwxrwx 1 root root   20979712 Jan 22 22:57 temp01.dbf
-rwxrwxrwx 1 root root 1017126912 Jan 22 22:58 undotbs01.dbf
-rwxrwxrwx 1 root root    5251072 Jan 22 22:58 users01.dbf

  

6、重新启动数据库,OH, YEAH  成功咯!

SQL> startup
ORACLE instance started.

Total System Global Area  603979776 bytes
Fixed Size                  2022664 bytes
Variable Size             130024184 bytes
Database Buffers          469762048 bytes
Redo Buffers                2170880 bytes
Database mounted.
Database opened.

 

alert日志文件目录

/opt/oracle/admin/orcl/bdump/alert_orcl.log

 

控制文件、数据文件、日志文件目录

/opt/oracle/oradata/orcl/*