Joe, You should set RaiseError => 1 so you know what errors get thrown.
-- Ron Reidy Lead DBA Array BioPharma, Inc. -----Original Message----- From: joe bayer [mailto:[EMAIL PROTECTED] Sent: Thursday, September 08, 2005 2:05 PM To: [email protected] Subject: Using DBI to bounce the database Hi, group, I would like to bouce the database using DBI. #!/usr/bin/perl -w ######################################################################## ######### # Purpose : Refresh user xxx from production # Created : 20050907 # Author : ######################################################################## ######### use DBI; use DBD::Oracle qw(:ora_session_modes); $ENV{ORACLE_SID}=$target_sid[$i]; my $record_counter = 0; my $imp_log = $ORACLE_HOME."dba/refresh/prod_$target_sid[$i].log"; $dbh = DBI->connect ( "dbi:Oracle:", "$username[$i]", "$passwd[$i]",{ora_session_mode => ORA_SYSDBA, PrintError => 0, RaiseError => 0, AutoCommit => 1 } ) || print "$target_sid[$i] connection error\n"; my $sql = "shutdown abort"; $dbh -> do($sql); ------------------------------------------------------------------------ ----------------------------------- I can connect as sysdba, but when I do "shutdown abort", DBI just ignore my command. What I did was wrong? Thanks for your help. Joe --------------------------------- Click here to donate to the Hurricane Katrina relief effort. This electronic message transmission is a PRIVATE communication which contains information which may be confidential or privileged. The information is intended to be for the use of the individual or entity named above. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. Please notify the sender of the delivery error by replying to this message, or notify us by telephone (877-633-2436, ext. 0), and then delete it from your system.
