2 Day DBA > Backing Up and Recovering > Backing Up and Restoring th... > Enabling ARCHIVELOG Mode fo...
Enabling ARCHIVELOG Mode for Media Failure Protection |
Previous |
Next |
This section describes how to turn on ARCHIVELOG
mode so that your database is fully protected not only against operating system and Oracle instance failure, but also against media (disk) failure. The following topics are covered:
To view the current ARCHIVELOG
mode setting:
Access the Database Home Page.
See "Accessing the Database Home Page" for instructions.
Examine the Usage Monitor.
Note: If the Usage Monitor does not appear on the Database Home Page, click the Customize link near the upper right-hand corner of the page, and then enable the Usage Monitor. |
The Log Archiving mode is displayed in the last line of the Usage Monitor. In this example, the text Log Archiving: Off
indicates that ARCHIVELOG
mode is turned off.
Note: Click the Log Archiving: {On|Off} link to view a page that provides details on the online redo logs. |
Turning on ARCHIVELOG
mode is a one-time operation. After it is turned on, it remains on until you turn it off. (You turn off ARCHIVELOG
mode by setting NOARCHIVELOG
mode.) Restarting the database does not change the ARCHIVELOG
mode setting.
To turn on ARCHIVELOG mode:
Using SQL Command Line, log in to the database and connect as SYSDBA
, as described in "Logging In and Connecting to the Database as SYSDBA".
At the SQL Command Line prompt, enter the following command:
SHUTDOWN IMMEDIATE
If the command is successful, it displays the following output.
Database closed. Database dismounted. ORACLE instance shut down.
At the SQL Command Line prompt, enter the following command:
STARTUP MOUNT
If the command is successful, it displays the following output. (System global area sizes will vary depending on the amount of physical memory in your Oracle Database XE host computer.)
ORACLE instance started. Total System Global Area 599785472 bytes Fixed Size 1220804 bytes Variable Size 180358972 bytes Database Buffers 415236096 bytes Redo Buffers 2969600 bytes Database mounted.
Enter the following command:
ALTER DATABASE ARCHIVELOG;
If the command is successful, it displays the following output:
Database altered.
Enter the following command:
ALTER DATABASE OPEN;
If the command is successful, it displays the following output:
Database altered.
Exit SQL Command Line by entering the following command:
EXIT
The database is now running with the new ARCHIVELOG
mode setting.
Note: To turn offARCHIVELOG mode (that is, to set NOARCHIVELOG mode), follow the previous steps, but enter the following command in Step 4:
ALTER DATABASE NOARCHIVELOG; |
Caution: When you change theARCHIVELOG mode setting for your database, all of your existing backups become unusable. You must immediately perform a backup after changing the ARCHIVELOG mode, as described in "Backing Up the Database".
|