Monday, June 22, 2009

Configure the database in archive mode..?

By default the database will be in NOARCHIVELOG mode when created initially.The archiving mode can be changed by :
1) Setting ARCHIVELOG initialization parameter
2) Configuring ARCHIVELOG mode manually

1) Setting ARCHIVELOG initialization parameter :
In case of local host set LOG_ARCHIVE_DEST and LOG_ARCHIVE_DUPLEX_DEST. In case of local or remote host set LOG_ARCHIVE_DEST_n where n is a value from 1 to 10. These are the parameters set in initialization parameter file to specify the archivelog destination.

For Example,
LOG_ARCHIVE_DEST_1 = 'LOCATION=/disk1/arc'
LOG_ARCHIVE_DEST_2 = 'SERVICE=standby1'
LOG_ARCHIVE_DEST = '/disk1/arc'
LOG_ARCHIVE_DUPLEX_DEST = '/disk2/arc'
For more details visit>>
2) Configuring ARCHIVELOG Mode :
Follow the steps below to configure ARCHIVELOG mode or switch from NOARCHIVELOG to ARCHIVELOG mode.
1) Shutdown the database instance using :
SQL>SHUTDOWN

2) Backup the database to protect against any major problems.

3) Edit the initialization parameter file to include the initialization parameters that specify the destinations for the archive log files.

4) Start a new instance and mount, but do not open, the database.
SQL>STARTUP MOUNT

5) Change the database archiving mode. Then open the database for normal operations.
SQL> ALTER DATABASE ARCHIVELOG;
SQL> ALTER DATABASE OPEN;
For more details visit>>
6) Shut down the database.
SQL> SHUTDOWN IMMEDIATE

7) Changing the database archiving mode updates the control file. After changing the database archiving mode, we must back up all of our database files and control file. Any previous backup is no longer usable because it was taken in NOARCHIVELOG mode.




No comments:

Post a Comment