The first time you play SQL Server 2005 today, you need to configure remote connections. I said less, straight into the subject, summed up from the novice stand in the WIN2003 server environment to configure the process.
The first step is to set up the server
First, in SQL Configuration Manager, select the network configuration-TCP/IP
As above, summing up,
1, we need to set the IP address (server's IP),
2,TCP Port (all TCP IP is set to uniform, usually default 1433, but I modified to 6096)
3, change "enabled" to "Yes"
After that, we modify the definition of the client
To select TCP/IP in the client protocol
Set the default port to 6096 previously set (default 1433)
Modify enabled to Yes.
Then, in the SQL perimeter application configurator, select Sqlexpress-database engine-Remote connection-local connection and remote connection-using TCP/IP only in the perimeter configuration for services and connections.
At this point, basically the service side of the setup is half done.
One of the things to mention is that there is a SQL Server Browser service that we don't normally use, and the official explanation for this service is:
“
If you are running SQL Server 2005 by using an instance name and you do not use a specific TCP/IP port number in the connection string, you must enable the SQL Server Browser service to allow remote connections. For example, SQL Server Express is installed using the default instance name of the < computer name >\sqlexpress. No matter how many instances of SQL Server 2005 you are running, you only need to enable the SQL Server Browser service once. To enable the SQL Server Browser service, follow these steps.
Important : These steps may increase your security risk. These steps may also cause your computer or network to be more vulnerable to malicious users or malicious software such as viruses. We recommend this process to enable programs to run as designed, or to implement specific program functions. We recommend that you take full account of the risks associated with implementing this process in your particular environment before making these changes. If you choose to implement this procedure, take any appropriate additional steps to protect your system. We recommend that you use this process only if you really need it.
Click Start, point to Programs, Microsoft SQL Server 2005, and configure tools, and then click SQL Server Perimeter Application configurator. On the SQL Server 2005 Perimeter Configuration page, click the perimeter application configurator for services and connections. On the perimeter application configurator for services and Connections page, click SQL Server Browser, click the Automatic option in Startup type, and then click Apply.
Note : When you click the Auto option, the SQL Server Browser service is started automatically each time you start Microsoft Windows. Click Start, and then click OK.
Note : When you run the SQL Server Browser service on your computer, the computer displays the instance name and connection information for each instance of SQL Server that is running on it. This risk can be reduced if the SQL Server Browser service is not enabled and is directly connected to an instance of SQL Server through an assigned TCP port. This article does not discuss how to go directly to an instance of SQL Server through a TCP port. For more information about SQL Server Browser services and connecting to instances of SQL Server, see the following topics in SQL Server Books Online:
SQL Server Browser service connects to SQL Server Database engine client network configuration
”
You see, it is necessary to specify a database instance to connect the need to use the SQL Server Browser service, and we do not need to pay attention to the specific server port, the SQL Server Browser services will help us to handle, which has both advantages and disadvantages, The connection is convenient but the security is not guaranteed, moreover actually also is not convenient where to go.
Here are two other things we need to do:
1, open the firewall port (the author is using 6096 ports, the default is 1433, you can set yourself)
2, the service database creates a new username and password, which is mixed with the server authentication method.
Finally, we will "Cmd-telnet IP 6096" on the client to see if we can connect to the server port, the test passes, we can formally to use the SQL management tool to connect.
When connecting, the server's address format is: "ip\sqlexpress,6096" (this address format has been doing me for a long time, egg pain, I thought it was ip:port on it)
OK, so far, our remote connection to the server SQL2005 successful.