#!/bin/sh
#

#
# Script to start the Oracle Database Server instance.
#

###########################################################################
#
# ORACLE_RELEASE
#
# Specifies the Oracle product release.
#
###########################################################################

ORACLE_RELEASE=8.1.6


###########################################################################
#
# ORACLE_SID
#
# Specifies the Oracle system identifier or "sid", which is the name of the
# Oracle Server instance.
#
###########################################################################

export ORACLE_SID=TESTDB


###########################################################################
#
# ORACLE_BASE
#
# Specifies the directory at the top of the Oracle software product and
# administrative file structure.
#
###########################################################################

export ORACLE_BASE=/u01/app/oracle


###########################################################################
#
# ORACLE_HOME
#
# Specifies the directory containing the software for a given release.
# The Oracle recommended value is $ORACLE_BASE/product/<release>
#
###########################################################################

export ORACLE_HOME=/u01/app/oracle/product/${ORACLE_RELEASE}

###########################################################################
#
# LD_LIBRARY_PATH
#
# Required when using ORacle products that use shared libraries.
#
###########################################################################

export LD_LIBRARY_PATH=/u01/app/oracle/product/${ORACLE_RELEASE}/lib


###########################################################################
#
# PATH
#
# Verify that the users search path includes $ORCLE_HOME/bin 
#
###########################################################################

export PATH=$PATH:/u01/app/oracle/product/${ORACLE_RELEASE}/bin

###########################################################################
#
# This does the actual work.
#
# The oracle server manager is used to start the Oracle Server instance
# based on the initSID.ora initialization parameters file specified.
# 
###########################################################################

/u01/app/oracle/product/${ORACLE_RELEASE}/bin/svrmgrl <<EOF
spool /home/oracle/startdb.log
connect internal;
startup pfile = /u01/app/oracle/admin/db1/pfile/initTESTDB.ora open;
spool off
EOF

exit 0

