RelationalDBDesign RelationalDBDesign


Backup Options   «Prev 

Restoring a File to an Alternative Location

  1. To shut down the database and start the restoring process, type SHUTDOWN ABORT at the prompt and press Enter.
  2. To access the operating system, type HOST at the prompt and press Enter.
  3. To copy the backup files to a new location, type COPY D:\ORCL_BCKUP\*.* D:\ORCL_NEW at the prompt and press Enter.
  4. You must edit the initorcl.ora file to update the new file location for the control file. You can open this file in an editor like Notepad. Once you open the file, find the line control_files = and update it with the new location for the control file. In this particular example, we will make the change in the initorcl.oa for you. The original control_files = C:\orant\DATABASE\ctl1ORCL.ora is replaced by control_files = D:\ORCL_NEW\Ctl1orcl.ora in the initorcl.ora file. To access Server Manager, type EXIT at the prompt and press Enter.
  5. To mount the database, type STARTUP MOUNT PFILE=D:\ORANT\DBS\INITORCL.ORA at the prompt and press Enter (Note: do not open the database at this point).
  6. To update the new file location in the control file, type
    ALTER DATABASE RENAME FILE 'C:\ORANT\DATABASE\USR1ORCL.ORA' TO
    'D:\ORCL_NEW\USR1ORCL.ORA';
    
    at the prompt and press Enter (Note: The location for all restored datafiles and online redo log files must be updated in the control file. To check the information about the file location change, use the data dictionary view V$CONTROLFILE).
  7. The new file location for all the datafiles and redo logs must be updated within the control file. So you need to repeat the previous step for all of them. We will do this for you. Just press Enter at the prompt and observe the results.
  8. Click anywhere on the screen to see the rest of the results for the location of all the files and redo logs.
  9. Click anywhere on the screen to see the rest of the results for the location of all the files and redo logs.
  10. To open the database at the new location, D:\orcl_new, type ALTER DATABASE OPEN; and press enter.
  11. This is the end of the Simulation.