Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
This givesuse DBD::Oracle qw(:ora_session_modes); # Import ORA_SYSDBA constant $dbh = DBI->connect('dbi:Oracle',"","",{ PrintError => 0, AutoCommit => 1, ora_session_mode => ORA_SYSDBA }); if (! $dbh) {print "can't connect to instance as sysdba\n";exit;} my $res = system("cp /tmp/pfile.ora /tmp/pfile.new.ora"); if ($res) { print "Unable to copy file\n$!\n"; }
As per comments in the DBD::Oracle documentation if I change the connection to include a database e.g.Unable to copy config file No child processes
the connection doesn't work.$dbh = DBI->connect('dbi:Oracle:mySID',"","",{ PrintError => 0, AutoCommit => 1, ora_session_mode => ORA_SYSDBA }); if (! $dbh) {print "can't connect to instance as sysdba\n";exit;}
|
|---|