Lab 3 Oracle-Database-Windows-Installation
Lab 3 Oracle-Database-Windows-Installation
Lab overview:
The lab consists of 4 parts:
1. Installation
2. Additional Setups
3. Basic Administration
4. PL/SQL and Python extensions
Contents
Part 1: Installation ......................................................................................................................................... 2
1. System requirement (for Oracle Database Express Edition 11gR2): .................................................. 2
2. Installing on Windows operating systems:Step 1: Getting required softwares .................................. 3
Step 2: Installation ..................................................................................................................................... 4
Step 3: Verifying installation ..................................................................................................................... 7
3. Installing on Linux operating systems: ............................................................................................... 8
For full installation instructions on Linux system, please refer to our document“Oracle Database
Linux Installlation.docx” from Part 1: “Downloading ........................................................................... 8
Part 2: Additional Setups............................................................................................................................... 9
1. SQL Developer.................................................................................................................................... 9
For Linux operating systems, please refer to our document “Oracle Database LinuxInstalllation.docx”
at Part 4: “Installing SQL Developer for graphical UI to interact with Oracle Database” .................... 9
2. Python and Python Oracle connector ................................................................................................ 11
Part 3: Basic Administration ....................................................................................................................... 13
1. Creating users and tables for lab ......................................................................................................... 13
Part 1: Installation
1. System requirement (for Oracle Database Express Edition 11gR2):
+ For Windows 32/64-bit operation systems:
One of the following 32-bit Microsoft Windows operating systems:
Notes: We will use Windows and CentOS 8 operating system for this lab
- In this lab we will use the 11gR2 Express Edition for Windows x64
Step 2: Installation
- After downloading, unzip the download and run “DISK1/setup.exe”
- In the Oracle Database 11g Express Edition - Install Wizard welcome window,
click Next.
- In the License Agreement window, select “I accept the terms in the license
agreement” and then click Next.
- In the Choose Destination Location window, either accept the default or click
Browse to select a different installation directory. (Do not select a directory that
has spaces in its name.) Then click Next.
- If these port numbers are not currently used, then the installation uses them
automatically without prompting you. If they are in use, then you will be prompted
to enter an available port number.
- In the Specify Database Passwords window, enter and confirm the password to use
for the SYS and SYSTEM database accounts. Then click Next.
- In the Summary window, review the installation settings, and if you are satisfied,
click Install. Otherwise, click Back and modify the settings as necessary.
If the command return connection error (in this case is the “TNS-12541: TNS: no
listener” error), check the following:
o Go into the Oracle Database XE directory:
“C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN”
o Open the file “tnsnames.ora” and “listener.ora” in Notepad, check the hostname
and port parameter to make sure if the HOST and PORT is correct with your
installation.
o Another reason that might cause the problem is you forgot to start the database
service, if that is the case, go to Start -> All Programs -> Oracle Database
Express Edition 11g -> Select “Start Database” and verify the connection again.
For full installation instructions on Linux system, please refer to our document
“Oracle Database Linux Installlation.docx” from Part 1: “Downloading
CentOS Stream 8” to Part 3: “Installing Oracle Database Express Edition
11gR2”
Part 2: Additional Setups
1. SQL Developer
- We will use SQL Developer to interact with Oracle Database
- Download SQL Developer at https://www.oracle.com/tools/downloads/sqldev-v192-
downloads.html
- Select the corresponding package according to your operating system. If your computer
already has JDK 8 then use the package “Windows 32-bit/64-bit”, if not, use the “Windows 64-
bit with JDK 8 included” package instead. Then click on “Download” to get the package.
For Linux operating systems, please refer to our document “Oracle Database Linux
Installlation.docx” at Part 4: “Installing SQL Developer for graphical UI to
interact with Oracle Database”
- Check the box “I reviewed and accept the Oracle License Agreement” and click download.
Note: The page will redirect you to the login page of Oracle. You must have an Oracle account
to download anything from the website, so create one.
- After downloading, unzip the package, it will contain a “sqldeveloper” folder with the
program “sqldeveloper.exe”
● As you can see, the package “Windows 32-bit/64-bit” does not have the “jdk” folder
while the “Windows 64-bit with JDK 8 included” package has it.
2. Python and Python Oracle connector
- Install Python and Python Oracle Database connector to utilize Python scripts for
interacting with the database. Python 3.6 or newer is required.
- Download and install Python 3.6 at https://www.python.org/downloads/release/python-
360/
- After installing Python 3.6, open the command prompt on your Windows OS and run
the command:
“pip3 install cx_Oracle” or
“python -m pip install colorama cx_Oracle” for both Windows and Linux OS
- (Optional) Install PyCharm IDE for easier code editing and executing. Download and install
PyCharm Community Edition version 2017.3.7 at
https://www.jetbrains.com/pycharm/download/other.html
Part 3: Basic Administration
1. Creating users and tables for lab
Step 1: Open SQL Developer, you will see the Welcome Page
Step 2: Create new connection by right-click at Oracle Connections -> New Connection