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

Oracle用老的控制文件备份恢复新建的数据文件

程序员文章站 2024-02-18 23:06:52
...

最后,如果是system表空间损坏,又无备份,那么是无法打开数据库的,如果是sysaux,无备份,数据库还是可以open,当然要在重建控

最后,如果是system表空间损坏,,又无备份,那么是无法打开数据库的,如果是sysaux,无备份,数据库还是可以open,当然要在重建控制文件的时候去掉损坏的数据文件,否则是无法创建成功的,如下实例:

SQL> CREATE CONTROLFILE REUSE DATABASE "SKYREAD" NORESETLOGS FORCE LOGGING ARCHIVELOG

2 MAXLOGFILES 20

3 MAXLOGMEMBERS 5

4 MAXDATAFILES 1000

5 MAXINSTANCES 8

6 MAXLOGHISTORY 2337

7 LOGFILE

8 GROUP 1 '/database/oradata/skyread/redo01.log' SIZE 512M,

9 GROUP 2 '/database/oradata/skyread/redo02.log' SIZE 512M,

10 GROUP 3 '/database/oradata/skyread/redo03.log' SIZE 512M,

11 GROUP 4 '/database/oradata/skyread/redo04.log' SIZE 512M,

12 GROUP 5 '/database/oradata/skyread/redo05.log' SIZE 512M

13 DATAFILE

14 '/database/oradata/skyread/system01.dbf',

15 '/database/oradata/skyread/tbs_test.dbf',

16 '/database/oradata/skyread/sysaux01.dbf',

17 '/database/oradata/skyread/users01.dbf',

18 '/database/oradata/skyread/tbs_tbs.dbf',

19 '/database2/oradata/skyread/TBS_MRPMUSIC01.dbf',

20 '/database/oradata/skyread/sf01.dbf',

21 '/database2/oradata/skyread/undotbs02'

22 CHARACTER SET UTF8;

CREATE CONTROLFILE REUSE DATABASE "SKYREAD" NORESETLOGS FORCE LOGGING ARCHIVELOG

*

ERROR at line 1:

ORA-01503: CREATE CONTROLFILE failed

ORA-01565: error in identifying file '/database/oradata/skyread/sysaux01.dbf'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

SQL> CREATE CONTROLFILE REUSE DATABASE "SKYREAD" NORESETLOGS FORCE LOGGING ARCHIVELOG

2 MAXLOGFILES 20

3 MAXLOGMEMBERS 5

4 MAXDATAFILES 1000

5 MAXINSTANCES 8

6 MAXLOGHISTORY 2337

7 LOGFILE

8 GROUP 1 '/database/oradata/skyread/redo01.log' SIZE 512M,

9 GROUP 2 '/database/oradata/skyread/redo02.log' SIZE 512M,

10 GROUP 3 '/database/oradata/skyread/redo03.log' SIZE 512M,

11 GROUP 4 '/database/oradata/skyread/redo04.log' SIZE 512M,

12 GROUP 5 '/database/oradata/skyread/redo05.log' SIZE 512M

13 DATAFILE

14 '/database/oradata/skyread/system01.dbf',

15 '/database/oradata/skyread/tbs_test.dbf',

16 '/database/oradata/skyread/users01.dbf',

17 '/database/oradata/skyread/tbs_tbs.dbf',

18 '/database2/oradata/skyread/TBS_MRPMUSIC01.dbf',

19 '/database/oradata/skyread/sf01.dbf',

20 '/database2/oradata/skyread/undotbs02'

21 CHARACTER SET UTF8;

Control file created.

SQL> alter database open;

Database altered.