use DBI; $ENV{ORACLE_HOME} = 'C:\oracle\product\10.2.0\client_1'; #or whatever $ENV{LD_LIBRARY_PATH} = 'C:\oracle\product\10.2.0\client_1\LIB'; #or whatever $ENV{LD_RUN_PATH} = 'C:\oracle\product\10.2.0\client_1\LIB'; #or whatever my $dbh = DBI->connect( 'dbi:Oracle:EAORA10G', 'JdoeJd', 'Dj111222', { RaiseError => 1, AutoCommit => 0 } ) || die "Database connection not made: $DBI::errstr"; my $sql = qq{ SELECT CMID FROM CMOBJECTS}; my $sth = $dbh->prepare( $sql ); $sth->execute(); $dbh->disconnect();