Blog

Paraccel - Script to run the various regular housekeeping jobs for a given database.

Posted by Irtaza Hassan on November 17, 2014 at 6:40 AM

The credit for this script goes to Graham Mossman

###

### housekeeping.bash

###

### Usage:

### ./housekeeping.bash <database>

###

### Description:

### Script to run the various regular housekeeping jobs for a given database.

###

source /home/paraccel/.bashrc # this is how $housekeeping_log_dir is set

today=`date +%Y-%m-%d`

database=$1

logfile=`echo ${housekeeping_log_dir}/housekeeping_${database}_${today}.log`

echo "Starting housekeeping for $database at `date`" > $logfile 2>&1

echo "starting analyze at `date`" >>$logfile 2>&1

echo "analyze"|psql $database >> $logfile 2>&1

echo "starting vacuum at `date`" >> $logfile 2>&1

echo "vacuum"|psql $database >> $logfile 2>&1

echo "starting vacuumcat at `date`" >> $logfile 2>&1

echo "vacuumcat"|psql $database >> $logfile 2>&1

echo "starting indexcat at `date`" >> $logfile 2>&1

echo "indexcat"|psql $database >> $logfile 2>&1

echo "Ending housekeeping for $database at `date`" >> $logfile 2>&1

 

 

 

Categories: Actian Matrix (Paraccel)

Post a Comment

Oops!

Oops, you forgot something.

Oops!

The words you entered did not match the given text. Please try again.

Already a member? Sign In

614 Comments

Reply Jamosdoozy
8:29 AM on June 18, 2021 
You said it superbly.
http://ns.barahla.net/redirect.php?url=https://cadmed-bb.com
https://www.showcase-music.com/counter.php?link=https://cadmed-bb
.com
https://www.anson.com.tw/h/?u=https://cadmed-bb.com
https://orienteering.ie/results/leagues/show_table.php?league=Lei
nster+League&date_from=01%2F17&date_to=01%2F18&best_of%5BBrown%5D
=6&best_of%5BBlue%5D=6&best_of%5BGreen%5D=6&best_of%5BLight+Green
%5D=6&best_of%5BRed%5D=6&best_of%5BOrange%5D=6&best_of%5BYellow%5
D=6&best_of%5BBrown+1%3A10000%5D=0&best_of%5BBlue+1%3A10000%5D=0&
exclude_action=1&return_link=https://cadmed-bb.com
http://www.hvac8.com/link.php?url=https://cadmed-bb.com

https://cointreaustables.webs.com/apps/guestbook/
Reply Jamosdoozy
9:36 PM on June 18, 2021 
Reply Jamosdoozy
5:58 AM on July 10, 2021 
You actually stated that adequately.
http://ugaref.org/__media__/js/netsoltrademark.php?d=bestessaysed
ucationusa.com/essay/43-help-for-attachment-letter-affordable.htm
l
http://yogista.com/__media__/js/netsoltrademark.php?d=topessaywri
tingbase.com/paper/12-custom-data-paper-affordable-writing.html
http://palcenet.com/__media__/js/netsoltrademark.php?d=bestessays
cloud.com/essay/506-professional-essay-writer-top-ranked-writing.
html
http://iprotectcompanies.pro/__media__/js/netsoltrademark.php?d=t
opessaywritinglist.com/essay/23-buy-essays-online-safely.html
http://jendro.com/__media__/js/netsoltrademark.php?d=essayhelp-us
a.com/essay/16-cheap-write-my-essay-excellent.html
http://epinol.com/__media__/js/netsoltrademark.php?d=essaypromast
er.com/thesis/597-dissert-research-proposal-best-writing.html
http://cdcfc.com/__media__/js/netsoltrademark.php?d=scoringessays
.com/course-work/885-course-work-questions-affordable-essay.html
https://nymandnymand66.webs.com/apps/blog/show/47959348-how-to-ge
t-tinder-plus-apk
Reply Jamosdoozy
8:27 PM on July 10, 2021 
You actually said this superbly!
http://ns.joyoushost.com/__media__/js/netsoltrademark.php?d=beste
ssayscloud.com/essay/413-customer-service-essays-top-ranked-writi
ng.html
http://7723.in/__media__/js/netsoltrademark.php?d=bestessayseduca
tionusa.com/essay/753-essay-when-helping-others-high.html
http://bootcd.com/__media__/js/netsoltrademark.php?d=topessayserv
icescloud.com/thesis/444-proquest-discs-database-best-essay.html
http://faysbs.com/__media__/js/netsoltrademark.php?d=topessayserv
icescloud.com/writing/216-help-writing-a-speech-excellent.html
http://rootsource.info/__media__/js/netsoltrademark.php?d=essaypr
omaster.com/course-work/814-course-work-resources-best-essay.html

http://stanielcayswimmingpigs.com/__media__/js/netsoltrademark.ph
p?d=freeessayfinder.com/essay/038-custom-essay-write-service-org-
excellent.html
http://levypc.com/__media__/js/netsoltrademark.php?d=freeessayfin
der.com/dissertation/722-dissertation-theme-excellent-essay-servi
ces.html
https://cointreaustables.webs.com/apps/guestbook/
Reply Jamosdoozy
5:31 PM on July 30, 2021