Oracle Database Archive Log Mode

You can use any one of those queries to check out ArchiveLog Status of Oracle Database.


SQL> select log_mode from v$database;
LOG_MODE
------------
NOARCHIVELOG


SQL> archive log list
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /archive2
Oldest online log sequence     8043
Current log sequence           8045

Database is required to be opened in Mount status to switch it in Archive Log mode. You can alter Archive Log file format or location.


SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup nomount
ORACLE instance started.

Total System Global Area 7349010432 bytes
Fixed Size                  2139184 bytes
Variable Size            4563405776 bytes
Database Buffers         2751463424 bytes
Redo Buffers               32002048 bytes

SQL> alter database mount;

Database altered.


SQL> alter database archivelog;

Database altered

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /archive2
Oldest online log sequence     8043
Next log sequence to archive   8045
Current log sequence           8045

SQL> show parameter log_archive_format

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_format                   string      log%t_%s_%r.arc

SQL> alter system set log_archive_format='ARC%S_%R_%T_%D.arc' scope=spfile;

System altered.

SQL> alter system switch logfile;

System altered.

SQL> show parameter log_archive_dest;

SQL> alter database open;

Database altered


Thanks
A Rahim Khan

Advertisements
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: