powpow Posted January 23, 2012 Share Posted January 23, 2012 Hello Freaks! I am having issues connecting to a virtual Windows SQL 2008 Server which is on our network. My PC can currently connect to the server through an ODBC connection. However, the ODBC connection is authenticated "with Windows NT authentication using the network login ID". If I try to authenticate "with SQL server authentication using a login ID and password entered by the user" it fails as follows: See attachment I have tried to make a connection through a php application that connects via odbc connection basically piggy-backing this connection; however I keep getting failure messages: function.odbc-connect</a>]: SQL error: [Microsoft][ODBC SQL Server Driver][sql Server]Login failed for user '[machine name]'., SQL state 28000 in SQLConnect in C:\xampp\htdocs\test\sqlsrv.php on line 2 the user for this error code is my actual machine name. After the odbc connection fail I set up a sqlserv_connect and tried connecting with my user name as well as leaving it blank to see what happened: [23-Jan-2012 17:40:37] sqlsrv_connect: entering [23-Jan-2012 17:40:37] sqlsrv_connect: SQLSTATE = 28000 [23-Jan-2012 17:40:37] sqlsrv_connect: error code = 18456 [23-Jan-2012 17:40:37] sqlsrv_connect: message = [Microsoft][sql Server Native Client 10.0][sql Server]Login failed for user 'rpowell'. [23-Jan-2012 17:40:38] sqlsrv_connect: SQLSTATE = 28000 [23-Jan-2012 17:40:38] sqlsrv_connect: error code = 18456 [23-Jan-2012 17:40:38] sqlsrv_connect: message = [Microsoft][sql Server Native Client 10.0][sql Server]Login failed for user '[mylogin]'. [23-Jan-2012 17:40:38] sqlsrv_errors: entering [23-Jan-2012 17:40:38] PHP_RSHUTDOWN for php_sqlsrv: entering [23-Jan-2012 17:46:47] PHP_RINIT for php_sqlsrv: entering [23-Jan-2012 17:46:47] sqlsrv.WarningsReturnAsErrors = On [23-Jan-2012 17:46:47] sqlsrv.LogSeverity = -1 [23-Jan-2012 17:46:47] sqlsrv.LogSubsystems = -1 [23-Jan-2012 17:46:47] sqlsrv_connect: entering [23-Jan-2012 17:46:47] sqlsrv_connect: SQLSTATE = 28000 [23-Jan-2012 17:46:47] sqlsrv_connect: error code = 18456 [23-Jan-2012 17:46:47] sqlsrv_connect: message = [Microsoft][sql Server Native Client 10.0][sql Server]Login failed for user '[machine-name]'. [23-Jan-2012 17:46:47] sqlsrv_connect: SQLSTATE = 28000 [23-Jan-2012 17:46:47] sqlsrv_connect: error code = 18456 [23-Jan-2012 17:46:47] sqlsrv_connect: message = [Microsoft][sql Server Native Client 10.0][sql Server]Login failed for user '[machine-name]'. Now to me this is a networking issue, some how the connection cannot resolve because of the NT authentication process. I was hoping some far superior developer had already figured a work around for this and felt like sharing . Any thoughts would be greatly appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/255607-remote-connection-network-issues%C2%BF-sql-server-2008/ Share on other sites More sharing options...
kicken Posted February 4, 2012 Share Posted February 4, 2012 The error shown in your attached image would lead me to believe that your server instance is not accepting connections over TCP/IP. You should check the server configuration to see if it is allowing tcp/ip. As a quick check you could look at the output of the netstat -nap tcp command and see if there is anything listening on port 1433. As for your login failure, make sure the username and password are correct of course, and make sure they have been setup in the server's security settings for a DB. Quote Link to comment https://forums.phpfreaks.com/topic/255607-remote-connection-network-issues%C2%BF-sql-server-2008/#findComment-1314296 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.