In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
File name: fullrestart.sh
Path $HOME/ggscript/ggoperat
This script is specially written to deal with the frequent delay of a very troublesome business database server, OGG.
Because this database invokes a large number of job and concurrent operations every night, it causes frequent delays in the OGG data extraction process
The long transaction must be forcibly killed in order to recover normally.
Otherwise, the delay will be delayed until the archive is automatically backed up. Until the process is interrupted abnormally.
Tuning with the business communication database, and contacting the original oracle factory for many times, after no solution, we have to adjust the script at this mandatory time point at 5: 00 a.m. every day to automatically run the scheduled tasks to ensure the normal operation of the overall line.
I hope you don't have this kind of headache.
This script is violent. Please use it with caution. 100% recovery is not guaranteed
#! / bin/bashif [$#-eq 0]; then echo "INFO EXTRACT" exit 2ficd # HOMEif [- f. Profile]; then. Profilefiif [- f. Bash _ profile]; then. .bash _ profilefibackuptime= `date +% Y% m% dmurf% H% M% S`val = $1vale = `echo $val | tr alyz A-Z`if [`echo $val | grep ^ E`]; then IType=EXTRACTelif [`echo $val | grep ^ P`]; then IType=POSTelif [`echo $val | grep ^ R`]; then IType=REPLICAT else echo "only can operate the EXTRACT REPLICAT and the POST process" exit 2fipro= `echo $val.PRM | tr Amurz-z`cd $HOME/ggserver/dirprmif [!-e $pro] Then echo "the PROCESS is not exist" exit 2fi#cd $HOME/ggscript/ggoperatcd $HOME/ggserver (echo KILL $val;echo exit) |. / ggscicd $HOME/ggserver (echo INFO $val) Echo exit) |. / ggsci | grep Thread > $HOME/ggscript/ggoperat/threadcd $HOME/ggscript/ggoperatcat thread | awk'{print $1}'> $HOME/ggscript/ggoperat/tmp1cat thread | awk'{print $2}'> $HOME/ggscript/ggoperat/tmp2paste-d' 'tmp1 tmp2 > tmpjoin tmp1 tmp2rm-f tmp1rm-f tmp2rm-f threadsort-n tmp > temprm-f tmptime= `sed-n 1p temp`rm-f tempcd $HOME/ggserverecho "alter $val begin $time" > dirdat/altertimeecho "start $val" > dirdat/altertime (echo OBEY dirdat/altertime;echo exit) |. / ggsci
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.