oracledba.help
SpecialTopics

Oracle 18c XE

Overview

Oracle's eXpress Edition database is free to develop, test and deploy. Below is the essential information to get it up and running. Change as required for your environment.

Prerequisites

  • You are running Oracle Linux 7.x.
  • You have downloaded Oracle 18c XE rpm.
  • Flash rpm installed to run Browser GUI tools.

For other OS instructions see Oracle's documentation.

11g XE

Rpm Install

 su -
 yum -y localinstall /media/sf_sw/Oracle/18cXE/oracle-database-xe-18c-1.0-1.x86_64.rpm
 Process runs...

 shutdown -r now
  • The above makes all the required OS changes and creates an oracle Linux user.
  • Check log: /var/log/oracle-database-xe-18c/results/oraInstall.log

Database Install and Creation

 su -
 /etc/init.d/oracle-xe-18c configure

 Configuring Oracle Listener.
 Listener configuration succeeded.

 Configuring Oracle Database XE.
 Enter SYS user password: **
 Enter SYSTEM user password: *****
 Enter PDBADMIN User Password: ***
 Prepare for db operation

 Process runs...
 Copying database files
 Creating and starting Oracle instance
 Completing Database Creation
 Creating Pluggable Databases
 Executing Post Configuration Actions
 Running Custom Scripts
 100% complete

 Database creation complete. For details check the logfiles at:
    /opt/oracle/cfgtoollogs/dbca/XE.

 Database Information:
   Global Database Name: XE
   System Identifier(SID): XE
   Look at the log file "/opt/oracle/cfgtoollogs/dbca/XE/XE.log" for further details.

 Connect to Oracle Database using one of the connect strings:
    Pluggable database: lnx01/XEPDB1
    Multitenant container database: lnx01

 Use https://localhost:5500/em to access Oracle Enterprise Manager for Oracle Database XE

Configure oracle Linux User

Init /home/oracle

 su - 
 adduser temp
 cp -r /home/temp /home/oracle
 chown -R oracle:oinstall /home/oracle
 userdel -r temp

 passwd oracle

Init Shell

  1. su - oracle
  2. vi .bashrc
# Global Definitions
if [ -f /etc/bashrc ]; then
   . /etc/bashrc
fi

if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
   if [ $SHELL = "/bin/ksh" ]; then
      ulimit -p 16384
      ulimit -n 65536
   else
      ulimit -u 16384 -n 65536
   fi
   umask 022
fi

# Environment Vars
ORACLE_SID=XE; export ORACLE_SID
ORACLE_BASE=/opt/oracle; export ORACLE_BASE
ORACLE_HOME=/opt/oracle/product/18c/dbhomeXE; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM

PATH=$ORACLE_HOME/bin:/usr/bin:/bin:/usr/local/bin:.local/bin:$HOME/bin
export PATH
export TEMP=/tmp
export TMPDIR=/tmp

# Aliases - Common
alias cl='crontab -l'
alias l9='ls -alt | head -9' 
alias l20='ls -alt | head -20'
alias l50='ls -alt | head -50'
alias tf='date;ls -l|wc -l'

alias cdnet='cd /opt/oracle/product/18c/dbhomeXE/network/admin;pwd;'

Test Local Connection

Run: sqlplus sys/PW@XE as sysdba/XE

SQL*Plus: Release 18.0.0.0.0 - Production on Thu Nov 15 14:16:20 2018
Version 18.4.0.0.0

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

Connected to:
Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
Version 18.4.0.0.0

SQL>

From SQLPlus you can run any commands. Example: SELECT * FROM v$instance;

Essential Files and Locations

 File Name and Location           Purpose
 /opt/oracle                       Oracle Base. 
                                   This is the root of the Oracle Database XE directory tree.
 /opt/oracle/product/18c/dbhomeXE  Oracle Home. 
                                   This home is where the Oracle Database XE is installed.
                                   It contains the directories of the Oracle Database XE
                                   executables and network files.
 /opt/oracle/oradata/XE            Database files.
 /opt/oracle/diag                  Diagnostic logs. The database alert log is 
                                   /opt/oracle/diag/rdbms/xe/XE/trace/alert_XE.log
 /opt/oracle/cfgtoollogs/dbca/XE   Database creation logs. The XE.log file contains the 
                                   results of the database creation script execution.
 /etc/sysconfig/oracle-xe-18c.conf Configuration default parameters.
 /etc/init.d/oracle-xe—18c         Configuration and services script.

 listener.ora & tnsnames.ora       /opt/oracle/product/18c/dbhomeXE/network/admin

APPENDIX

/var/log/oracle-database-xe-18c/results/oraInstall.log

[INFO] Starting the installation process of the Oracle Database...
11/15/2018-01:11:08 PM
[INFO] Registering Oracle home to the Oracle inventory...
[INFO] Oracle home registered to the Oracle inventory.
[INFO] Executing post installation scripts...
[INFO] Setting up inventory as it has not been setup on this machine.
[INFO] Configuring ADR directories...
[INFO] ADR directories configured.
[INFO] Post installation scripts executed successfully.
[INFO] Oracle home installed successfully and ready to be configured.

APPENDIX

Oracle XE 18.4 Win64 - Cheat Sheet

Tested on Windows 2012 R2

Installation

 1. Run setup.exe.
 2. Welcome: [Next]
 3. License Agreement: (x) I accept... [Next]
 4. Destination Folder
    Set as c:\app\oracle\product\18.0\ [Next]
 5. Specify the database password (SYS, SYSTEM,PDBADMIN): ******** [Next]
 6. Summary
    Confirm looks OK then press [Install]
    Note:
    Oracle Base (ORACLE_BASE) will be: c:\app\oracle\product\18.0\   
    Oracle Home (ORACLE_HOME) will be: c:\app\oracle\product\18.0\dbhomeXE\ 
    Process runs...

 7. Oracle Database Installed Sucessfully
    [Finish]

    Note (requires Flash to be installed): 
    EM Express URL: https://localhost:5500/em