Index: trunk/ippScripts/scripts/phase2.pl
===================================================================
--- trunk/ippScripts/scripts/phase2.pl	(revision 11110)
+++ trunk/ippScripts/scripts/phase2.pl	(revision 11297)
@@ -23,4 +23,5 @@
     $camera,			# Camera
     $outpath,			# Outpath
+    $dbname,			# Database name
     $no_update			# Don't update the database?
     );
@@ -31,4 +32,5 @@
     'camera|c=s'    => \$camera,
     'outpath|o=s'   => \$outpath,
+    'dbname|d=s'    => \$dbname, # Database name
     'no-update'     => \$no_update
 ) or pod2usage( 2 );
@@ -102,5 +104,5 @@
 $outputBin2  = $ipprc->convert_filename_relative( $outputBin2 );
 unless ($no_update) {
-    # Command to run dettool
+    # Command to run p2tool
     my $command = "$p2tool -addprocessedimfile";
     $command .= " -exp_tag $expTag";
@@ -113,4 +115,5 @@
     $command .= " -bg_stdev " . $stats->bg_stdev();
     $command .= " -bg_mean_stdev " . $stats->bg_mean_stdev();
+    $command .= " -dbname $dbname" if defined $dbname;
 
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
