I am doing an OCP and as a practice, I am trying to backup and recover
the database. Here is what i did -
1) I made the database as noarchivelog and created few tables and
loaded with the data.
2) Later i shutdown the database and copied only the USER_DATA.DBF
datafile to some other backup directory (Yes, only the datafile and
not the controlfile).
3) Started the database and deleted all the rows from the table.
4) Switched the logs 5/6 times to erase the log entries.
5) Shutdown the database and restored datafile from the backup
directory.
6) Startup nomount
7) recover database
8) see below
SQL> alter database open
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database
open
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: 'C:\ORACLE\ORADATA\MYDB9I\SYSTEM01.DBF'
SQL> alter database open noresetlogs;
alter database open noresetlogs
*
ERROR at line 1:
ORA-01588: must use RESETLOGS option for database open