note 55211 added to function.mssql-connect
| From: | MarcelLaverdet at osu1 dot php dot net | Date: | Wed, 27 Jul 2005 20:30:42 +0000 |
| Subject: | note 55211 added to function.mssql-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-92577@lists.php.net to get a copy of this message | ||
I was having problems connecting to a SQL cluster with mssql_connect, but any other program could
connect just fine. I ended up using a PHP ADODB driver to work around the connectivity problem I was
having. Later, however, I discovered my problem was a mismatched name in the server table.
To see if you have this problem, "SELECT * FROM [master].[sysservers]". If the srvname,
and datasource don't match the cluster's virtual SQL name... then you will have a problem.
My virtual SQL server's name was 'SQL-SERV', however in the sysservers table it was
listed as 'SQLSERV'.
To remedy this problem, simply issue the following queries: "EXECUTE sp_dropserver
wrongName" and then "EXECUTE sp_addserver rightName, 'local'". After
running these 2 procedures, restart the server and PHP should connect just fine using the native
libraries.
If it still doesn't connect, make sure you update the ntwdblib.dll file as explained in prior
comments.
----
Manual Page -- http://www.php.net/manual/en/function.mssql-connect.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+55211
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55211&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55211&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55211&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55211&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55211&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55211&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+55211&report=yes
Search -- http://master.php.net/manage/user-notes.php