Wednesday, March 21, 2012

ODBC Connection Fails from cluster node

I had a stand alone sql server that I upgraded to a cluster. I have an odbc connection called my_connection. The odbc test works fine. When I call the dsn from a php script it fails with this message:

Warning: odbc_connect(): SQL error: [Microsoft][ODBC SQL Server Driver][DBNETLIB
]SQL Server does not exist or access denied., SQL state 08001 in SQLConnect in D
:\storage\test.php on line 3
Could not connect to my_connection!

This same script works fine from any other computer. Is there an issue with connecting to a virtual server from the node via ODBC? Is there something I need to change in the client protocols?

Thanks in advance.

What's your connection string? The server name must have been changed (from the machine name to cluster network name resource name). Have you changed it in your conn string? Is it a default instance and named instance?|||

I also like to add that when I run Component Checker 2.0 I get

The following product releases were matched:

UNKNOWN

I'm wondering if this is the culprit.

|||

Its a system dsn, with SQL Server driver. The server is my virtual server name, and it uses sql authentication.

Does that answer your question? My odbc connection by itself works fine, but it doesn't when called from another app.

|||hmm, If you are able to connect when you test the DSN but fails in your app, I'm not sure what I can do. There are probably some issue with your app. I hope you test your app and DSN under same account.|||

This issue appears to be MDAC. Uninstalling and reinstalling SQL to enable clustering must have caused the problem.

What I did to figure this out was change the connection from dsn to dsn-less and it worked.

No comments:

Post a Comment