use warnings;
use DBD::Oracle qw(:ora_types);
use DBI;
use constant SqlOracle => 'C:\oraclexe\app\oracle\product\10.2.0\server\BIN\sqlplus.exe\\';
use constant User => 'system';
use constant Pass => '12345';
use constant DB => 'XE';
print "Create connection Oracle Database 10g Express Edition ... 1\n";
my $dbh = DBI->connect("dbi:Oracle:".DB,User,Pass) or die $!;
print "Disconnect Oracle Database 10g Express Edition ...\n";
$dbh->disconnect;
print "Create connection Oracle Database 10g Express Edition ... 2\n";
$dbh = DBI->connect("dbi:Oracle:".DB,User."/".Pass) or die $!;
print "Disconnect Oracle Database 10g Express Edition ...\n";
$dbh->disconnect;
print "Create connection Oracle Database 10g Express Edition ... 3\n";
$dbh = DBI->connect("dbi:Oracle:",User."@".DB,Pass) or die $!;
print "Disconnect Oracle Database 10g Express Edition ...\n";
$dbh->disconnect;
0 comentários:
Post a Comment