Code Comments
Programming Forum and web based access to our favorite programming groups.Hi *,
I have a code (vac.pl) that executes 'vacuumdb':
if(!defined($analyze)) {
# VACUUM
$cmdline = qq/\/usr\/bin\/vacuumdb -v -d $params{"dbname"} -h
$params{"dbhost"} -p $params{"dbport"} -U $params{"dbuser"} -W
/;
} else {
# VACUUM ANALYZE
$cmdline = qq/\/usr\/bin\/vacuumdb -v -z -d $params{"dbname"} -h
$params{"dbhost"} -p $params{"dbport"} -U $params{"dbuser"} -W
/;
}
print $cmdline;
system($cmdline3);
I need to include vac.pl into the daily cron. The thing is that vacuumdb
asks for the database administrator's password. Since, according to this
code, the password is not passed, the execution of vacuumdb returns:
vacuumdb: could not connect to database GridICEdb: FATAL: password authenti
cation failed for user "gridiceadmin"
My question is: is there a way to pass the password with the execution
of vacuumdb, so that my program can be included in the daily cron?
Cheers,
--
________________________________________
_______________
Francisco José Bernabé Pellicer
Técnico de Sistemas Grid
Departamento de Sistemas/Técnicos CESGA
Centro de Supercomputación de Galicia (www.cesga.es)
Avda. de Vigo s/n (Campus Sur)
15705 Santiago de Compostela (La Coruña)
Spain
Tlf: +34 981 569 810
Fax: +34 981 594 616
E-mail: fbernabe@cesga.es
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.