home *** CD-ROM | disk | FTP | other *** search
-
- :
- #
- # $Header: plsql.in.pp,v 6.29 90/04/01 21:12:58 pgreenwa Exp $ plsql.in.pp
- #
- #
- # plsql.install
- #
- # This is the installation script to install PL/SQL on a
- # UNIX ORACLE system.
- #
- # It can be invoked by the master installation script, oracle.install,
- # or as a stand alone procedure.
- #
- # The master script, oracle.install, sets ORACLE_HOME and
- # ORACLE_SID before it runs this script.
- # If the script is run stand-alone, then these variables must be set and
- # exported before it is run.
- #
- # Default answers are shown in square brackets.
- #
-
- NETLIBNAME="nsl_s"
- PHYS_BLK_SIZE=2048
- VNDR_NETLIBS="-lnsl_s "
- CHOWN=/bin/chown
- MAKE=make
- ORACLE_LPPROG="/usr/bin/lp"
- ORACLE_PAGER="/usr/bin/more"
- ORACLE_LPSTAT="/usr/bin/lpstat"
-
- #
- # Initialize variables used in installation script.
- #
- PRODUCT=PLSQL
- product=plsql
- MKTG_NAME=PL/SQL
- SILENT=-s
-
- AR=ar
-
- # ARDELETE - Delete entry from archive
-
- ARDELETE="$AR d"
-
- # AREXTRACT - extract entry from archive
-
- AREXTRACT="$AR x"
-
- #
- # Setup the environment variables for the installation script.
- #
- . $ORACLE_HOME/install/setup.ins
-
- #FILE_LIST=`cat $ORACLE_HOME/${product}/install/${PRODUCT}.DIST`
-
- #
- # rdbms/lib/libpls.a that is shipped, contains a dummy routine.
- # This library will be replaced by the the real libpls.a, if plsql
- # is installed, and the dummy library will be moved to libdumpls.a
- #
-
- rm -f $ORACLE_HOME/rdbms/lib/libpls.a >> $LOG 2>&1
- ln $ORACLE_HOME/${product}/lib/libpls.a $ORACLE_HOME/rdbms/lib/libpls.a \
- >> $LOG 2>&1
-
- #
- #
- # libora.a contains a dummy plsql routine that will be deleted from the
- # library when plsql is installed.
- #
- $AREXTRACT $ORACLE_HOME/rdbms/lib/libora.a plsdum.o 2>> $LOG
- chmod u+w $ORACLE_HOME/rdbms/lib/libora.a 2>> $LOG
- $ARDELETE $ORACLE_HOME/rdbms/lib/libora.a plsdum.o 2>> $LOG
-
- #
- # If rdbms is not being installed, relink and install oracle.
- #
- if [ "$RDBMS_INSTALL" != "T" ] ; then
- echo ""
- echo "Relinking the Oracle executable to incorporate $MKTG_NAME..."| tee -a $LOG
- echo ""
- cd $ORACLE_HOME/rdbms/lib
- $MAKE -f oracle.mk oracle >> $LOG 2>&1
- if [ $? = 0 ] ; then
- # make sure the database is down before replacing oracle.
- if [ -f $ORACLE_HOME/dbs/sgadef${ORACLE_SID}.dbf ] ; then
- echo ""
- echo "Database currently running."
- echo $N "Okay to shutdown the database? $C "
- DEFLT="N"; . $INSTALL_HOME/read.sh; ANS=$RDVAR
- case $ANS in
- y|Y) echo ""
- echo "Shutting down the database..." | tee -a $LOG
- echo ""
- sqldba command=shutdown >> $LOG
- echo ""
- echo "Installing new Oracle executable in $ORACLE_HOME/bin...
- " | tee -a $LOG
- mv -f $ORACLE_HOME/bin/oracle $ORACLE_HOME/bin/oracle.OLD
- mv oracle $ORACLE_HOME/bin/oracle
- chmod 4751 $ORACLE_HOME/bin/oracle
- echo ""
- echo "Bringing the database up..." | tee -a $LOG
- echo ""
- sqldba command=startup >> $LOG
- ;;
- n|N) echo "
- In order to complete $MKTG_NAME installation, you will need to:
- 1- Shutdown the database.
- 2- mv $ORACLE_HOME/rdbms/lib/oracle $ORACLE_HOME/bin/oracle
- 3- chmod 4751 $ORACLE_HOME/bin/oracle
- 4- Startup the database.
- " | tee -a $LOG ;;
- esac
- else
- mv -f $ORACLE_HOME/bin/oracle $ORACLE_HOME/bin/oracle.OLD
- mv oracle $ORACLE_HOME/bin/oracle
- chmod 4751 $ORACLE_HOME/bin/oracle
- echo ""
- echo "New Oracle executable installed in $ORACLE_HOME/bin.
- " |tee -a $LOG
- fi
- case $SUPER_USER in
- TRUE) $CHOWN $ORACLE_OWNER $ORACLE_HOME/bin/oracle ;;
- esac
- else
- echo "
- Relinking Error.
- The executable for $MKTG_NAME was not made successfully.
- Please check the log file, and repeat the installation
- procedure for $MKTG_NAME.
- " | tee -a $LOG
- fi
- fi
-
- #
- # Perform steps required to install demo for this product.
- #
- #echo ""
- #echo "Loading $MKTG_NAME PLSQA/SUPERSECRET Demo DataBase..." | tee -a $LOG
- #echo ""
- #
- #sqlplus $SILENT $SYSTEM_PASS <<! >> $LOG 2>&1
- #grant connect,resource to plsqa identified by supersecret;
- #connect plsqa/supersecret
- # start ?/plsql/demo/buildtab
- # start ?/plsql/demo/enterdat
- #!
-
- echo "
- TO LOAD AND RUN PL/SQL DEMOS:
- Please read the README file in $ORACLE_HOME/plsql/demo
- for a detailed description on how to load and run the PL/SQL
- demos. The RDBMS must be installed and a database has to be
- up before you can load and run the demos." | tee -a $LOG
- echo ""
-
- if [ -d $ORACLE_HOME/c/demo ] ; then
- rm -f $ORACLE_HOME/c/demo/examp6.pc
- rm -f $ORACLE_HOME/c/demo/examp7.pc
- rm -f $ORACLE_HOME/c/demo/sample5.pc
- rm -f $ORACLE_HOME/c/demo/bank_demo.pc
- ln $ORACLE_HOME/plsql/demo/examp6.pc $ORACLE_HOME/c/demo/examp6.pc
- ln $ORACLE_HOME/plsql/demo/examp7.pc $ORACLE_HOME/c/demo/examp7.pc
- ln $ORACLE_HOME/plsql/demo/sample5.pc $ORACLE_HOME/c/demo/sample5.pc
- ln $ORACLE_HOME/plsql/demo/bank_demo.pc $ORACLE_HOME/c/demo/bank_demo.pc
- fi
-
- #
- # Use "touch" to time stamp hidden file, for future verification of
- # product installation.
- touch "$ORACLE_HOME/$product/install/.$product" 2> /dev/null
-
- #
- # Hook for verification scripts -- this must happen last
- #
- case $ORACLE_VERIFY in
- T) if [ -f $ORACLE_HOME/$product/install/${product}.verify ] ; then
- ORACLE_INSTALL=T ; export ORACLE_INSTALL
- if [ "$RDBMS_INSTALL" != "T" ] ; then
- chmod 755 $ORACLE_HOME/$product/install/${product}.verify
- $ORACLE_HOME/$product/install/${product}.verify
- fi
- fi ;;
- esac
-
- #
- # Do any cleanup and exit this script.
- #
- echo ""
- case $UPDATE in
- Y) echo "$MKTG_NAME update completed." | tee -a $LOG ;;
- *) echo "$MKTG_NAME installation completed." | tee -a $LOG ;;
- esac
- echo ""
- sync;sync;sync
- exit 0
-
-