Thursday, January 24, 2013

ORA-01113: file 1 needs media recovery

RMAN-03002: failure of alter db command at 01/24/2013 12:08:25
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: '/u40/oradata/pubs/system01.dbf'
The error occurs when running ALTER DATABASE OPEN command

Cause: The reason is RECOVER DATABASE; statement was no issued after running RESTORE DATABASE and before opening the database via ALTER DATABASE OPEN

Solution: Issue RECOVER DATABASE;

followed by ALTER DATABASE OPEN RESETLOGS; (or NORESETLOGS if no redo logs were lost)

Use RESETLOGS after incomplete recovery (when the entire redo stream wasn't applied). RESETLOGS will initialize the logs, reset your log sequence number, and start a new "incarnation" of the database.

Use NORESETLOGS when doing complete recovery (when the entire redo stream was applied). Oracle will continue using the existing (valid) log files.

The NORESETLOGS option does not clear the redo log files during startup and the online redo logs to be used for recovery. Only used in scenario where MANUAL RECOVERY is started, CANCEL is used, and then RECOVER DATABASE is started.

No comments:

Post a Comment