In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
File name checktrandata.sh
Path $HOME/ggscript/ggtrandata
The function of this script is to verify the additional log status of the tables configured in the EXTRACT process through the infotrandata instruction included in ogg, only for synchronizing the OGG of the oracle database.
In order to prevent a large number of queries from affecting database performance, if there is too much information about the configuration table in the process. The query speed will be slow, so it is recommended to automatically run in the early hours of the morning by scheduling tasks.
#! / bin/bashcd $HOME/ggscript/ggoperatdir=$PWDcd $HOMEif [- f. Profile]; then. Profilefiif [- f. Bash _ profile]; then. .bash _ profilefiecho "This sciprt is write by RenYi" mydate= `date + 20% ymuri% mmurd% H`hn = `echo $HSTNAME`usr = `echo $USER`echo $hn-$usrecho "HOSTNAME:" $hn "
"> $HOME/ggscript/ggtablecheck/$hn-$usr.tbcheckecho" user: "$usr"
"> > $HOME/ggscript/ggtablecheck/$hn-$usr.tbcheckecho" date: "$mydate"
"> > $HOME/ggscript/ggtablecheck/$hn-$usr.tbcheckecho" > > $HOME/ggscript/ggtablecheck/$hn-$usr.tbcheckecho "" > > $HOME/ggscript/ggtablecheck/$hn-$usr.tbcheckecho "TABLE" > > $HOME/ggscript/ggtablecheck/$hn-$usr.tbcheckecho "PROBLEM" > > $HOME/ggscript/ggtablecheck/$hn-$usr.tbcheckecho "> > $HOME/ggscript/ggtablecheck/$hn-$usr.tbcheckcd $HOME/ggserver (echo info all) Echo exit) |. / ggsci | grep EXTRACT | awk 'BEGIN {FS= "+"} {print $3}' | grep ^ E > $HOME/ggscript/ggtablecheck/tmpi=1NUX= `sed-n'$='$HOME/ggscript/ggtablecheck/ tmp` # echo $NUXcd $PWDwhile ["$I"-le "$NUX"] do cat / dev/null > $HOME/ggscript/ggtablecheck/checktmp VAR= `sed-n $ifolp' $HOME/ggscript/ggtablecheck/ tmp`echo $VAR val= `echo $VAR.prm | tr "[: upper:]" [lower: :] "`cat $HOME/ggserver/dirprm/$val | awk'/ TABLE#/ / # TABLE/ {if (I > 1) print x Xerox 0 HOME/ggscript/ggtablecheck/temp +}'> $HOME/ggscript/ggtablecheck/temp awk-F'-'($1) {print $1}'$HOME/ggscript/ggtablecheck/temp > $HOME/ggscript/ggtablecheck/temp2 rm-rf $HOME/ggscript/ggtablecheck/temp sed-e'/ ^ $/ d'$HOME/ggscript/ggtablecheck/temp2 > $HOME/ggscript/ggtablecheck/temp3 rm-rf $HOME/ggscript/ggtablecheck/temp2 awk-F' '{print $1}' $HOME/ggscript/ggtablecheck/temp3 > $HOME/ggscript/ggtablecheck/temp4 rm-rf $HOME/ggscript/ggtablecheck/temp3 awk-F' '{print $1}' $HOME/ggscript/ggtablecheck/temp4 > $HOME/ggscript/ggtablecheck/temp5 rm-rf $HOME/ggscript/ggtablecheck/temp4 cat $HOME/ggscript/ggtablecheck/temp5 | awk-F 'TABLE' {print $2}'> $HOME/ggscript/ggtablecheck/Temp rm-rf $HOME/ggscript/ggtablecheck/temp5 sed'/ ^ $/ d' $HOME/ggscript/ggtablecheck/Temp > $HOME/ggscript/ggtablecheck/temp rm-rf $HOME/ggscript/ggtablecheck/Temp More 1 NUM= `sed-n'$='$HOME/ggscript/ggtablecheck/ temp` echo $NUM while ["$a"-le "$NUM"] do table= `sed-n $astatp' $HOME/ggscript/ggtablecheck/ temp` echo dblogin `more $HOME/ggserver/dirprm/$val | grep USERID` > $HOME/ggserver/dirdat/checktrandata echo "info trandata $table" > > $HOME/ggserver/dirdat/checktrandata (echo OBEY dirdat/checktrandata Echo exit) |. / ggsci > > $HOME/ggscript/ggtablecheck/checktmp sleep 1a = `expr $a + 1`expr $HOME/ggscript/ggtablecheck/checktmp | grep table > $HOME/ggscript/ggtablecheck/checkresult1 sed'/ supplementally/d' $HOME/ggscript/ggtablecheck/checkresult1 > $HOME/ggscript/ggtablecheck/resulttmp cat $HOME/ggscript/ggtablecheck/resulttmp > $HOME/ggscript/ggtablecheck/checkresult HOME/ggscript/ggtablecheck/resulttmp 1 NUN= `sed-n'$='$HOME/ggscript/ Ggtablecheck/ checkresult`cat / dev/null > $HOME/ggscript/ggtablecheck/table cat / dev/null > $HOME/ggscript/ggtablecheck/event while ["$c"-le "$NUN"] do tmp= `sed-n $ccheckp' $HOME/ggscript/ggtablecheck/ checkresult`tab= `sed-n $ccheckp' $HOME/ggscript/ggtablecheck/ temp` if ["`checkr $tmp | grep erro`"] Then echo "" > > $HOME/ggscript/ggtablecheck/$hn-$usr.tbcheck echo "$tab" > > $HOME/ggscript/ggtablecheck/$hn-$usr.tbcheck echo "$tmp" > > $HOME/ggscript/ggtablecheck/$hn-$usr.tbcheck echo "> > $HOME/ggscript/ggtablecheck/$hn-$usr.tbcheck fi If ["`echo $tmp | grep roomled`"] Then echo "" > > $HOME/ggscript/ggtablecheck/$hn-$usr.tbcheck echo "$tab" > > $HOME/ggscript/ggtablecheck/$hn-$usr.tbcheck echo "$tmp" > > $HOME/ggscript/ggtablecheck/$hn-$usr.tbcheck echo "> > $HOME/ggscript/ggtablecheck/$hn-$usr.tbcheck fi C = `expr $c + 1` done I = `expr $I + 1`expr echo "" > $HOME/ggscript/ggtablecheck/$hn-$usr.tbcheck/bin/bash $HOME/ggscript/ggupload/upload.sh chk149 $HOME/ggscript/ggtablecheck/$hn-$usr.tbcheck sysinfo
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.