Welcome to the Oracle Tutorial website!
If you are looking for learning Oracle Database from scratch, you are at the right place.
On this website, you can learn Oracle Database fast and easily.
This Oracle tutorial was designed for the absolute beginners who have never worked with any relational database system especially the Oracle Database before.
In case you are already familiar with Oracle, you can find a lot of useful information on the new Oracle features and advanced techniques.
Getting Started with Oracle Database
In this section, you will learn about the Oracle Database and how to install Oracle Database Server. In addition, you will learn how to create a sample database and how to connect to it for practicing.
Oracle Basics
The Oracle basics section teaches you about how to use SQL to interact with the Oracle database. You will learn various techniques to query data from the database and how to manage database tables such as creating, modifying, and deleting tables.
- Steps to Install Oracle Database 12c Release 2 in Redhat Linux 7.5 April 25, 2018 May 3, 2018 - by Siva - Leave a Comment In this Guide we will see on How to Install the Oracle Database 12c Release 2 in Redhat Enterprise Linux 7.5 Server.
- Starting with Oracle Database 12c Release 1 (12.1), Oracle Database on Microsoft Windows supports the use of an Oracle Home User, specified at the time of installation. This Oracle Home User is used to run the Windows services for a Oracle Home, and is similar to the Oracle User on Oracle Database on Linux.
- Oracle Database 12c Release 1 (12.1) Installation On Oracle Linux 6. This article describes the installation of Oracle Database 12c Release 1 (12.1) (64-bit) on Oracle Linux 6 (64-bit). The article is based on a server installation with a minimum of 2G swap, with SELinux set to permissive and the firewall disabled.
The installer asks you to provide your email address to get the latest security issues and updates. The purpose of this bulletin is to describe how to clone an existing Oracle12c Release 1 (12.1.0.x) RDBMS installation using Oracle Universal Installer (OUI). Scope This bulletin is intended for anyone who is responsible for installing Oracle software onto a server or cloning an existing Oracle software installation.
Oracle View
This section covers Oracle View which is a virtual table whose data is the result of a stored query. The virtual table means that a view only behaves like a table but does not actually contain any data.
Oracle Index
Oracle index is one of the most effective tools for tuning query performance. However, in order to use it effectively, you must understand it correctly.
PL/SQL Tutorial
This PL/SQL Tutorial section teaches you how to use PL/SQL programming language to develop modular and procedural programs in Oracle Database.
Oracle Aggregate Functions
This tutorial helps you understand how the Oracle aggregate functions work and show you how to use them to calculate aggregates.
Oracle Analytic Functions
Oracle analytic functions calculate an aggregate value based on a group of rows and return multiple rows for each group.
Oracle Date Functions
This section provides you with the most commonly used Oracle date and time functions that help you effectively handle datetime data.
Oracle String Functions
This section provides you with Oracle string functions that allow you to manipulate character strings more efficiently.
Oracle Database Administration
This section covers practical Oracle Database Administration tasks that help you get started with administering the Oracle Database quickly and effectively.
In this Guide we will see on How to Install the Oracle Database 12c Release 2 in Redhat Enterprise Linux 7.5 Server.
To Download the Oracle Database Installer, Visit the below URL:
Options Oracle Software
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
Prerequiste for Installation:
- Download the Oracle Database 12c installer package.
- The Swap Space size should be 16GB .
- Enable X11 Forwarding to “yes” in sshd configuration file.
- Properly set the hostname.
- Set the Kernel Parameters.
- Set the ulimit values.
- Install the required rpm packages.
1] OS Release
Install Procedural Option Oracle Sql
[root@quickfixlinux ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.5 (Maipo)
1.1] Set the Hostname :
(a) Under /etc/hosts:
192.168.xx.xx quickfixlinux.com
(b) Under /etc/hostname:
quickfixlinux.com
1.2] Set the SELINUX to “Permissive”
[root@quickfixlinux ~]#getenforce
Enforcing
[root@quickfixlinux ~]#setenforce 0
[root@quickfixlinux ~]# getenforce
Permissive
1.3] Install the required rpm packages:
[root@quickfixlinux ~]# yum install -y binutils compat-libstdc++-33 compat-libstdc++-33.i686 gcc gcc-c++ glibc glibc.i686 glibc-devel glibc-devel.i686 ksh libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel libstdc++-devel.i686 libaio libaio.i686 libaio-devel libaio-devel.i686 libXext libXext.i686 libXtst libXtst.i686 libX11 libX11.i686 libXau libXau.i686 libxcb libxcb.i686 libXi libXi.i686 make sysstat unixODBC unixODBC-devel zlib-devel
1.4] Set the limits for Oracle user in /etc/security/limits.conf file :
oracle soft nproc 131072
oracle hard nproc 131072
oracle soft nofile 131072
oracle hard nofile 131072
oracle soft core unlimited
oracle hard core unlimited
oracle soft memlock 50000000
oracle hard memlock 50000000
1.5] Set the Kernel Parameters:
[root@quickfixlinux ~]#/sbin/sysctl -w kernel.sem=”250 32000 100 128″
kernel.sem = 250 32000 100 128
[root@quickfixlinux ~]# /sbin/sysctl -w fs.aio-max-nr=1048576
fs.aio-max-nr = 1048576
[root@quickfixlinux ~]# /sbin/sysctl -w kernel.shmmax=4398046511104
kernel.shmmax = 4398046511104
[root@quickfixlinux ~]# /sbin/sysctl -w kernel.shmall=1073741824
kernel.shmall = 1073741824
[root@quickfixlinux ~]# /sbin/sysctl -w net.core.wmem_max=1048586
net.core.wmem_max = 1048586
[root@quickfixlinux ~]# /sbin/sysctl -w net.core.wmem_default=262144
net.core.wmem_default = 262144
[root@quickfixlinux ~]#/sbin/sysctl -w net.core.rmem_max=4194304
net.core.rmem_max = 4194304
[root@quickfixlinux ~]#/sbin/sysctl -w net.core.rmem_default=262144
net.core.rmem_default = 262144
[root@quickfixlinux ~]#/sbin/sysctl -w net.ipv4.ip_local_port_range=”9000 65500″
net.ipv4.ip_local_port_range = 9000 65500
[root@quickfixlinux ~]# /sbin/sysctl -w kernel.shmmni=4096
kernel.shmmni = 4096
[root@quickfixlinux ~]# /sbin/sysctl -w kernel.shmmax=8329226240
kernel.shmmax = 8329226240
[root@quickfixlinux ~]# sysctl -p
[root@quickfixlinux ~]#sysctl -a
1.6] Set the DISPLAY Environment:
Now, as a root user:
(a) Make sure you have “Tick” the Enable X11 forwarding in PUTTY.
(b) Launch the “Xming” application from your local machine.
(c) touch /root/.Xauthority
(d) uncomment the X11Forwarding and set to “yes” in /etc/ssh/sshd_config file.
(e) [root@quickfixlinux ~]# xauth list $DISPLAY
localhost.localdomain/unix:10 MIT-MAGIC-COOKIE-1 3a49e090537be8161b19526143ff2988
(f)[root@quickfixlinux ~]#echo $DISPLAY
[ IF the output shows nothing, set the display env first… ]
(e)[root@quickfixlinux ~]#export DISPLAY= localhost:10.0
[root@quickfixlinux ~]# echo $DISPLAY
localhost:10.0
Now, as a oracle user:
(a) [oracle@quickfixlinux ~]$ touch .Xauthority
(b) [oracle@quickfixlinux ~]$ xauth list $DISPLAY
(c) [oracle@quickfixlinux ~]$ echo $DISPLAY
[ Both the xauth list and DISPLAY shows NO output, Whereas, we need to add it now. ]
(d) [oracle@quickfixlinux ~]$ xauth add localhost.localdomain/unix:10 MIT-MAGIC-COOKIE-1 3a49e090537be8161b19526143ff2988
[Add the root MIT-MAGIC-COOKIE in oracle user ]
(e) [oracle@quickfixlinux ~]$export DISPLAY= localhost:10.0
Now, try to issue the command “xclock” and wait for it launch.
2] Create user and groups:
[root@quickfixlinux ~]# useradd oracle
[root@quickfixlinux ~]# password oracle
[root@quickfixlinux ~]#groupadd oinstall
[root@quickfixlinux ~]#usermod -G oinstall oracle
2.2] Create the folders:
[root@quickfixlinux ~]# mkdir /oracle
[root@quickfixlinux ~]# chown -R oracle:oinstall /oracle
[root@quickfixlinux ~]# chmod -R 775 /oracle
[root@quickfixlinux ~]# chmod g+s /oracle
If you didn’t set the above kernel parameters for ulimit values, you will be encountering errors while installation as below :
Lets get into the Oracle 12c database Installation now:
As a oracle user, get into the respective path to install :
[oracle@quickfixlinux ~]$cd /database/
[oracle@quickfixlinux database]$ ./runInstaller
Starting Oracle Universal Installer…
Checking Temp space: must be greater than 500 MB. Actual 393933 MB Passed
Checking swap space: must be greater than 150 MB. Actual 51199 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-04-25_11-03-07PM. Please wait …
[oracle@quickfixlinux database]$
[STEP-1]
[STEP-2]
[STEP-3]
[STEP-4]
[STEP-5] There are two ways to do the installation, (1) Typical Install or (2) Advanced Install.. Here, first we will look into (1) & then (2)
[STEP-6]
NOTE: password here can’t contain any special characters:
[STEP-7]
[STEP-8]
[STEP -5 – Advanced] Now, we will look on the Advanced Install options:
[STEP -6 – Advanced]
[STEP -7 – Advanced]
[STEP -8 – Advanced]
[STEP -9 – Advanced]
[STEP -10 – Advanced]
[STEP -11 – Advanced]
[STEP -12 – Advanced]
[STEP -13 – Advanced]
[STEP -14 – Advanced]
[STEP -15 – Advanced]
[STEP -16 – Advanced]
[STEP -17 – Advanced]
[STEP -18 – Advanced]
[STEP -19 – Advanced]
[STEP -20 – Advanced]
As a root user: Now, Change the /etc/oratab entry from “N” to “Y”
orcl:/oracle/app/oracle/product/12.2.0/dbhome_1:Y
As a Oracle user: Now, add the below Entries in .bash_profile file :
export ORACLE_HOSTNAME=quickfixlinux
export ORACLE_UNQNAME=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
export ORACLE_SID=orcl
[oracle@quickfixlinux ~]$ source .bash_profile
[oracle@quickfixlinux ~]$ ./sqlplus
SQL*Plus: Release 12.2.0.1.0 Production on Thu Apr 26 01:46:19 2018
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Enter user-name: SYS AS SYSDBA
Enter password: <password given while installation>
Connected to an idle instance.
To start the oracle LISTENER:
[oracle@quickfixlinux ~]$ lsnrctl status
LSNRCTL for Linux: Version 12.2.0.1.0 – Production on 03-MAY-2018 02:27:22
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.21.1)(PORT=1521)))
STATUS of the LISTENER
———————--
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 – Production
Start Date 28-APR-2018 01:27:22
Uptime 5 days 0 hr. 59 min. 59 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /oracle/app/oracle/diag/tnslsnr/test123/listener/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.21.1)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROCORCL)))
The listener supports no services
The command completed successfully
STATUS of the LISTENER
———————--
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 – Production
Start Date 28-APR-2018 01:27:22
Uptime 5 days 0 hr. 59 min. 59 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /oracle/app/oracle/diag/tnslsnr/test123/listener/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.21.1)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROCORCL)))
The listener supports no services
The command completed successfully
Resolution:
Edit the listener.ora file and change the HOST from IP ADDRESS to server hostname …
[oracle@quickfixlinux ~]$ vim /oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora