Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

a. By default the TWO_TASK is set to the PDB. Unset the TWO_TASK to connect to the CDB.

No Format
[oracle@source ~]$ echo $TWO_TASK
pdb1
[oracle@source ~]$
unset TWO_TASK

b. Logon to the database (CDB) as sysdba.

No Format
[oracle@source ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.1.0 Production on Thu Jul 31 23:25:18 2014
Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
CDB$ROOT@ORCL>

...

b. Rename the current listener.ora file so that this file is no longer used. We want the default Listener configuration.

No Format
cd /u01/app/oracle/product/12.1.0/dbhome_1/network/admin
mv listener.ora _listener.ora

...

c. Start up the database in no mount mode.

No Format
CDB$ROOT@ORCL> startup mount;
ORACLE instance started.
Total System Global Area  413372416 bytes
Fixed Size		    2289016 bytes
Variable Size		  322962056 bytes
Database Buffers	   79691776 bytes
Redo Buffers		    8429568 bytes
Database mounted.

d. Turn on archivelog mode.

No Format
CDB$ROOT@ORCL> alter database archivelog;
Database altered.

e. Open the database.

No Format
CDB$ROOT@ORCL> alter database open;
Database altered.

f. Check the archivelog mode.

No Format
CDB$ROOT@ORCL> archive log list
Database log mode	       Archive Mode
Automatic archival	       Enabled
Archive destination	       USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     104
Next log sequence to archive   106
Current log sequence	       106

g. Logout of the database.

No Format
SQL> exit

6. Ensure the archive log files are managed and not filling up and stopping the database. Install a script that manages the archive logs.

...

d. Make the script executable and change ownership to oracle.

No Format
[root@source bin]# chmod 750 /usr/local/bin/del_arch.sh 
No Format
[root@source bin]# chown oracle:dba /usr/local/bin/del_arch.sh 
No Format
[root@source bin]# exit

e. As user oracle, add the script to the oracle crontab.

...