You are on page 1of 34

Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Installing Oracle 11g on UNIX

Pre-installation requirements and configurations

Hardware Requirements

x At least 1 GB of RAM
x If RAM between 1GB -2GB swap space should be 1.5 times the size of RAM.
If RAM between 2GB – 16GB swap space should be equal to the size of RAM
If RAM more than 16GB swap space should be 16GB.
x The size of the shared memory should be at least the greater of
MEMORY_MAX_TARGET and MEMORY_TARGET for each Oracle instance on the
computer.
x Processor Type x86 or x86_x64
x At least 1 GB of disk space in the /tmp directory
x Enterprise Edition (x86) - 3.95GB Hard Disk Space for Software Files

Standard Edition (x86) - 3.88GB Hard Disk Space for Software Files

Enterprise Edition (x86) - 1.7GB Hard Disk Space for Data Files

Standard Edition (x86) - 1.5GB Hard Disk Space for Data Files

Enterprise Edition (x86_x64) - 4.35GB Hard Disk Space for Software Files

Standard Edition (x86_x64) - 3.73GB Hard Disk Space for Software Files

Enterprise Edition (x86_x64) - 1.68GB Hard Disk Space for Data Files

Standard Edition (x86_x64) - 1.48GB Hard Disk Space for Data Files

x The minimum display requirement- resolution of 1024 x 768 or higher


Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

x Recommended Hardware Requirement for SQL Developer

CPU Type and Speed Pentium IV 2 GHz or faster


Java SDK JDK 5.0 Update 6 or later for Linux
Memory 1 GB RAM
Display 65536 colors, set to at least 1024 X 768 resolution

Software Requirements

Operating System requirement

x Asianux 2.0
x Asianux 3.0
x Oracle Enterprise Linux 4.0 Update 7 or later
x Oracle Enterprise Linux 5.0
x Red Hat Enterprise Linux 4.0 Update 7 or later
x Red Hat Enterprise Linux 5.0
x SUSE Linux Enterprise Server 10.0
x SUSE Linux Enterprise Server 11.0

Kernel Requirement

x On Asianux 2.0, Oracle Enterprise Linux 4.0, and Red Hat Enterprise Linux 4.0:

2.6.9 Or later

x On Asianux 3.0, Oracle Enterprise Linux 5.0, and Red Hat Enterprise Linux 5.0:

2.6.18 or later

x On SUSE Linux Enterprise Server 10:

2.6.16.21 or later

x On SUSE Linux Enterprise Server 11:

2.6.27.19 or later
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Package Requirements

On Linux x86:

Operating System Requirement


Asianux 2.0, Oracle Enterprise Linux 4.0, and Red The following packages (or later versions)
Hat Enterprise Linux 4.0 must be installed:
binutils-2.15.92.0.2
compat-libstdc++-33.2.3
elfutils-libelf-0.97
elfutils-libelf-devel-0.97
gcc-3.4.6
gcc-c++-3.4.6
glibc-2.3.4-2.41
glibc-common-2.3.4
glibc-devel-2.3.4
glibc-headers-2.3.4
libaio-devel-0.3.105
libaio-0.3.105
libgcc-3.4.6
libstdc++-3.4.6
libstdc++-devel-3.4.6
make-3.80
pdksh-5.2.14
sysstat-5.0.5
unixODBC-2.2.11
unixODBC-devel-2.2.11
Asianux 3.0, Oracle Enterprise Linux 5.0, and Red The following packages (or later versions)
Hat Enterprise Linux 5.0 must be installed:
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
elfutils-libelf-devel-static-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-common-2.5
glibc-devel-2.5
glibc-headers-2.5
kernel-headers-2.6.18
ksh-20060214
libaio-0.3.106
libaio-devel-0.3.106
libgcc-4.1.2
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Operating System Requirement


libgomp-4.1.2
libstdc++-4.1.2
libstdc++-devel-4.1.2
make-3.81
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-devel-2.2.11
SUSE Linux Enterprise Server 10 The following packages (or later versions)
must be installed:
binutils-2.16.91.0.5
compat-libstdc++-5.0.7
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-devel-2.4
ksh-93r-12.9
libaio-0.3.104
libaio-devel-0.3.104
libelf-0.8.5
libgcc-4.1.2
libstdc++-4.1.2
libstdc++-devel-4.1.2
make-3.80
sysstat-8.0.4
SUSE Linux Enterprise Server 11 The following packages (or later versions)
must be installed:
binutils-2.19
gcc-4.3
gcc-c++-4.3
glibc-2.9
glibc-devel-2.9
ksh-93t
libstdc++33-3.3.3
libstdc++43-4.3.3_20081022
libstdc++43-devel-4.3.3_20081022
libaio-0.3.104
libaio-devel-0.3.104
libgcc43-4.3.3_20081022
libstdc++-devel-4.3
make-3.81
sysstat-8.1.5
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

On Linux x86-64:

Operating System Requirement


Asianux 2.0, Oracle Enterprise Linux 4.0, and Red The following packages (or later versions)
Hat Enterprise Linux 4.0 must be installed:
binutils-2.15.92.0.2
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
elfutils-libelf-0.97
elfutils-libelf-devel-0.97
expat-1.95.7
gcc-3.4.6
gcc-c++-3.4.6
glibc-2.3.4-2.41
glibc-2.3.4-2.41 (32 bit)
glibc-common-2.3.4
glibc-devel-2.3.4
glibc-headers-2.3.4
libaio-0.3.105
libaio-0.3.105 (32 bit)
libaio-devel-0.3.105
libaio-devel-0.3.105 (32 bit)
libgcc-3.4.6
libgcc-3.4.6 (32-bit)
libstdc++-3.4.6
libstdc++-3.4.6 (32 bit)
libstdc++-devel 3.4.6
make-3.80
pdksh-5.2.14
sysstat-5.0.5
unixODBC-2.2.11
unixODBC-2.2.11 (32 bit)
unixODBC-devel-2.2.11
unixODBC-devel-2.2.11 (32 bit)
Asianux 3.0, Oracle Enterprise Linux 5.0, and Red The following packages (or later versions)
Hat Enterprise Linux 5.0 must be installed:
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-2.5-24 (32 bit)
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Operating System Requirement


glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5 (32 bit)
glibc-headers-2.5
ksh-20060214
libaio-0.3.106
libaio-0.3.106 (32 bit)
libaio-devel-0.3.106
libaio-devel-0.3.106 (32 bit)
libgcc-4.1.2
libgcc-4.1.2 (32 bit)
libstdc++-4.1.2
libstdc++-4.1.2 (32 bit)
libstdc++-devel 4.1.2
make-3.81
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-2.2.11 (32 bit)
unixODBC-devel-2.2.11
unixODBC-devel-2.2.11 (32 bit)
SUSE Linux Enterprise Server 10 The following packages (or later versions)
must be installed:
binutils-2.16.91.0.5
compat-libstdc++-5.0.7
gcc-4.1.0
gcc-c++-4.1.2
glibc-2.5-24
glibc-devel-2.4
glibc-devel-32bit-2.4
ksh-93r-12.9
libaio-0.3.104
libaio-32bit-0.3.104
libaio-devel-0.3.104
libaio-devel-32bit-0.3.104
libelf-0.8.5
libgcc-4.1.2
libstdc++-4.1.2
libstdc++-devel-4.1.2
make-3.80
sysstat-8.0.4
SUSE Linux Enterprise Server 11 The following packages (or later versions)
must be installed:
binutils-2.19
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Operating System Requirement


gcc-4.3
gcc-32bit-4.3
gcc-c++-4.3
glibc-2.9
glibc-32bit-2.9
glibc-devel-2.9
glibc-devel-32bit-2.9
ksh-93t
libaio-0.3.104
libaio-32bit-0.3.104
libaio-devel-0.3.104
libaio-devel-32bit-0.3.104
libstdc++33-3.3.3
libstdc++33-32bit-3.3.3
libstdc++43-4.3.3_20081022
libstdc++43-32bit-4.3.3_20081022
libstdc++43-devel-4.3.3_20081022
libstdc++43-devel-32bit-4.3.3_20081022
libgcc43-4.3.3_20081022
libstdc++-devel-4.3
make-3.81
sysstat-8.1.5

Compiler Requirements

Intel C++ Compiler 10.1 or later and the version of GNU C and C++ compilers listed
under "Package Requirements" are supported with Pro*C/C++, Oracle Call Interface, Oracle
C++ Call Interface, and Additional Software Requirements

Depending on the components you want to use, you must ensure that the following software are
installed:

x Oracle ODBC Drivers


x Oracle JDBC/OCI Drivers
x Oracle Messaging Gateway
x Browser Requirements
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Browser Requirements

Web browsers must support Java Script, and the HTML 4.0 and CSS 1.0 standards. The
following browsers meet these requirements for Oracle Enterprise Manager Database Control:

x Netscape Navigator 8.1


x Netscape Navigator 9.0
x Microsoft Internet Explorer 6.0 SP2
x Microsoft Internet Explorer 7.0
x Microsoft Internet Explorer 7.0 SP1
x Microsoft Internet Explorer 8.0
x Firefox 2.0
x Firefox 3.0.7
x Safari 3.0.4
x Safari 3.1
x Safari 3.2

Preinstallation Requirement for Oracle Database Vault

If you want to install Oracle Database Vault, then set the DB_BLOCK_SIZE initialization
parameter to 4096 or larger. If the value is less than 4096, then you cannot change it. The only
way to change the DB_BLOCK_SIZE value is by recreating the database.

Configuration

To determine the RAM size, enter the following command:

# grep MemTotal /proc/meminfo

To determine the size of the configured swap space, enter the following command:

# grep SwapTotal /proc/meminfo


Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

To determine whether the system architecture can run the software, enter the following
command:

# uname -m

To determine the amount of disk space available in the /tmp directory, enter the following
command:

# df -h /tmp

To determine the amount of free disk space on the system, enter the following command:

# df -h

To To determine whether the required kernel is installed, enter the following command:

# uname –r

To determine the free disk space on each mounted file system use the following command:

# df –h
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

To increase swap size enter following command:

# dd if=/dev/zero of=/extraswap bs=1M count=512

To make swap file and turn on enter following commands:

#mkswap /extraswap

#swapon /extraswap

Oracles recommend the following parameter settings in /etc/sysctl.conf file.

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

The current values can be tested executing following shell script as a root user.

#!/bin/bash
/sbin/sysctl -a | grep fs.aio-max-nr
/sbin/sysctl -a | grep fs.file-max
/sbin/sysctl -a | grep kernel.shmall
/sbin/sysctl -a | grep kernel.shmmax
/sbin/sysctl -a | grep kernel.shmmni
/sbin/sysctl -a | grep kernel.sem
/sbin/sysctl -a | grep net.ipv4.ip_local_port_range
/sbin/sysctl -a | grep net.core.rmem_default
/sbin/sysctl -a | grep net.core.rmem_max
/sbin/sysctl -a | grep net.core.wmem_default
/sbin/sysctl -a | grep net.core.rmem_max

It will display kernel parameters as follows:

Add or amend the following lines in the "/etc/sysctl.conf" file.

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Run the following command to change the current kernel parameters:

/sbin/sysctl -p

Add the following lines to the /etc/security/limits.conf file:

oracle soft nproc 2047


oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Add the following line to the /etc/pam.d/login file, if it does not already exist:

session required pam_limits.so


Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Start the Firewall administration dialog (System > Administration > Firewall). Click the
"Disable" button followed by the apply button on the toolbar, and then close the dialog.

Disable secure linux by editing the /etc/selinux/config file, making sure the SELINUX flag is set
as follows:

SELINUX=disabled
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Setup Packages

Install required packagers mentions in packager requirements using YUM command or RPM .if
you using yum following commands install the particular libraries.

Ex: yum install <package name>

I used following shell script to install all the packages at once.

#!/bin/bash

yum install compat-libstdc++-33


yum install compat-libstdc++-33.i686
yum install elfutils-libelf
yum install elfutils-libelf-devel
yum install gcc
yum install gcc-c++
yum install glibc
yum install glibc.i686
yum install glibc-common
yum install glibc-devel
yum install glibc-devel.i686
yum install glibc-headers
yum install ksh
yum install libaio
yum install libaio.i686
yum install libaio-devel
yum install libaio-devel.i686
yum install libgcc
yum install libgcc.i686
yum install libstdc++
yum install libstdc++.i686
yum install libstdc++-devel
yum install make
yum install numactl-devel
yum install sysstat
yum install unixODBC
yum install unixODBC.i686
yum install unixODBC-devel
yum install unixODBC-devel.i686
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Create the new groups and users:

groupadd oinstall
groupadd dba
groupadd oper
groupadd asmadmin

useradd -g oinstall -G dba,oper,asmadmin oracle


passwd oracle

Create the directories in which the Oracle software will be installed:

mkdir -p /u01/app/oracle/product/11.2.0/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01

Login as root and issue the following command:

xhost +<machine-name>
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

if you install oracle on fedora newest versions The release information in /etc/redhat-release is
incorrect as far as the Oracle installer is concerned. It knows nothing about Fedora but does
know about Red Hat. Therefore the release string needs to be modified as follows:

# cp /etc/redhat-release /etc/redhat-release.org
# echo "redhat release 5" > /etc/redhat-release

Login as the oracle user and add the following lines at the end of the .bash_profile file:

# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=fedora13.localdomain; export ORACLE_HOSTNAME


ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=DB11G; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH


CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export
CLASSPATH

if [ $USER = "oracle" ]; then


if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Log into the oracle user. If you are using X emulation then set the DISPLAY environmental
variable:

DISPLAY=<machine-name>:0.0; export DISPLAY

Start the Oracle Universal Installer (OUI) by issuing the following command in the database
directory:

./runInstaller
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Then following screen will appear:

Enter Your Email address to be informed of security issues, install the product and initiate
configuration manager. Then click next.

After few seconds following screen will appear. Select appropriate install option. Then click
next.
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Next window ask for appropriate system class. Select it and click next:

After few seconds following dialog box will appear. Select type of the database installation you
want to perform. Then click next:
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Then you should see the following Typical Install Configuration screen:

Enter Administrator password and click next. Then following dialog box will appear. If this is
your first installation leave default values. Otherwise specify directory for installation files.
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Next OUI checks that the installed software development and runtime packages are correct:

Some Fedora versions will fail all these checks. Just tick the check box Ignore All on the top
right hand to ignore these errors. So long as you have the latest version of each of these packages
installed, all will be fine. you do not need to install pdksh if you have ksh installed. Then click
next.

Then installation wizard displays summary of the installation you are going to do. Best practice
save it to file for later use.
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Then click next to start installation process.

During the installation, OUI will popup a dialog window advising you that an error has occurred
with ins_emagent.mk. See below:

This error is due to a change to GCC linker which first


occurred in Fedora 13. The fix is to edit
$ORACLE_HOME/sysman/lib/ins_emagent.mk, search
for the line
$(MK_EMAGENT_NMECTL) and replace the line with
$(MK_EMAGENT_NMECTL) -lnnz11 as
Shown below.
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

After saving the changed file, select the Retry option and the install should successfully continue.
Eventually you should see the Database Configuration Assistant screen followed shortly by a
Password Management screen as shown below:

Do not ignore the Password Management button; press it and change the passwords for SYS and
SYSTEM.

After this you will be asked to run two shell scripts as root.
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Just open up a root terminal window and execute these shell scripts. One script installs three
scripts, coraenv, oraenv and dbhome in /usr/local/bin (or another user-specified directory) and
the other creates /etc/oratab.

At this stage the installer has finished installing the Oracle database and you can press the Finish
Button. The Oracle database does not need to be started; it is already up and running.

After finishing your installation restart your computer. After reboot your
Computer you have to execute some commands.

STEP 01: Edit the /etc/oratab file

This file setting the restart flag for each instance to Y:


Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

STEP 02: Edit the /etc/redhat-release file

This file used to restore the original release information.

To confirm the
Installation was successful, try doing the following:

$ id
uid=502(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),503(oper),504(asmadmin)
$ cd $ORACLE_HOME
$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 06-AUG-2010 20:47:56

Copyright (c) 1991, 2009, Oracle. All rights reserved.

Starting /app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production


System parameter file is /app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /app/oracle/diag/tnslsnr/ultra/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ultra.localhost.com)(PORT=1521)))
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 06-AUG-2010 20:47:58
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /app/oracle/diag/tnslsnr/fedora13/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ultra. localhost.com)(PORT=1521)))
The listener supports no services
The command completed successfully
$

$ emctl start dbconsole


Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.

https://ultra.localhost.com:1158/em/console/aboutApplication

Starting Oracle Enterprise Manager 11g Database Control ...... started.


------------------------------------------------------------------
Logs are generated in directory /app/oracle/product/11.2.0/dbhome_1/ultra.
localhost.com_orcl/sysman/log
$

$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri Aug 6 20:50:12 2010

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 839282688 bytes


Fixed Size 2217992 bytes
Variable Size 524290040 bytes
Database Buffers 306184192 bytes
Redo Buffers 6590464 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
$
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

By entering URL you can go to your database management console web page.

To display above window Database instance, listener and agent connection to instance
should be up. It above mentions conditions are true, it will display above window. You must
enter user name and password to login to database console. It one of that above mention
requirement are missing, it will display fallowing window. For login for management console
you must fulfill those requirements.
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

If you successfully authenticate, it will display fallowing window

Start and stop the Oracle sever using Script


To shutdown our oracle database server, we develop small bash shell script. By
Executing this shell script we can stop and start our oracle server without entering any
Commands.

#!/bin/bash
#
#Run-level Startup script for the Oracle Instance and
Listener
#
# chkconfig: 345 91 19
# description: Startup/Shutdown Oracle listener and
instance
ORA_HOME="/u01/app/oracle/product/11.2.0/db_1"
ORA_OWNR="oracle"
# if the executables do not exist -- display error
if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]
then
echo "Oracle startup: cannot start"
exit 1
fi
# depending on parameter -- startup, shutdown, restart
# of the instance and listener or usage display
case "$1" in
start)
# Oracle listener and instance startup
echo -n "Starting Oracle: "
su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl start"
su - $ORA_OWNR -c $ORA_HOME/bin/dbstart
touch /var/lock/subsys/oracle
echo "OK"
;;
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide
stop)
# Oracle listener and instance shutdown
echo -n "Shutdown Oracle: "
su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl stop"
su - $ORA_OWNR -c $ORA_HOME/bin/dbshut
rm -f /var/lock/subsys/oracle
echo "OK"
;;
reload|restart)
$0 stop
$0 start
*)
echo "Usage: $0 start|stop|restart|reload"
exit 1
esac
exit 0

We create a file call oracle inside the /etc/init.d and paste above script into this file and save.
Then you have to access permission for this file. For that we execute Chmod 777 oracle
Command as a root user.

After saving this file execute Chconfig oracle command to updating the run level
Information.
You can directly execute fallowing command to stop and run oracle
Service oracle stop
Service oracle start
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Start and Shutdown Oracle DB using GUI


For that you have to log into dbConsole by entering username and password. For that
type your dbConsole Application URL in your web browser.

Shutdown the server


After successfully logon to your oracle server, you can shut down your server by clicking
On the shutdown button.

Then it prompts to enter the username and password for host and db credentials.

Then it will ask “Are you sure you want to perform this action?” say yes,
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

Start the db server

You can simply start your stopped db server by clicking on the Startup button. Then it
Will prompt to enter the username and password for host and db credentials.

Then it will ask “Are you sure you want to perform this action?” say yes.
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

After successfully start the database browser window as follow…

Client-Server Configuration

In the Oracle client/server architecture, the database application and the database are
Separated into two parts: a front-end or client portion, and a back-end or server portion. The
Client executes the database application that accesses database information and interacts with
a user through the keyboard, screen, and pointing device such as a mouse. The server executes
the Oracle software and handles the functions required for concurrent, shared data access to an
Oracle database.
Although the client application and Oracle can be executed on the same computer, it
May be more efficient and effective when the client portion(s) and server portion are executed
By different computers connected via a network.

Normal listener
Oracle 11g (Unix)/SQL 2008 (XP) Installation guide

At the each and every time we start our PC, we have to execute our listener again and
Again. For that you can use fallowing command to start the listener

$ lsnrctl start

Shared Server Listener

Only thing we need to configure is set the SERVER value as “shared”. Then this db
Server becomes shared server.

Dedicated Server Listener

If we set server value as “dedicated”, that server become dedicated server.

You might also like