Created
January 19, 2024 18:38
-
-
Save airstrike/1970aa5a02eac204d01411ff75592f31 to your computer and use it in GitHub Desktop.
sqlcl bash script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ksh | |
# Script to initialize necessary variables to run Oracle 12c - J.K. 01/10/16 | |
# | |
B=`/usr/bin/tput smso` | |
OB=`/usr/bin/tput rmso` | |
ORACLE_SID=NSU12 | |
ORACLE_HOME=/u01/app/oracle/product/19.0.0/client_1 | |
TWO_TASK=NSU12 | |
TNS_ADMIN=$ORACLE_HOME/network/admin | |
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH | |
PATH=$ORACLE_HOME/bin:$PATH | |
export ORACLE_SID ORACLE_HOME TWO_TASK LD_LIBRARY_PATH LD_LIBRARY_PATH_64 TNS_ADMIN PATH B OB | |
LOG=$ORACLE_HOME/network/log/oracle11g.log | |
if [ -f $LOG ]; then | |
echo "`/bin/id` `/bin/date +%D\" \"%T`" >> $LOG | |
fi | |
#/usr/bin/tput clear | |
echo "" | |
echo " +------------------------------------------------------------+" | |
echo " | Welcome to Nova Southeastern University |" | |
echo " | Office of Innovation and Information Technology |" | |
echo " | Oracle Database Server |" | |
echo " | Running Oracle Database Enterprise Edition |" | |
#echo " | Please login with syntax : ${B}username@oracle12c${OB} |" | |
echo " | Please contact kwong@nova.edu for account problems. |" | |
echo " +------------------------------------------------------------+" | |
echo "" | |
echo "Executing SQL*PLUS..." | |
echo "" | |
#exec $HOME/downloads/sqlcl/bin/sql $1 | |
exec $HOME/downloads/sqlcl/bin/sql $(whoami)/cisc6601 "$@" | |
echo "" | |
echo "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment