Friday, March 4, 2016

Enabling archive log mode -12c

Since the Redologs are created at container database level in 12c and not at pluggable database level. (Enabling archivelog at pluggable database level is not possible). Archiving is done at CDB's.

You can check archive log mode either by querying v$database or archivelog list 

SQL> select name,open_mode,log_mode from v$database;

NAME  OPEN_MODE       LOG_MODE
--------- -------------------- ------------
ORCL  READ WRITE       NOARCHIVELOG

(OR)

SQL> archive log list
Database log mode       Archive Mode
Automatic archival       Disabled
Archive destination       USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     11
Next log sequence to archive   13
Current log sequence       13

*************** ***************
To enable the Archvielog mode
*************** ***************

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

SQL> startup mount;
ORACLE instance started.

Total System Global Area  788529152 bytes
Fixed Size    2929352 bytes
Variable Size  541068600 bytes
Database Buffers  239075328 bytes
Redo Buffers    5455872 bytes
Database mounted.

SQL> ALTER DATABASE ARCHIVELOG;

Database altered.

SQL> ALTER DATABASE OPEN;

Database altered.

SQL> select name,open_mode,log_mode from v$database;

NAME  OPEN_MODE       LOG_MODE
--------- -------------------- ------------
ORCL  READ WRITE       ARCHIVELOG


SQL> archive log list
Database log mode       Archive Mode
Automatic archival       Enabled
Archive destination       USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     11
Next log sequence to archive   13
Current log sequence       13

No comments:

Post a Comment