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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
oskar509Author Commented:
That's it! Thanks so much!!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.