IceWalkers.com - Linux Software downloads and news
Name : Password :
Linux SoftwareLinux RPMLinux HowtosLink UsAboutAdvertise

Oracle 9i under RedHat Linux 8.x and 9.x - Simple Installation HOWTO

Search Howtos :Match :
Next Previous Contents

5. Post-installation

The Oracle Installation Guide describes a very long list of procedures to be done after the installation process. Some of them are necessary, some of them probably in your instance you will never need, but most importantly this document will not repeat them.

Please refer to the Installation Guide for this procedures. Here I will describe steps that are very helpful for the minimal installation that I used, and seem enough for the basic database operations.

5.1 Editing the oratab file

There is one step in particular that is important, so that you may start and shutdown the database from the command prompt any time, or to allow the database to be autostarted during boot. Go to the /etc directory and edit the file oratab. In the line:

ORTD:/u01/app/oracle/product/9.2.0.1.0:N

set the last value to Y and it should read:

ORTD:/u01/app/oracle/product/9.2.0.1.0:Y

Now save the file and go back to your Oracle home directory.

5.2 Script for automatic startup on boot

It is generally a good idea to automate the database startup at boot time on your database server. In this case you will need a script, which can be included in the run-level sets. Here is an example only. Please, tune it to your own machine and run-levels!



#!/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/9.2.0.1.0"
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"
        ;;
    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

You can simply copy and paste this file into your system and change it according to your settings.

Once you copy and edit the file, move it to the /etc/rc.d/init.d directory and change it's ownership and the attributes to be the same as the other files in the directory.

To do that and the following operations, you will need to be logged as root user.

The fifth line of this code reads:

# chkconfig: 345 91 19

It is used by the chkconfig command when setting the scripts in the run-levels. The value 345 lists the run-levels in which we allow Oracle to run, so if you want to be able to run an Oracle instances only in levels 3 and 5, then change this value to 35. The next value (91) describes the order number in the startup sequence. This means that if there are 100 startup processes, the Oracle startup will be the 91st to run. The next number is the shutdown number, meaning that when the system is shutdown and there are for example 100 processes to be shutdown, the Oracle process will be 19 in order. These numbers are used to set the relative position of the Oracle startup and shutdown processes. They are set here as an example. You can change them, but keep in mind that Oracle instancse can not be run without some processes in the system running beforehand.

Now execute the following command:

chkconfig -add oracle

This will add the corresponding links in the run-level directories as listed in the beginning of the script.

To test the newly created automation, you have to reboot your system, but remember that before this automation runs, the kernel parameters should be set. In fact you may include the kernel tune commands in your start) section of the above script.

5.3 Testing your installation with SQL*Plus

If you have installed a typical database, there should be a user created called scott. The password is tiger. Just execute the following:

sqlplus scott/tiger

which should run the SQL*Plus interpreter and log in as user scott. You should see the screen like the following:



SQL*Plus: Release 9.2.0.1.0 - Production on Fri Feb 21 10:55:45 2003

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Connected to:
Oracle9i Release 9.2.0.1.0 - Production
JServer Release 9.2.0.1.0 - Production

SQL>quit
Disconnected from Oracle9i Release 9.2.0.1.0 - Production
JServer Release 9.2.0.1.0 - Production

Before exiting you can do some SQL on your own to just see the tables in this database schema or whatever you have in mind.

>From this point on it is a matter of your own creativity and purpose.


Next Previous Contents
Search Howtos :Match :
Xine 1.1.6
Free video player
Glade 3.5.5
User interface builder for GTK+ and Gnome
Evolution 2.25.4
GNOME mailer, calendar, contact manager and communications tool
GEdit 2.25.4
Small but powerful text editor
Mutt 1.5.19
Small but very powerful text-based mail client.
Galculator 1.3.2
GTK 2 based scientific calculator
BlueFish 1.3.1
GTK HTML editor
Samba 3.3.0rc2
Provides file and print services to SMB/CIFS clients
WebGUI 7.5.38
A fully featured content management system.
Brasero 0.9.0
Application to burn CD/DVD
Free IT Magazines, White Papers, eBooks, and more !
Dr. Dobb's Journal

Dr. Dobb's Journal enables programmers to write the most efficient and sophisticated programs and help in daily programming quandaries.

The 7 Things that IT Security Professionals MUST KNOW!

Gain key insight into security problem and find the safest means to protect your technological assets.

Database Trends and Applications

Provides timely coverage of the technology, intelligence and insight needed to plan, implement and manage information-rich projects.

Linux Software Map
Find Linux RPM
Best Rated Linux Software
Most Rated Linux Software
Linux Distributions
Linux Howtos
Quick Survey

Please take our survey and help us improve our website to serve you better.

Thank you.
Linux Software
Linux / IT Resources
Site Resources
Google
Privacy Policy
Contact Us
Submit Software
Advertising info