Enabling archivelog mode in Oracle 10g

In this article I will show you how to enable archivelog mode in Oracle 10g.

1. Login to database as sysdba:

SolarisA#> sqlplus / as sysdba


2. Check current database log mode and status :

SYS@SolA> select log_mode from v$database;
LOG_MODE
————
NOARCHIVELOG
SYS@SolA> select DATABASE_STATUS from v$instance;
DATABASE_STATUS
—————–
ACTIVE

3. Shutdown database.

SYS@SolA> shutdown immediate

 

4.Add following lines to our init.ora file:

log_archive_dest_1                   = ‘Location=/oradata/arch/SolA’
log_archive_dest_state_1             = enable
log_archive_format                   = arch_SolA_%r_%t_%s.arc
log_archive_start                    = true

 

5. Creating new spfile from modified pfile:

SYS@SolA> create spfile=’/u01/app/oracle/product/10.2.0/dbs/spfileSolA.ora’ from pfile=’/u01/app/oracle/product/10.2.0/dbs/initSolA.ora’;


6. Starup database to mount state:

SYS@SolA> startup mount

 

7. Enable archivelog mode:

SYS@SolA> alter database archivelog;

 

8. Open database:

SYS@SolA> alter database open;


9. Check if parameters are set correctly:

 

SYS@SolA> select log_mode from v$database;
LOG_MODE
————
ARCHIVELOG

 

SYS@SolA> select DEST_NAME,STATUS,DESTINATION from V$ARCHIVE_DEST where DEST_NAME=’LOG_ARCHIVE_DEST_1′;
DEST_NAME            STATUS    DESTINATION
——————– ——— ——————–
LOG_ARCHIVE_DEST_1   VALID     /oradata/arch/SolA

Need more information? You didn’t find what you were looking for? Ask on our forum:

www.admindot.eu/forum

we will help.

Leave a Response