Configure 12c Database in Archive Log Mode

-bash-4.1$ cd $ORACLE_BASE
-bash-4.1$ pwd
/u01/app/oracle
-bash-4.1$ ll
total 40
drwxr-x—. 4 oracle oinstall 4096 Oct 7 13:36 admin
drwxr-x—. 4 oracle oinstall 4096 Oct 7 12:49 audit
drwxr-x—. 3 oracle oinstall 4096 Oct 7 12:24 cfgtoollogs
drwxr-xr-x. 3 oracle oinstall 4096 Oct 7 12:52 checkpoints
drwxrwxr-x. 19 oracle oinstall 4096 Oct 7 11:59 diag
drwxr-x—. 5 oracle oinstall 4096 Oct 7 12:46 fast_recovery_area
drwxr-x—. 3 oracle oinstall 4096 Oct 7 13:36 oradata
-rw-r–r–. 1 oracle oinstall 5405 Oct 7 19:25 pdb1.xml
drwxrwxr-x. 3 oracle oinstall 4096 Oct 7 11:42 product
-bash-4.1$
-bash-4.1$
-bash-4.1$ mkdir oraarch
-bash-4.1$ cd
-bash-4.1$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Wed Oct 8 15:59:11 2014

Copyright (c) 1982, 2014, Oracle. All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> alter system set log_archive_dest_1=’location=/u01/app/oracle/oraarch’ SCOPE=BOTH;

System altered.

SQL> ALTER SYSTEM SET log_archive_format=’arch_%t_%s_%r.arc’ SCOPE=spfile;

System altered.

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

SQL> ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.

Total System Global Area 1.0100E+10 bytes
Fixed Size 3721224 bytes
Variable Size 1778386936 bytes
Database Buffers 8287944704 bytes
Redo Buffers 29831168 bytes
Database mounted.
SQL> SQL>
SQL>
SQL> show pdbs

CON_ID CON_NAME OPEN MODE RESTRICTED
———- —————————— ———- ———-
2 PDB$SEED MOUNTED
3 PDB1 MOUNTED
4 PDB2 MOUNTED
SQL>
SQL> ALTER DATABASE ARCHIVELOG;

Database altered.

SQL> ALTER DATABASE OPEN;

Database altered.

SQL> show pdbs

CON_ID CON_NAME OPEN MODE RESTRICTED
———- —————————— ———- ———-
2 PDB$SEED READ ONLY NO
3 PDB1 READ WRITE NO
4 PDB2 READ WRITE NO
SQL>
SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.

SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/oraarch
Oldest online log sequence 24
Next log sequence to archive 26
Current log sequence 26
SQL>
SQL> quit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

 

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.