『ORACLE』数据文件中有‘dbs/MISSING00007’文件(11g)

来源:互联网 发布:网络流行文化 编辑:程序博客网 时间:2024/06/11 05:14

在执行一个rman备份时出现报错,没开归档日志和数据文件7不能被控制文件读取

RMAN> backup database plus archivelog delete input;

Starting backup at 10-JUN-17

ORACLE error from target database:

ORA-00258: manual archiving in NOARCHIVELOG mode must identify log

 

using channel ORA_DISK_1

specification does not match any archived log in the repository

backup cancelled because there are no files to backup

Finished backup at 10-JUN-17

 

Starting backup at 10-JUN-17

using channel ORA_DISK_1

RMAN-06169: could not read file header for datafile 7 error reason 1

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of backup plus archivelog command at 06/10/2017 14:05:19

RMAN-06056: could not access datafile 7

 

14:02:28 SYS@enmo1 hey~J->select file#,name from v$datafile;

 

     FILE#    NAME

----------------------------------------------------------------------------------------------------

         1   /u01/app/oracle/oradata/enmo1/system01.dbf

         2   /u01/app/oracle/oradata/enmo1/sysaux01.dbf

         3   /u01/app/oracle/oradata/enmo1/undotbs01.dbf

         4   /u01/app/oracle/oradata/enmo1/users01.dbf

         5   /u01/app/oracle/oradata/enmo1/example01.dbf

         6   /u01/app/oracle/oradata/enmo1/user02.dbf

         7   /u01/app/oracle/product/11.2.0/dbhome_1/dbs/MISSING00007

7 rows selected.

 

14:12:13 SYS@enmo1 hey~J->select file_id,tablespace_name,online_status from dba_data_files;

 

   FILE_ID TABLESPACE_NAME                ONLINE_

---------- ------------------------------ -------

         6 USERS                          ONLINE

         5 EXAMPLE                        ONLINE

         4 USERS                          ONLINE

         3 UNDOTBS1                       ONLINE

         2 SYSAUX                         ONLINE

         1 SYSTEM                         SYSTEM

         7 ML                             OFFLINE

7 rows selected.

 

14:12:58 SYS@enmo1 hey~J->alter tablespace ml rename datafile '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/MISSING00007' to '/u01/app/oracle/oradata/enmo1/ml.dbf';

 

Tablespace altered.

 

14:17:36 SYS@enmo1 hey~J->startup mount;

ORACLE instance started.

 

Total System Global Area  830930944 bytes

Fixed Size                  2257800 bytes

Variable Size             545262712 bytes

Database Buffers          276824064 bytes

Redo Buffers                6586368 bytes

Database mounted.

14:17:45 SYS@enmo1 hey~J->alter database datafile 7 online;

 

Database altered.

 

14:17:53 SYS@enmo1 hey~J->alter database open;

 

Database altered.

 

因为是在测试库,在开启归档时忘记了保证数据库的一致性关闭报错。

14:20:27 SYS@enmo1 hey~J->startup force mount;

ORACLE instance started.

 

Total System Global Area  830930944 bytes

Fixed Size                  2257800 bytes

Variable Size             545262712 bytes

Database Buffers          276824064 bytes

Redo Buffers                6586368 bytes

Database mounted.

14:20:41 SYS@enmo1 hey~J->alter database archivelog;

alter database archivelog

*

ERROR at line 1:

ORA-00265: instance recovery required, cannot set ARCHIVELOG mode

 

再重启一下库就好了

14:30:18 SYS@enmo1 hey~J->shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

14:30:32 SYS@enmo1 hey~J->startup mount;

ORACLE instance started.

 

Total System Global Area  830930944 bytes

Fixed Size                  2257800 bytes

Variable Size             545262712 bytes

Database Buffers          276824064 bytes

Redo Buffers                6586368 bytes

Database mounted.

14:31:15 SYS@enmo1 hey~J->alter database archivelog;

 

Database altered.

阅读全文
0 0
原创粉丝点击