SQL Server
Install the first instance, the default instance port is 1433,
If there are multiple instances in a library,
The port starting from the second instance is a dynamic port, which, if required, is manually specified as a static port, as specified
The second instance is 1434 or a random one such as 2080 port
Method:
Click "Start", "Microsoft SQL Server2005", "Configuration Tools", "SQL Server configuration Manager", "at the bottom left of your computer", "Expand Network Configuration" and click " MySQLServer protocol "-double-click the newly installed instance database name on the left--expand, then double-click TCP/IP on the right--and select the address to see the port number.
Step one: First put the above dynamic port number 0, delete.
Step Two: Enter the TCP port: Custom
At this point, into the SQL2005 console connection into the new instance name, the program appears suspended animation.
You must check whether the newly installed instance of SQL SERVER service is started.
Program Access Full Connection string
string connstr = @ "server=192.168.1.138\sql2k5,21433; uid=sa;pwd=0; Database=master; ";
IP address \ Instance name, port number
is a named instance, the backslash is delimited between the server IP address and the instance name
A comma separated from the port number after the server IP instance name, unless the port is specified instead of the default port
Or connect with a registered alias (e.g.)
SQL: Install multiple instances, modify the instance port number, and connect the IP port number to the instance