Recovery with Archiving  «Prev 

Perform Open Database Recovery, initially closed

  1. Since the database is closed and the datafile is damaged, you can only start the database in the mount mode. Type STARTUP MOUNT PFILE=C:\ORANT\DATABASE\INITORCL.ORA at the prompt and press Enter.
  2. To check whether the damaged datafile is still online, type SELECT A.FILE#, A.NAME, A.STATUS, B.STATUS FROM V$DATAFILE A, V$DATAFILE_HEADER B WHERE A.FILE# = B.FILE#; at the prompt and press Enter.
  3. To take the damaged datafile offline, type ALTER DATABASE DATAFILE 'C:\ORANT\DATABASE\USR1ORCL.ORA' OFFLINE; at the prompt and press Enter.
  4. Now you can start the database. Type ALTER DATABASE OPEN; at the prompt and press Enter.
  5. You are now ready to restore the damaged datafile. To access the operating system, type HOST at the prompt and press Enter.
  6. To restore the file, type COPY C:\DIGITAL\BACKUP\USR1ORCL.ORA C:\ORANT\DATABASE\USR1ORCL.ORA at the prompt and press Enter.
  7. To access Server Manager, type EXIT at the prompt and press Enter.
  8. To recover the datafile, type RECOVER AUTOMATIC DATAFILE 'C:\ORANT\DATABASE\USR1ORCL.ORA'; at the prompt and press Enter. Because the automatic option is used in this command, Oracle will not prompt you about archive logs.
  9. Since the recovery is finished, you have to bring the recovered datafile online. Type ALTER DATABASE DATAFILE 'C:\ORANT\DATABASE\USR1ORCL.ORA' ONLINE; at the prompt and press Enter.
  10. You have successfully recovered the datafile. This completes the Simulation. Click the Exit button to return to the lesson.