Backup Options   «Prev 

Recover Read-only Tablespace

  1. After a media failure, you try to start the system. Type STARTUP OPEN PFILE=C:\ORNAT\DATABASE\INITORCL.ORA at the prompt and press Enter.
  2. The error message shows that the datafile C:\ORANT\DATABASE\STUDENT.ORA is damaged. You know this file belongs to the STUDENT tablespace, which was read-only, and you have a backup of the tablespace. However, you remember that you had one of your junior DBAs change the tablespace to read-write a couple of days ago and it is not included in your routine backup strategy. As a result, you have to use the backup when the tablespace STUDENT was read-only to perform the recovery. In order to make the database available, you must take the damaged tablespace STUDENT offline. Type
    ALTER DATABASE DATAFILE 'C:\ORANT\DATABASE\STUDENT.ORA' OFFLINE;
    
    at the prompt and press Enter.
  3. To start the database, type ALTER DATABASE OPEN; at the prompt and press Enter.
  4. Before restoring the backup STUDENT, you have to access the operating system. Type HOST at the prompt and press Enter.
  5. To restore the backup STUDENT, type COPY C:\ORANT\DATABASEx\ORCLBACKUP\STUDENT_R.ORA C:\ORANT\DATABASE\STUDENT.ORA at the prompt and press Enter.
  6. To recover the damaged datafile, type RECOVER AUTOMATIC DATAFILE 'C:\ORANT\DATABASE\STUDENT.ORA' ; at the prompt and press Enter.
  7. Now you need to bring the datafile back online. Type ALTER DATABASE DATAFILE 'C:\ORANT\DATABASE\STUDENT.ORA' ONLINE; at the prompt and press Enter.
  8. You have successfully recovered the STUDENT tablespace from the backup when the tablespace was read-only. Don't forget to make a backup of this tablespace immediately. You should also include it in your routine backup strategy. This completes the Simulation.