Switching to Archivelog mode – Oracle 11g
Archivelog mode is a must for a production database as it ensures high recoverability of the database and provides greater flexibility to backup.
Its very simple to turn on archiveing of Redo logs in your database.
First step is check the log mode of the database.
There are two ways to check this.
First way is to query the column LOG_MODE from v$database.
sys@ORCL> select log_mode from v$database; LOG_MODE
------------
NOARCHIVELOG
sys@ORCL>
sys@ORCL> Second way is to use the command ARCHIVE LOG LIST sys@ORCL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 51
Current log sequence 53
sys@ORCL> Second step is to shutdown the database in consistent manner using any one the command such as SHUTDOWN , SHUTDOWN IMMEDIATE or SHUTDOWN TRANSACTIONAL sys@ORCL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@ORCL>
Mount the database instance sys@ORCL>
sys@ORCL> startup mount
ORACLE instance started. Total System Global Area 263639040 bytes
Fixed Size 1373964 bytes
Variable Size 209717492 bytes
Database Buffers 46137344 bytes
Redo Buffers 6410240 bytes
Database mounted.
sys@ORCL> Check whether the archive log parameters are set as per the requirement sys@ORCL>
sys@ORCL> show parameter log_archive_dest_1 NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_1 string location=F:\app\FRA\orcl
log_archive_dest_10 string
log_archive_dest_11 string
sys@ORCL>
sys@ORCL> show parameter log_archive_dest_state_1 NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_1 string enable
log_archive_dest_state_10 string enable
log_archive_dest_state_11 string enable sys@ORCL>
sys@ORCL> show parameter log_archive_format NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_format string ARC%S_%R.%T
sys@ORCL>
sys@ORCL>
Now alter the database to archive the redo logs.
sys@ORCL>
sys@ORCL> alter database archivelog
2 ;
sys@ORCL>
sys@ORCL>
Check the log_mode now
sys@ORCL> select log_mode from v$database; LOG_MODE
------------
ARCHIVELOG
sys@ORCL>
You can now open the database for operation.
Comments
Post a Comment