MS Server 2008 x64, SQL Server 2008, doesn't recognize my dsn from perl script


I have a perl script that I use to remotely connect to my SQL Server 2008 database on my server running MS Server 2008. Uses something like $dbh = DBI->connect("DBI:ODBC:DSNname",,,{RaiseError=> 1}). Works great.
But when I try to run the script from the server, it can't find the dsn name.
I installed activestate perl, DBI & ODBC from ppm, created the dsn in ODBC Administrator identical to the one on my client machine running Windows XP. I've created the dsn using the server name, and then using "local". Both test "successful" in making a connection.

So, I have a perl script from the O'Reilly book "Programming the Perl DBI" the will find and print out all of your drivers with all of their dsn's. When run from my server, it lists only:

dbi:ODBC:dBASE files
dbi:ODBC:Excel files
dbi:ODBC:MS Access database

In other words, only the default User dsn's.

When run from my client machine, it lists these 3, plus:


aka, the dsn's I've created under System DSN.

So why isn't the perl script finding the System DSN I've made over on the server?

Thanks so much!

Who is Participating?
Check that you have the DSNs created under the 32-bit ODBC manager.  Perl is most likely running under 32-bit execution, thus it will not be able to connect to and see the 64-bit ODBC manager / DSNs.

This is a known issue with ODBC on 64-bit versions of windows, although you'll see it more commonly referenced on the 'net with regard to MS Jet (Access) ODBC connections.

This MS KB article provides more information on how to do that:
oskar509Author Commented:
That's it! Thanks so much!!!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.