文档解释
ORA-01244: unnamed datafile(s) added to control file by media recovery
Cause: Media recovery with a backup control file or a control file that was rebuilt, encountered the creation of a datafile that was not in the control file. An entry has been added to the control file for the new datafiles, but with the file name UNNAMEDnnnn, where nnnn is the file number. Attached errors describe the file names that were originally used to create the files.
Action: Rename the files to valid file names and resume recovery. If necessary the command ALTER DATABASE CREATE DATAFILE may be used to create a file suitable for recovery and do the rename. If the file is not going to be recovered then take it offline with the FOR DROP option.
这是一个由媒体恢复引发的错误,主要指恢复过程中没有命名的数据文件被添加到控制文件当中。
官方解释
ORA-01244:未命名的数据文件被媒体恢复添加到控制文件中。
常见案例
假设控制文件丢失,用新的控制文件替换该数据库实例的控制文件,然后用一个RESETLOGS备份开始恢复,此时,在日志文件的操作之后,控制文件中的数据文件被自动添加,若有数据文件在操作前就已经损坏,此时用户会收到这样一条错误信息。
正常处理方法及步骤
1、仔细查看恢复操作日志,并尝试以正确的名称恢复被损坏的数据文件;
2、如被损坏的文件不重要,可以删除该文件;
3、执行ALTER DATABASE DROP DATAFILE命令,从控制文件中删除未命名的文件。
4、使用ALTER DATABASE OPEN RESETLOGS 命令打开数据库。