Thursday, November 3, 2011

Tips: How to setup remote server connections

Handling the connections from other servers is completely different from the user connections. Therefore, you can allow if the server should connect to this server and how long it should take remote queries to time out. If you wish to configure the remote connections, follow the following steps.

1.    First, go to the Connections page from the server properties dialog box.
2.    If you wish to allow the servers to connect to this server, it is required to select the option Allow Remote Connections To This Server. Then, the remote servers will log on to the server to execute stored procedures remotely.  You must stop and then start the SQL Server instance to apply the change if you select this option.
Beware: Remote procedure call (RPC) connections are allowed by default. If you change this behavior, remote servers cannot log on to SQL Server. This setting change keeps SQL Server secure from remote server access.

3.    The queries will be executed by the remote servers’ time out in 600 seconds. It is required to type a time-out value in the Remote Query Timeout box on the Connections page to change this behavior. Time-out values are set in seconds, and the acceptable range of values is from 0 through 2,147,483,647. A value of 0 means that there is no query time-out for remote server connections.
4.    Stored procedures and queries executed on the server can be handled as distributed transactions by using Distributed Transaction Coordinator (DTC). If you want to execute procedures this way, select the Require Distributed Transactions For Server-To-Server Communication check box. If you change this option, you must stop and then start the SQL Server instance.

5. Then, click OK.
These options can also be set with sp_configure. The related Transact-SQL statements are:
•    exec sp_configure "remote access",
•    exec sp_configure "remote query timeout",
•    exec sp_configure "remote proc trans",
Note: A value of 0 turns a remote server connection option off, and a value of 1 turns an option on. Check out to perform the steps.

B  y ,