Backup Options   «Prev 

Backup and recover a NOARCHIVELOG database

An On Your Own exercise is a good way for you to practice the skills you have just learned in this module. It is an unscored, optional hands-on exercise that you can do if you have access to the optional hardware and software for this course. The suggested results for this exercise are listed below under the heading Instructions.

Background information

In this exercise you will be typing in command lines to backup and recover a NOARCHIVELOG database. You will need to have an Oracle database running on an Windows Platform and you need to have sysdba privileges to access this database.


For each of the steps outlined below, type in the command you should use to begin backing up and restoring a NOARCHIVELOG database.
  1. Create a trace file by typing in the correct command.
    Hint: You will use the information in this file to compose a backup command file.
  2. Make a full backup by performing the following steps:
    a. Create a backup directory
    b. Edit your trace file and save it in your backup directory under the name do_backup.bat (on Windows Platform).
    Hint: You need to put an individual COPY command for each file you find in your trace file. You also need to add lines for your initSID.ora and control files.
    c. Shutdown the database Hint: Don't forget the correct shutdown option.
    d. Run the batch file you created.
  3. Perform some data entry.
    Hint: Enter some data you can easily find later.
  4. Simulate media failure by doing the following:
    a. Delete a datafile.
    Hint: If you get a sharing error, shut down the service on your Windows Platform or you can rename the datafile if you do not want to delete it.
    b. Try to restart the database. What error message do you get? Why?
  5. Perform full restore.
    a. Shutdown the database using the correct command.
    b. Copy the backup files to the original location.
    c. Open the database with the correct command.
  6. Try to locate the data you entered in Step 3. Do you know what happened to your data and why?

Optional: If you decide to restore the files to a different location, do the following for Step 5 and then continue on to Step 6:
a. Shutdown the database with the correct command.
b. Copy the backup files to the new location.
c. Enter your init.ora with a new file location for the control files.
Hint: Do you remember where you find the initSID.ora file? Which line do you need to edit?
d. Mount your database. What startup command do you use?
e. Update your control file with the new file location for the required files.
  1. What commands do you use to update the control file with the new file locations?
  2. What are the affected files?

f. Open the database. What command do you use if you restore files to a different location?