Versions Compared

Key

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

1.  Logon Once the VM has been restarted, logon as the oracle user.

No Format
su - oracle - oracle
Note

It is now possible to connect externally with Putty or a terminal emulator to the VM (source) with the following command:

No Format
ssh -p10022 oracle@192.168.1.197

This uses port forwarding which was setup when Virtual Box was configured (02 - Set up NAT network in Virtual Box).

192.168.1.197 is the IP address of the host machine (laptop). Use ifconfig or ipconfig to identify what the local IP address is of your host machine.

2. Setup the OE schema in the database.

...

a. Stop the listener service.

No Format
lsnrctl stop
 
No Format
LSNRCTL for Linux: Version 12.1.0.1.0 - Production on
31-JUL-2014 23:49:54
Copyright (c) 1991, 2013, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
The command completed successfully

...

c. Start the listener again.

No Format
lsnrctl start

No Format
LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 31-JUL-2014 23:50:05
Copyright (c) 1991, 2013, Oracle.  All rights reserved.
Starting /u01/app/oracle/product/12.1.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 12.1.0.1.0 - Production
Log messages written to /u01/app/oracle/diag/tnslsnr/source/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=source-int)(PORT=1521)))
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.1.0 - Production
Start Date                31-JUL-2014 23:50:05
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u01/app/oracle/diag/tnslsnr/source/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=source-int)(PORT=1521)))
The listener supports no services
The command completed successfully

d. Check the listener services.services. It may take several minutes for the services to start and appear. 

No Format
lsnrctl service

No Format
LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 31-JUL-2014
23:50:18
Copyright (c) 1991, 2013, Oracle.  All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Services Summary...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
    Handler(s):
      "D000" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: source, pid: 3347>
         (ADDRESS=(PROTOCOL=tcp)(HOST=source-int)(PORT=55291))
Service "pdb1" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
The command completed successfully

...

No Format
tnsping ttorcl_src

No Format
TNS Ping Utility for Linux: Version 12.1.0.1.0 - Production
on 31-JUL-2014 23:56:35
Copyright (c) 1997, 2013, Oracle.  All rights reserved.
Used parameter files:
/u01/app/oracle/product/12.1.0/dbhome_1/network/admin/sqlnet.ora

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

...

No Format
sqlplus oe/oe@ttorcl_src

No Format
SQL*Plus: Release 12.1.0.1.0 Production on Thu Jul 31 23:57:41 20140 Production
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Last Successful login time: Thu Jul 31 2014 23:50:31 -04:00
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
PDB1@ORCL> exit

...

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
Note

Unsetting of TWO_TASK was already done in a previous step so it is not strictly needed.

b. Shutdown the database.

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

c. Start up the database in no mount mode.

No Format
startup mount;
No Format
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.

...

No Format
alter database archivelog;
No Format
Database altered.

e. Open the database.

No Format
alter database open;
No Format
Database altered.

f. Check the archivelog mode.

No Format
archive log list
No Format
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

...

6. 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. The password is oracle

No Format
su - 

b. Create an archive management script named del_arch.sh that will manage the archives.

...