Versions Compared

Key

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

1. Logon as the oracle user.

No Format
su - oracle

 

2. Setup the OE schema in the database.

a. Logon to the database as sysdba.

No Format
sqlplus / as sysdba
SQL*Plus: Release 11.2.0.2.0 Production on Fri Dec 20 18:00:32 2013
Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> 

b. 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;

c. Logout of the database.

No Format
SQL> exit

...

3. Setup the correct TNS alias. Edit /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/tnsnames.ora

...

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.

No Format
SQL> startup mount
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.
Total System Global Area  456146944 bytes
Fixed Size		    1344840 bytes
Variable Size		  348129976 bytes
Database Buffers	  100663296 bytes
Redo Buffers		    6008832 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.

SQL> alter database open;
Database altered.

c. Ensure the database is in archivelog mode.

No Format
SQL> archive log list
Database log mode	       Archive Mode
Automatic archival	       Enabled
Archive destination	       USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     613
Next log sequence to archive   615
Current log sequence	       615

c. Logout of the database.

No Format
SQL> exit

 

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 - 

 change directory to /usr/local/bin

...

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

No Format
[root@source bin]# chmod 750 del_arch.sh 

...