Hello All,
Can you help review this with a fresh set of eyes.
Not sure where the error is, but the output error is:
E_PIN
ESS_USER
ESS_USER_SER_ROLE
./spx_repair_sfgi_2.sh[37]: syntax error at line 55 : `<<' unmatched
Below is the code in full:
Can you help review this with a fresh set of eyes.
Not sure where the error is, but the output error is:
E_PIN
ESS_USER
ESS_USER_SER_ROLE
./spx_repair_sfgi_2.sh[37]: syntax error at line 55 : `<<' unmatched
Below is the code in full:
Code:
#!/bin/ksh
dbname=sfgi
export ORACLE_SID=$dbname
export ORACLE_HOME=/orahome/app/oracle/product/10.2.05/dbq413
. /usr/sislocal/$dbname/to$dbname
#log into database
sqlplus -s splex_2/password << EOF
set pagesize 0
set linesize 4000
set feedback off
set trimspool on
spool rowcount.txt;
select source_name from splex_2.count_match_vw;
spool off;
EOF
mailx -s "The following tables have rowcount mismatch in Shareplex SFGI<->CTXI Environments" email@email.com<< END
`cat rowcount.txt`
END
# Create the file extensions and files to be used:
basename=spsfgi
now=`date '+%y-%m-%d_%H-%M-%S'`
repair_dir=/orahome/app/oracle/home
repairfile=$repair_dir/$basename.$now.sh
logfile=$repair_dir/$basename.$now.log
resultfile=$repair_dir/$basename.$now.out
#remove /" from table names.
#`sed 's/"//g'rowcount.txt>tblname.tx`
#loop through tblname.txt
for tblname in `cat /orahome/app/oracle/home/rowcount.txt`
do
#set shareplex environment
`/orahome/app/SharePlex/10g/prod/. ./spenv_2_sfgi.sh`
#export SP_SYS_PRODDIR=/orahome/app/SharePlex/10g/prod
#export SP_SYS_VARDIR=/orahome/app/SharePlex/10g/var2150_sfgi
#export SP_COP_UPORT=2150
#export SP_COP_TPORT=2150
#export SP_SYS_HOST_NAME=seq
export IW_HOME=$SP_SYS_PRODDIR/util
#log into Shareplex Console
#`cd $SP_SYS_PRODDIR/bin`
`/orahome/app/SharePlex/10g/prod/bin/./sp_ctrl`
repair $tblname
exit
mailx -s "Table following table is now repairing in Shareplex SFGI<->CTXI Environment" email@email.com<< END
`cat $tblname`
END