0% found this document useful (0 votes)
13 views

Lab 3 Oracle-Database-Windows-Installation

The document provides instructions for installing Oracle Database on Windows and Linux operating systems. It covers downloading required software, performing the installation, and verifying the installation is successful. It also discusses additional setup steps for SQL Developer and Python connectors.

Uploaded by

ninh nguyen an
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Lab 3 Oracle-Database-Windows-Installation

The document provides instructions for installing Oracle Database on Windows and Linux operating systems. It covers downloading required software, performing the installation, and verifying the installation is successful. It also discusses additional setup steps for SQL Developer and Python connectors.

Uploaded by

ninh nguyen an
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Oracle Database Basics

Installation, Initial Setup and Administration

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:

 Microsoft Windows Server 2008 – Standard, Enterprise,


Datacenter, Web, and Foundation Editions. The Server Core option
is not supported.
 Microsoft Windows 7 – Professional, Enterprise, and Ultimate
Editions
 Windows 8 – Pro and Enterprise Editions

One of the following 64-bit Microsoft Windows x64 operating systems:


Operating  Windows Server 2008 x64 – Standard, Enterprise, Datacenter,
system Web, and Foundation Editions
 Windows Server 2008 R2 x64 – Standard, Enterprise, Datacenter,
Web, and Foundation Editions.
 Windows Server 2012 x64 – Standard, Datacenter, Essentials, and
Foundation Editions
 Windows Server 2012 R2 x64 – Standard, Datacenter, Essentials,
and Foundation Editions
 Windows 7 x64 – Professional, Enterprise, and Ultimate Editions.
 Windows 8 – Pro and Enterprise Editions
 Windows 8.1 – Pro and Enterprise Editions

Disk space 1.5 GB free space minimum, 30 GB or larger recommended


256 MB minimum
Recommendation:
+ 4-8 GB for lab
RAM
+ 16-32 GB for small-sized database
+ 64 GB for medium-sized database
+ 128 GB or more for enterprise-size database
+ For Linux operation systems:
One of the following:

 Oracle Enterprise Linux 4 Update 7


Operating  Oracle Enterprise Linux 5 Update 2
system  Red Hat Enterprise Linux 4 Update 7
 Red Hat Enterprise Linux 5 Update 2
 SUSE Linux Enterprise Server 10 SP2
 SUSE Linux Enterprise Server 11
Disk space 1.5 GB free space minimum, 30 GB or larger recommended
256 MB minimum
Recommendation:
+ 4-8 GB for lab
RAM
+ 16-32 GB for small-sized database
+ 64 GB for medium-sized database
+ 128 GB or more for enterprise-size database
 glibc should be greater than or equal to 2.3.4-2.41
 make should be greater than or equal to 3.80
Packages  binutils should be greater than or equal to 2.16.91.0.5
 gcc should be greater than or equal to 4.1.2
 libaio should be greater than or equal to 0.3.104
Minimum swap space required for Oracle Database XE is 2 GB or twice
Swap space
the size of RAM, whichever is lesser.

Notes: We will use Windows and CentOS 8 operating system for this lab

2. Installing on Windows operating systems:


Step 1: Getting required softwares
- Download installer for Windows at:
https://www.oracle.com/database/technologies/xe-prior-releases.html
- Choose corresponding version for the OS:

- 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 you are prompted for a port number, then specify one.


- The following port numbers are the default values:

 1521: Oracle database listener


 2030: Oracle Services for Microsoft Transaction Server
 8080: HTTP port for the Oracle Database XE graphical user interface

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

- In the InstallShield Wizard Complete window, click Finish.


Step 3: Verifying installation
+ On your Windows OS, open the command prompt (“cmd.exe”) and run this command:
“tnsping 127.0.0.1 1”
 If the command return OK then the installation was successful and Oracle
Database XE is running.

 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.

3. Installing on Linux operating systems:

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

+ A windows that requires connection information will pop-up


+ Use the SYS account with the password that you created in the Oracle Database
installation. Change the role from “default” to “SYSDBA”. Click “Test” to verify
the connection, if everything is correct, the status will change from blank to
“Success”. After that, click “Connect”, the program will prompt you to enter the
SYS password again, do that and you are connected to the database of SYS
account.
Step 3: Creating users and table for lab
+ After connection, you will see the SQL Worksheet window as below, this is where you
type in and execute your queries

You might also like