Index: /trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
===================================================================
--- /trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm	(revision 24830)
+++ /trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm	(revision 24831)
@@ -210,5 +210,6 @@
         my $base;
 
-        next if ($img_type eq "warp" and $image->{ignored});
+        next if $image->{fault};
+        next if ($img_type ne "raw") and $image->{quality};
 
         if ($base_name) {
@@ -542,4 +543,5 @@
     my $project_name = shift;
     my $dbname = shift;
+    my $dbserver = shift;
     die "project is not defined" if !$project_name;
 
@@ -555,4 +557,5 @@
     my $command = "$pstamptool -project -name $project_name";
     $command .= " -dbname $dbname" if defined $dbname;
+    $command .= " -dbserver $dbserver" if defined $dbserver;
     # run the tool and parse the output
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
Index: /trunk/ippTasks/pstamp.pro
===================================================================
--- /trunk/ippTasks/pstamp.pro	(revision 24830)
+++ /trunk/ippTasks/pstamp.pro	(revision 24831)
@@ -8,4 +8,11 @@
 $pstampJob_DB = 0
 $pstampFin_DB = 0
+
+# set PS_DBSERVER if postage stamp database host is not the same as the value for DBSERVER in site.config
+# warning: no quotes around the two words. it cause it to get passed to pstamptool as one word
+# tricky to debug problem ensues
+# example:
+# $PSDBSERVER = -dbserver hostname
+$PS_DBSERVER = ""
 
 macro pstamp.reset
@@ -115,13 +122,15 @@
 
     task.exec
+        $run = pstamptool -pendingreq
         if ($DB:n == 0)
             option DEFAULT
-            command pstamptool  -pendingreq
         else 
             option $DB:$pstampReq_DB
-            command pstamptool  -pendingreq -dbname $DB:$pstampReq_DB
+            $run = $run $PS_DBSERVER -dbname $DB:$pstampReq_DB
             $pstampReq_DB ++
             if ($pstampReq_DB >= $DB:n) set pstampReq_DB = 0
         end
+        add_poll_args run
+        command $run
     end
 
@@ -213,5 +222,5 @@
         else 
             option $DB:$pstampFin_DB
-            command pstamptool  -completedreq -dbname $DB:$pstampFin_DB
+            command pstamptool  -completedreq -dbname $DB:$pstampFin_DB $PS_DBSERVER
             $pstampFin_DB ++
             if ($pstampFin_DB >= $DB:n) set pstampFin_DB = 0
@@ -307,5 +316,5 @@
         else
             option $DB:$pstampJob_DB
-            command pstamptool -pendingjob -limit 10 -dbname $DB:$pstampJob_DB
+            command pstamptool -pendingjob -limit 10 -dbname $DB:$pstampJob_DB $PS_DBSERVER
             $pstampJob_DB ++
             if ($pstampJob_DB >= $DB:n) set pstampJob_DB = 0
Index: /trunk/pstamp/scripts/dquery_finish.pl
===================================================================
--- /trunk/pstamp/scripts/dquery_finish.pl	(revision 24830)
+++ /trunk/pstamp/scripts/dquery_finish.pl	(revision 24831)
@@ -20,5 +20,5 @@
 use PS::IPP::Config qw( :standard );
 
-my ( $req_id, $req_name, $req_file, $product, $dbname, $verbose, $save_temps );
+my ( $req_id, $req_name, $req_file, $product, $dbname, $dbserver, $verbose, $save_temps );
 
 GetOptions(
@@ -28,4 +28,5 @@
            'product=s'  => \$product,
 	   'dbname=s'   => \$dbname,
+	   'dbserver=s' => \$dbserver,
 	   'verbose'    => \$verbose,
 	   'save-temps' => \$save_temps,
@@ -56,4 +57,8 @@
 my $outputDataStoreRoot = metadataLookupStr($ipprc->{_siteConfig}, 'DATA_STORE_ROOT');
 exit ($PS_EXIT_CONFIG_ERROR) unless defined $outputDataStoreRoot; # lookup failure outputs a message
+
+if (!$dbserver) {
+    $dbserver = metadataLookupStr($ipprc->{_siteConfig}, 'PS_DBSERVER');
+}
 
 if ($product eq "NULL") {
@@ -89,4 +94,5 @@
     my $command = "$pstamptool -listjob -req_id $req_id";
     $command .= " -dbname $dbname" if $dbname;
+    $command .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $command, verbose => $verbose);
@@ -149,4 +155,5 @@
     $command   .= " -fault $fault" if $fault;
     $command   .= " -dbname $dbname" if $dbname;
+    $command   .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $command, verbose => $verbose);
Index: /trunk/pstamp/scripts/dqueryparse.pl
===================================================================
--- /trunk/pstamp/scripts/dqueryparse.pl	(revision 24830)
+++ /trunk/pstamp/scripts/dqueryparse.pl	(revision 24831)
@@ -26,5 +26,5 @@
 		       );
 
-my ($req_file, $req_id, $out_dir, $product, $mode, $dbname, $verbose, $save_temps);
+my ($req_file, $req_id, $out_dir, $product, $mode, $dbname, $dbserver, $verbose, $save_temps);
 
 #
@@ -39,4 +39,5 @@
         'mode=s'          =>      \$mode,
         'dbname=s'        =>      \$dbname,
+        'dbserver=s'      =>      \$dbserver,
         'verbose'         =>      \$verbose,
         'save-temps'      =>      \$save_temps,
@@ -69,4 +70,9 @@
     warn("Can't find required tools.");
     exit ($PS_EXIT_CONFIG_ERROR);
+}
+
+if (!$dbserver) {
+    my $ipprc = = PS::IPP::Config->new();
+    $dbserver =  metadataLookupStr($ipprc->{_siteConfig}, 'PS_DBSERVER');
 }
 
@@ -131,4 +137,5 @@
     $command .= " -rownum 0";
     $command .= " -dbname $dbname" if $dbname;
+    $command .= " -dbserver $dbserver" if $dbserver;
 
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
@@ -153,4 +160,5 @@
     $command .= " -fault $result" if $result;
     $command .= " -dbname $dbname" if $dbname;
+    $command .= " -dbserver $dbserver" if $dbserver;
 
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
Index: /trunk/pstamp/scripts/pstamp_finish.pl
===================================================================
--- /trunk/pstamp/scripts/pstamp_finish.pl	(revision 24830)
+++ /trunk/pstamp/scripts/pstamp_finish.pl	(revision 24831)
@@ -24,5 +24,5 @@
 use PS::IPP::PStamp::Job qw( :standard );
 
-my ( $req_id, $req_name, $req_file, $out_dir, $product, $dbname, $verbose, $save_temps, $redirect_output);
+my ( $req_id, $req_name, $req_file, $out_dir, $product, $dbname, $dbserver, $verbose, $save_temps, $redirect_output);
 
 # the char to the right of the bar may be used as a single - alias for the longer name
@@ -35,4 +35,5 @@
            'out_dir=s'      => \$out_dir,
 	   'dbname=s'       => \$dbname,
+	   'dbserver=s'     => \$dbserver,
 	   'verbose'        => \$verbose,
 	   'save-temps'     => \$save_temps,
@@ -50,4 +51,8 @@
     my $logDest = "$out_dir/psfinish.$req_id.log";
     $ipprc->redirect_output($logDest);
+}
+
+if (!$dbserver) {
+    $dbserver =  metadataLookupStr($ipprc->{_siteConfig}, 'PS_DBSERVER');
 }
 
@@ -89,5 +94,5 @@
         if (!mkdir $out_dir) {
             print STDERR "cannot create output directory $out_dir";
-            stop_request($req_id, $PS_EXIT_UNKNOWN_ERROR, $dbname);
+            stop_request($req_id, $PS_EXIT_UNKNOWN_ERROR);
         }
 
@@ -97,10 +102,10 @@
         # request
         print STDERR "output directory $out_dir exists but is not a directory";
-        stop_request($req_id, $PS_EXIT_UNKNOWN_ERROR, $dbname);
+        stop_request($req_id, $PS_EXIT_UNKNOWN_ERROR);
     }
 
     if (! -e $req_file ) {
         print STDERR "request file $req_file is missing\n";
-        stop_request($req_id, $PS_EXIT_CONFIG_ERROR, $dbname);
+        stop_request($req_id, $PS_EXIT_CONFIG_ERROR);
     }
 
@@ -112,5 +117,5 @@
         # point 
         print STDERR "failed to read request_file $req_file" ;
-        stop_request($req_id, $PS_EXIT_CONFIG_ERROR, $dbname);
+        stop_request($req_id, $PS_EXIT_CONFIG_ERROR);
     }
 
@@ -138,4 +143,5 @@
         my $command = "$pstamptool -listjob -req_id $req_id";
         $command   .= " -dbname $dbname" if $dbname;
+        $command   .= " -dbserver $dbserver" if $dbserver;
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
             run(command => $command, verbose => $verbose);
@@ -251,4 +257,5 @@
         my $command = "$pstamptool -updatereq -req_id $req_id -state stop -fault $request_fault";
         $command   .= " -dbname $dbname" if $dbname;
+        $command   .= " -dbserver $dbserver" if $dbserver;
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
             run(command => $command, verbose => $verbose);
@@ -263,8 +270,8 @@
     my $req_id = shift;
     my $fault  = shift;
-    my $dbname = shift;
 
     my $command = "$pstamptool -updatereq -req_id $req_id -state stop -fault $fault";
     $command   .= " -dbname $dbname" if $dbname;
+    $command   .= " -dbserver $dbserver" if $dbserver;
 
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
Index: /trunk/pstamp/scripts/pstamp_job_run.pl
===================================================================
--- /trunk/pstamp/scripts/pstamp_job_run.pl	(revision 24830)
+++ /trunk/pstamp/scripts/pstamp_job_run.pl	(revision 24831)
@@ -17,4 +17,5 @@
 my $verbose;
 my $dbname;
+my $dbserver;
 my $job_id;
 my $redirect_output;
@@ -25,9 +26,10 @@
 
 GetOptions(
-    'job_id=s'      =>  \$job_id,
-    'output_base=s' =>  \$output_base,
-    'redirect-output' => \$redirect_output,
-    'dbname=s'      =>  \$dbname,
-    'verbose'       =>  \$verbose,
+    'job_id=s'          =>  \$job_id,
+    'output_base=s'     =>  \$output_base,
+    'redirect-output'   => \$redirect_output,
+    'dbname=s'          =>  \$dbname,
+    'dbserver=s'        =>  \$dbserver,
+    'verbose'           =>  \$verbose,
 );
 
@@ -65,4 +67,8 @@
 }
 
+if (!$dbserver) {
+    $dbserver =  metadataLookupStr($ipprc->{_siteConfig}, 'PS_DBSERVER');
+}
+
 my $missing_tools;
 
@@ -83,4 +89,5 @@
     my $command = "$pstamptool -pendingjob -job_id $job_id";
     $command .= " -dbname $dbname" if $dbname;
+    $command .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $command, verbose => $verbose);
@@ -118,4 +125,5 @@
     my $command = "$ppstamp -file $uri $outputBase $argString";
     $command .= " -dbname $dbname" if $dbname;
+    $command .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $command, verbose => $verbose);
@@ -172,4 +180,5 @@
     my $command = "$pstamp_get_image_job --job_id $job_id --uri $uri --out_dir $outputBase --rownum $rownum";
     $command .= " --dbname $dbname" if $dbname;
+    $command .= " --dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $command, verbose => $verbose);
@@ -191,4 +200,5 @@
     my $command = "$pstamptool -updatejob -job_id $job_id -state stop -fault $jobStatus";
     $command .= " -dbname $dbname" if $dbname;
+    $command .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $command, verbose => $verbose);
Index: /trunk/pstamp/scripts/pstamp_listjobs.pl
===================================================================
--- /trunk/pstamp/scripts/pstamp_listjobs.pl	(revision 24830)
+++ /trunk/pstamp/scripts/pstamp_listjobs.pl	(revision 24831)
@@ -12,8 +12,10 @@
 my $verbose;
 my $dbname;
+my $dserver;
 
 GetOptions(
     'verbose'   =>  \$verbose,
     'dbname=s'  =>  \$dbname,
+    'dbserver=s'=>  \$dbserver,
 );
 
@@ -68,4 +70,5 @@
     my $command = "$pstamptool -listjob -req_id $request_id";
     $command .= " -dbname $dbname" if $dbname;
+    $command .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $command, verbose => $verbose);
Index: /trunk/pstamp/scripts/pstamp_parser_run.pl
===================================================================
--- /trunk/pstamp/scripts/pstamp_parser_run.pl	(revision 24830)
+++ /trunk/pstamp/scripts/pstamp_parser_run.pl	(revision 24831)
@@ -20,4 +20,5 @@
 my $verbose;
 my $dbname;
+my $dbserver;
 
 GetOptions(
@@ -28,4 +29,5 @@
     'verbose'           =>  \$verbose,
     'dbname=s'          =>  \$dbname,
+    'dbserver=s'         =>  \$dbserver,
 );
 
@@ -67,4 +69,8 @@
 my $pstamp_workdir = metadataLookupStr($ipprc->{_siteConfig}, 'PSTAMP_WORKDIR');
 exit ($PS_EXIT_CONFIG_ERROR) unless defined $pstamp_workdir; # lookup failure outputs a message
+
+if (!$dbserver) {
+    $dbserver =  metadataLookupStr($ipprc->{_siteConfig}, 'PS_DBSERVER');
+}
 
 # workdir is where we download request files to and place any error output from the parser
@@ -167,4 +173,5 @@
     $command   .= " -fault $PS_EXIT_DATA_ERROR";
     $command   .= " -dbname $dbname" if $dbname;
+    $command   .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $command, verbose => $verbose);
@@ -177,4 +184,5 @@
 $parse_cmd .= " --mode queue_job --req_id $req_id --product $product --out_dir $workdir --file $uri";
 $parse_cmd .= " --dbname $dbname" if $dbname;
+$parse_cmd .= " --dbserver $dbserver" if $dbserver;
 $parse_cmd .= " --verbose" if $verbose;
 
@@ -218,4 +226,5 @@
     $command   .= " -fault $fault" if $fault;
     $command   .= " -dbname $dbname" if $dbname;
+    $command   .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $command, verbose => $verbose);
Index: /trunk/pstamp/scripts/pstamp_queue_requests.pl
===================================================================
--- /trunk/pstamp/scripts/pstamp_queue_requests.pl	(revision 24830)
+++ /trunk/pstamp/scripts/pstamp_queue_requests.pl	(revision 24831)
@@ -17,4 +17,5 @@
 my $verbose;
 my $dbname;
+my $dbserver;
 my $limit;
 
@@ -22,4 +23,5 @@
     'verbose'       =>  \$verbose,
     'dbname=s'      =>  \$dbname,
+    'dbserver=s'    =>  \$dbserver,
     'limit=i'       =>  \$limit,
 );
@@ -59,5 +61,10 @@
 }
 
+my $ipprc = PS::IPP::Config->new();
 my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files
+
+if (!$dbserver) {
+    $dbserver =  metadataLookupStr($ipprc->{_siteConfig}, 'PS_DBSERVER');
+}
 
 my @dataStores;
@@ -66,4 +73,5 @@
     my $command = "$pstamptool -datastore";
     $command .= " -dbname $dbname" if $dbname;
+    $command .= " -dbserver $dbserver" if $dbserver;
 
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
@@ -177,4 +185,5 @@
                 my $command = "$pstamptool -addreq -uri $req_uri -ds_id $ds_id";
                 $command .= " -dbname $dbname" if $dbname;
+                $command .= " -dbserver $dbserver" if $dbserver;
 
                 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
@@ -192,4 +201,5 @@
         my $command = "$pstamptool -ds_id $ds_id -moddatastore -last_fileset $lastFileset";
         $command .= " -dbname $dbname" if $dbname;
+        $command .= " -dbserver $dbserver" if $dbserver;
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
             run(command => $command, verbose => $verbose);
Index: /trunk/pstamp/scripts/pstamp_revert_request.pl
===================================================================
--- /trunk/pstamp/scripts/pstamp_revert_request.pl	(revision 24830)
+++ /trunk/pstamp/scripts/pstamp_revert_request.pl	(revision 24831)
@@ -31,9 +31,10 @@
 
 
-my ( $req_id, $dbname, $verbose, $save_temps );
+my ( $req_id, $dbname, $dbserver, $verbose, $save_temps );
 
 GetOptions(
 	   'req_id=s'   => \$req_id,
 	   'dbname=s'   => \$dbname,
+	   'dbserver=s' => \$dbserver,
 	   'verbose'    => \$verbose,
 	   'save-temps' => \$save_temps,
@@ -65,4 +66,5 @@
     my $command = "$pstamptool -listreq -req_id $req_id";
     $command   .= " -dbname $dbname" if $dbname;
+    $command   .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $command, verbose => $verbose);
@@ -97,5 +99,6 @@
 if ($product and $fileset) {
     my $command = "$dsreg --del $fileset --product $product --rm --force";
-    $command .= " --dbname $dbname" if $dbname;
+#   don't add dbname let dsreg get it from the DS_DBNAME in site.config
+#    $command .= " --dbname $dbname" if $dbname;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $command, verbose => $verbose);
@@ -109,4 +112,5 @@
     my $command = "$pstamptool -revertreq -req_id $req_id";
     $command   .= " -dbname $dbname" if $dbname;
+    $command   .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $command, verbose => $verbose);
Index: /trunk/pstamp/scripts/pstamp_webrequest.pl
===================================================================
--- /trunk/pstamp/scripts/pstamp_webrequest.pl	(revision 24830)
+++ /trunk/pstamp/scripts/pstamp_webrequest.pl	(revision 24831)
@@ -24,4 +24,5 @@
 my $verbose = 0;
 my $dbname;
+my $dbserver;
 my $project;
 my $job_type;
@@ -30,4 +31,5 @@
     'job_type=s'    =>  \$job_type,
     'dbname=s'      =>  \$dbname,
+    'dbserver=s'    =>  \$dbserver,
     'project=s'     => \$project,
     'verbose'       => \$verbose,
@@ -101,4 +103,5 @@
     my $command = "$pstampparse --mode list_uri --file $request_file";
     $command .= " --dbname $dbname" if $dbname;
+    $command .= " --dbserver $dbserver" if $dbserver;
     $command .= " --verbose" if $verbose;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
@@ -123,4 +126,5 @@
     my $command = "$pstamptool -addreq -uri $request_file -ds_id 0";
     $command .= " -dbname $dbname" if $dbname;
+    $command .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $command, verbose => $verbose);
Index: /trunk/pstamp/scripts/pstampparse.pl
===================================================================
--- /trunk/pstamp/scripts/pstampparse.pl	(revision 24830)
+++ /trunk/pstamp/scripts/pstampparse.pl	(revision 24831)
@@ -16,4 +16,5 @@
 my $verbose;
 my $dbname;
+my $dbserver;
 my $req_id;
 my $request_file_name;
@@ -29,4 +30,5 @@
     'mode=s'    =>  \$mode,
     'dbname=s'  =>  \$dbname,
+    'dbserver=s'=>  \$dbserver,
     'verbose'   =>  \$verbose,
 );
@@ -89,4 +91,5 @@
     $command .= " -outProduct $product";
     $command .= " -dbname $dbname" if $dbname;
+    $command .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $command, verbose => $verbose);
@@ -143,5 +146,5 @@
     die "job_type is list_uri but mode is $mode" if ($job_type eq "list_uri") and ($mode ne "list_uri");
 
-    my $proj_hash = resolve_project($ipprc, $project, $dbname);
+    my $proj_hash = resolve_project($ipprc, $project, $dbname, $dbserver);
     die "project $project not found\n" unless $proj_hash;
 
@@ -217,4 +220,5 @@
                     . " -uri $listfile -outputBase $out_dir -rownum $rownum";
         $command .= " -dbname $dbname" if $dbname;
+        $command .= " -dbserver $dbserver" if $dbserver;
         if ($mode eq "list_job") {
             print "$command\n";
@@ -274,4 +278,5 @@
             $command .= " -exp_id $exp_id" if $exp_id;
             $command .= " -dbname $dbname" if $dbname;
+            $command .= " -dbserver $dbserver" if $dbserver;
 
             if ($mode eq "list_job") { 
Index: /trunk/pstamp/scripts/request_finish.pl
===================================================================
--- /trunk/pstamp/scripts/request_finish.pl	(revision 24830)
+++ /trunk/pstamp/scripts/request_finish.pl	(revision 24831)
@@ -21,5 +21,5 @@
 use PS::IPP::Config qw( :standard );
 
-my ( $req_id, $req_name, $req_file, $req_type, $out_dir, $product, $dbname, $verbose, $save_temps, $redirect_output );
+my ( $req_id, $req_name, $req_file, $req_type, $out_dir, $product, $dbname, $dbserver, $verbose, $save_temps, $redirect_output );
 
 GetOptions(
@@ -31,4 +31,5 @@
            'product=s'  => \$product,
 	   'dbname=s'   => \$dbname,
+	   'dbserver=s' => \$dbserver,
 	   'verbose'    => \$verbose,
 	   'save-temps' => \$save_temps,
@@ -80,4 +81,5 @@
     my $command = $finish_cmd . " --req_id $req_id --req_name $req_name --req_file $req_file --product $product --out_dir $out_dir";
     $command   .= " --dbname $dbname" if $dbname;
+    $command   .= " --dbserver $dbserver" if $dbserver;
     $command   .= " --verbose" if $verbose;
     $command   .= " --save-temps" if $save_temps;
@@ -93,4 +95,5 @@
     my $command = "$pstamptool -updatereq -req_id $req_id -state stop -fault $PS_EXIT_DATA_ERROR";
     $command   .= " -dbname $dbname" if $dbname;
+    $command   .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $command, verbose => $verbose);
