Answered my own question. >$dbh = DBI->connect("dbi:Oracle:dbdev1.mydomain.com:",
The colon at the end was a typo. When fixed, "ORA-12154" showed up. > $ENV{ORACLE_HOME} = "C:\oracle\ora81"; Big duh. Those backslashes were escaping ("\o") twice. Lessons learned: turn on warnings, and don't just paste from unix code to windows code without thinking about it. Ian Jones wrote: > On WinNT (service pack 6) I've installed: > ActiveState Perl 5.8 (805) > DBI 1.32 and DBD Oracle 1.12 from the ppd's at http://xmlproj.com/PPM/ > > When running a test connection script (see below) I get "Error while > trying to retrieve test for error ORA-06401" > > I'm running against Oracle 8i (8.1.7). When using sqlplus, the host sid > is fine. My oracle home is indeed "C:\oracle\ora81" > > Thanks! > Ian > > #!C:\Perl\bin\perl > > use DBI; > use DBD::Oracle qw(:ora_types); > $ENV{ORACLE_SID} = "dbdev1.mydomain.com"; > $ENV{ORACLE_HOME} = "C:\oracle\ora81"; > $dbh = DBI->connect("dbi:Oracle:dbdev1.mydomain.com:", > "reportuser", "rptpwrd"); > > $cursor = $dbh->prepare("SELECT TABLE_NAME FROM > USER_TABLES WHERE TABLESPACE_NAME='USER_DATA'"); > > $cursor->execute; > > while (@row = $cursor->fetchrow_array) { > print "$row[0]\n\n"; > } > > $cursor->finish; > > $cursor->finish;