Hi, I've been trying to connect to a remote Oracle database through Windows XP but couldn't make it work after a few days' effort. This is what I've done:
1. Install ActivePerl on Windows. 2. Install DBI module. 3. Install DBD::ODBC module. 4. Inside my perl code, I choose to connect without DSN: use DBI; use DBD::ODBC; my $database = "ORADB"; my $DSN = 'driver={Microsoft ODBC for Oracle};server=10.1.6.9:1521;uid=oradbuser;pwd=oradbpassword;'; my $dbh = DBI->connect("dbi:ODBC:$DSN") or die "$DBI::errstr\n"; My first question: in the $DSN string, where can I put the database name? I found this syntax from the internet but it didn't say anything about the database name location. My second question: after I run the script, here is the error I got: DBI connect('driver={Microsoft ODBC for Oracle};server=10.1.6.9:1521;uid=oradbuser;pwd=oradbpassword;','',...) failed: [Microsoft][ODBC driver for Oracle][Oracle] ORA-12514: TNS:listener does not currently know of service requested in connect descriptor (SQL-NA000) [state was NA000 now 01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr). (SQL-01000) at testOracle.pl line 31 The database connection works ok because I can connect to the datasbase using SQLPLUS that comes with Instance Client for Microsoft Windows 32. Thanks a lot! Ming