ORA-01209: data file is from before the last RESETLOGS
Cause: The reset log data in the file header does not match the control file. If the database is closed or the file is offline, the backup is old because it was taken before the last ALTER DATABASE OPEN RESETLOGS command. If opening a database that is open already by another instance, or if another instance just brought this file online, the file accessed by this instance is probably a different version. Otherwise, a backup of the file probably was restored while the file was in use.
Action: Make the correct file available to the database. Then, either open the database, or execute ALTER SYSTEM CHECK DATAFILES.
ORA-01209: data file is from before the last RESETLOGS 错误是由于你把一个以前 restore 的数据库里的文件加入到当前数据库中造成的。
ORA-01209 occurs when an attempt is made to add datafile(s) which had been restored from a backup taken before the resetlogs operation.
ORA-01209 错误通常发生在以下几种情况:
1. 尝试恢复数据文件,但这些文件是在你上次 RESETLOGS 之前做的备份。
2. 使用 RMAN 恢复数据区域,但「BEFORE RESETLOGS」被设置在恢复范围里。
3. 尝试打开一个数据文件,但它是在上次 resetlogs 之前创建的。
该错误处理方案如下:
1. 首先把数据文件从当前数据文件里移除。
2. 用 RMAN 重新恢复数据文件,只在恢复范围里简单指定哪些数据文件要恢复。
3. 把恢复的文件设置为 online 状态。