#!/bin/ksh # Author: Dick.Dunbar@Oracle.com # Ref: https://blogs.oracle.com/obieeTips/entry/obiee_10g_teradata_solaris_deployment _Version="obi_td.sh Solaris v0.1 2012-06-29" export LANG=C; export PATH="/bin:/usr/bin:/usr/ucb:/usr/ccs/bin:$PATH"; _s='\n----------' [ 'SunOS' == $(uname -s) ] || ( echo "$_s Designed for Solaris ( $_Version )"; exit 1) _HOST=$(uname -n); _MYID=$(whoami) _Sol="$(uname -v)$(uname -r)" docfile=$(date +${_HOST}_%Y%m%d-%H%M_td.out) [ -z "$obiCollect" ] || docfile=${obiCollect}/$docfile cmd() { echo "$_s $*" >> $docfile; $* 2>&1 |expand >> $docfile; } lib() { echo "$_s ldd $*" >> $docfile; ls -ld $* 2>&1 |expand >> $docfile; typeset -L20 _Lib ldd $* 2>&1 | expand | while read _lib _sep _Link ; do _Lib=$_lib [ -z "$_sep" ] && _Link=" $_lib" _Lib="" echo " $_Lib $_sep $_Link" ; done | sort +2 >> $docfile } nqs() { nqsP=$1; typeset -L20 _Lib cmd pargs -ae $nqsP echo "_s pldd $nqsP" >> $docfile pldd $nqsP 2>&1 | expand | while read _lib _sep _Link ; do _Lib=$_lib [ -z "$_sep" ] && _Link=" $_lib" _Lib="" echo " $_Lib $_sep $_Link" ; done | sort +2 >> $docfile } # Teradata 13.10 variables for obiee nqsserver, set by setup/user.sh TD_ICU_DATA=/opt/teradata/client/13.10/tdicu/lib64 TERA_HOME=/opt/teradata/client/ODBC_64 ## /opt/teradata/client/13.10/odbc_64 TERA_GSS=/opt/teradata/teragss/solaris-sparc/client ## /opt/teradata/teragss/solaris-sparc/13.10.00.12 COPLIB=$TERA_HOME/lib ODBCHOME=$TERA_HOME TD_LIB=$TERA_HOME/lib:$TERA_GSS/lib OBI_LIB=$SAROOTDIR/server/Bin64:$SAROOTDIR/odbc/lib64:$SAROOTDIR/web/bin64 ORC_LIB=$ORACLE_HOME/lib if [ -z "SAROOTDIR" ] then ODBCINI=$SAROOTDIR/setup/odbc.ini LD_LIBRARY_PATH=$TD_LIB else ODBCINI=$ODBCHOME/odbc.ini LD_LIBRARY_PATH=$TD_LIB:OBI_LIB:$ORC_LIB fi unset LD_LIBRARY_PATH_64 export LD_LIBRARY_PATH TD_ICU_DATA TERA_HOME COPLIB ODBCHOME ODBCINI echo "Teradata 13.10 install verification ($_Version on $_HOST by $_MYID `date` )" > $docfile ps -ef | grep nqsserver | grep -v grep >> $docfile echo "$_s pkginfo | egrep 'TeraGSS|tdicu|tdodbc'" >> $docfile pkginfo | egrep 'TeraGSS|tdicu|tdodbc' 2>&1 >> $docfile cmd pkginfo -x tdodbc1310 cmd pkginfo -x tdicu1310 cmd pkginfo -x TeraGSS cmd cat $TERA_GSS/version echo "\n\nTeradata libraries required by obiee nqsserver" >> $docfile echo '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' >> $docfile echo "$_s echo \$LD_LIBRARY_PATH" >> $docfile ; echo $LD_LIBRARY_PATH >> $docfile lib $TERA_HOME/lib/tdata.so ## ldd -r : nqsserver odbc driver echo "$_s ls -l $TERA_GSS/lib" >> $docfile ls -l $TERA_GSS/lib | grep '.so' >> $docfile lib $TERA_GSS/lib/libgssp2ldap.so lib $TERA_GSS/lib/libgssp2td1.so lib $TERA_GSS/lib/libgssp2td2.so lib $TERA_GSS/lib/libtdgss.so echo "$_s Teradata /usr/lib/sparcv9 symlinks." >> $docfile typeset -L38 _usrLib for L in ddicu24 icudatatd icui18ntd icuiotd iculetd iculxtd icuuctd odbc odbcinst tdparse tdsso; do ls -l /usr/lib/sparcv9/lib${L}.so* | while read _ _ _ _ _ d1 d2 d3 _usrLib _sep _Link ; do echo " $d1 $d2 $d3 $_usrLib $_sep $_Link" ; done >> $docfile done cmd set typeset -L nqsU nqsP=$(ps -ef | grep nqsserver | grep -v grep | head -1 | awk '{print $2}') nqsU=$(ps -ef | grep nqsserver | grep -v grep | head -1 | awk '{print $1}') if [ -z "$nqsP" ]; then echo "$_s nqsserver is not running -- unable to probe." >> $docfile elif [[ "$nqsU" = "$_MYID" ]]; then nqs $nqsP # cmd pargs -ae $nqsP # cmd pldd $nqsP else echo "$_s Must run as user $U to probe nqsserver" >> $docfile cmd ps -fp $nqsP fi echo "\n Please upload $docfile to Oracle Tech Support"