note 104247 added to function.mssql-connect

From: Date: Fri, 03 Jun 2011 12:15:58 +0000
Subject: note 104247 added to function.mssql-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-180218@lists.php.net to get a copy of this message
Connecting to a named instance of MSSQL. Our environment is a Windows 2003 server. Connecting to a dedicated MSSQL server running two instances of SQL SERVER 2005. The default instance and then a second named instance. My issue was in finding the syntax to properly identify the port of the named instance server. I found the answer finally in this thread, where a comma is used to separate the IP and PORT number. So, the code: mssql_connect('192.0.0.0,3456','USERNAME','PASSWORD'); In this case we used the internal IP of the server, followed by the static port number assigned to the named instance, in this example 3456. The port number can be dynamic or static, obviously choosing static is the route to take. Hope this helps someone! ---- Server IP: 69.147.83.197 Probable Submitter: 208.125.103.202 ---- Manual Page -- http://www.php.net/manual/en/function.mssql-connect.php Edit -- https://master.php.net/note/edit/104247 Del: integrated -- https://master.php.net/note/delete/104247/integrated Del: useless -- https://master.php.net/note/delete/104247/useless Del: bad code -- https://master.php.net/note/delete/104247/bad+code Del: spam -- https://master.php.net/note/delete/104247/spam Del: non-english -- https://master.php.net/note/delete/104247/non-english Del: in docs -- https://master.php.net/note/delete/104247/in+docs Del: other reasons-- https://master.php.net/note/delete/104247 Reject -- https://master.php.net/note/reject/104247 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#180218) next »