Versions Compared

Key

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

...

2. Setup the OE schema in the database.

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

a. Logon to the database )CDB) as sysdba.

No Format
[oracle@source ~]$ sqlplus / as sysdba
SQL*Plus: Release 1112.21.0.21.0 Production on FriThu DecJul 2031 1823:0025:3218 20132014
Copyright (c) 1982, 20102013, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g12c Enterprise Edition Release 1112.21.0.21.0 - 64bit Production
With the Partitioning, OLAP, DataAdvanced MiningAnalytics and Real Application Testing options
SQL> 

...


CDB$ROOT@ORCL>

b. Connect to the PDB.

No Format
CDB$ROOT@ORCL> ALTER SESSION SET container = pdb1;

c. Unlock and alter the OE schema. Run the following SQL.

No Format
ALTER USER oe IDENTIFIED BY oe; 
ALTER USER oe ACCOUNT UNLOCK;
GRANT ALTER SESSION,      
CONNECT,     
CREATE MATERIALIZED VIEW,     
CREATE VIEW,     
QUERY REWRITE,     
RESOURCE TO oe;     
GRANT EXECUTE ON DBMS_LOCK TO oe;     
ALTER USER OE QUOTA UNLIMITED ON USERS;
 

cd. Logout of the database.

...

3. Setup the correct TNS alias. Edit /homeu01/oracle/app/oracle/product/1112.21.0/dbhome_21/network/admin/tnsnames.ora

No Format
vi /home/oracleu01/app/oracle/product/1112.21.0/dbhome_21/network/admin/tnsnames.ora

Add the following to the end of the file:

No Format
TTORCL_SRC =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = source-int)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orclpdb1)
    )
  )
TTORCL_TRG =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = target-int)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orclpdb1)
    )
  )
Note

Test if the TNS alias is working:

No Format
$ tnsping ttorcl_src
TNS Ping Utility for Linux: Version 11.2.0.2.0 - Production on 11-JAN-2014 13:39:13
Copyright (c) 1997, 2010, Oracle.  All rights reserved.
Used parameter files:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = source-int)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = orcl))) 
OK (0 msec)

4. Bring the database in archivelog mode. This is a requirement for Dbvisit Replicate.

No Format
sqlplus / as sysdba
SQL> alter system set log_archive_start=TRUE scope=spfile;

System altered.

a. Shut the database down.

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

b. Bring the database into mount mode and change the archivelog setting and then open the database.

...

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

No Format
[oracle@source ~]$ unset TWO_TASK

b. Shutdown the database.

No Format
sqlplus / as sysdba
CDB$ROOT@ORCL> shutdown immediate;

c. Start up the database in no mount mode.

No Format
CDB$ROOT@ORCL> startup mount;
ORACLE instance started.
Total System Global Area  456146944413372416 bytes
Fixed Size		    13448402289016 bytes
Variable Size		  348129976322962056 bytes
Database Buffers	  100663296 79691776 bytes
Redo Buffers		    60088328429568 bytes
Database mounted.

d. Turn on archivelog mode.

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

SQL>.

e. Open the database.

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

cf. Ensure Check the database is in archivelog mode.

No Format
SQL>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     613104
Next log sequence to archive   615106
Current log sequence	       615106

cg. Logout of the database.

...

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

a. Logon as root.

No Format
su - 

...