To configure Internet replication, key parameters must be set on both the Publisher and Subscriber. SQL Server must be configured to interoperate with the FTP and WinSock Proxy services on the proxy server. There are four key steps to configuring SQL Server replication:
After Microsoft Proxy Server has been installed on the proxy server, you must configure the server running SQL Server to be a proxy client. This requires binding SQL Server to a WinSock port to allow communication over the Internet.
Configuring SQL Server to work with Microsoft Proxy Server requires changes to the file \Mssql7\Binn\Wspcfg.ini on the server running SQL Server. If the file does not exist, create it by using Notepad. The file must contain these entries:
[sqlservr]
ServerBindTcpPorts=1433
Persistent=1
KillOldSession=1
SQL Server listens on service port 1433. When a user or anonymous subscriber is authenticated by SQL Server, a session is established between the user or anonymous subscriber and SQL Server using service port 1433.
When the server running Microsoft Proxy Server is set up, it creates a share called mspclnt that points to the directory C:\Msp\Clients. You must connect to this share and run the proxy client configuration utility (mpclnt) to establish SQL Server as a proxy client. After setup is complete, SQL Server is an internal client to the proxy server.
To run the Proxy Client configuration utility
Before you can publish articles over the Internet, the Publisher and Distributor must be enabled to listen on either the TCP/IP or the Multiprotocol network protocol. Microsoft SQL Server uses TCP/IP Sockets or Multiprotocol Net-Libraries over TCP/IP to establish the initial ODBC connection between the Distributor on one side of the Internet and the Subscriber on the other. TCP/IP Sockets Net-Library is enabled during the default SQL Server setup, but may not be enabled if you did a custom installation.
To enable access control for SQL Server
Note There is no requirement to use the same name for the Server Alias and the Protocol Name created in WinSock Proxy.
SQL Server must be informed of the FTP home directory location on the proxy server. The snapshot folder (by default \Mssql7\Repldata\Ftp) is redirected to the FTP home directory on the proxy server, enabling data to be transferred to the Subscriber. A new snapshot folder is set up during the FTP service configuration.
To set the FTP home directory
To ensure the Subscriber can access information on the Publisher by using Microsoft Proxy Server, a pull subscription must be configured with information that helps it resolve the address of the Publisher.
Note For a Subscriber to subscribe to a Publication over the Internet, the Publication on the Publisher must have the Allow Snapshots to be downloaded using FTP option enabled.
To configure a pull subscription
The Pull Subscription Wizard starts.
To verify that a connection to Proxy Server has been established through port 1433, check the WinSock Proxy service on the proxy server. You should see a session in Proxy Server for the user account that SQL Server is running under.
The user account may not appear immediately. Allow SQL Server a few moments and click the Refresh button periodically. If the account for SQL Server Agent does not appear in the list, stop and restart SQL Server. SQL Server is a client to the proxy server and the service account in which SQL Server was configured to run should appear in the list.
Note You must use a fully qualified name; computer accounts will not work.
To verify a connection
Alternatively, you can verify your IP connection and port information on any of the computers by using the netstat command. The following is output from the SQL Server server using netstat –a command. This lists both client- and server-side connections as well as their status and port numbers. Use netstat without any options to client sessions only. If you want to display only ports 1433 and 21, use netstat –an to display TCP connections only.
You may notice that several ports other than 1433 are listed. Keep in mind that 1433 is configured as the incoming port. The outgoing port is dynamic and Proxy Server assigns it when a connection is established. The dynamic port ranges between 1025 and 5000.
Active Connections
Proto Local Address Foreign Address State
TCP SQLReplServer:1026 0.0.0.0:0 LISTENING
TCP SQLReplServer:1031 0.0.0.0:0 LISTENING
TCP SQLReplServer:1033 0.0.0.0:0 LISTENING
TCP SQLReplServer:ftp 0.0.0.0:0 LISTENING
TCP SQLReplServer:1058 0.0.0.0:0 LISTENING
TCP SQLReplServer:1059 0.0.0.0:0 LISTENING
TCP SQLReplServer:135 0.0.0.0:0 LISTENING
TCP SQLReplServer:135 0.0.0.0:0 LISTENING
TCP SQLReplServer:1433 0.0.0.0:0 LISTENING
TCP SQLReplServer:1025 0.0.0.0:0 LISTENING
TCP SQLReplServer:1025 localhost:1026 ESTABLISHED
TCP SQLReplServer:1026 localhost:1025 ESTABLISHED
TCP SQLReplServer:1029 0.0.0.0:0 LISTENING
TCP SQLReplServer:1030 0.0.0.0:0 LISTENING
TCP SQLReplServer:1032 0.0.0.0:0 LISTENING
TCP SQLReplServer:1056 0.0.0.0:0 LISTENING
TCP SQLReplServer:1057 0.0.0.0:0 LISTENING
TCP SQLReplServer:137 0.0.0.0:0 LISTENING
TCP SQLReplServer:138 0.0.0.0:0 LISTENING
TCP SQLReplServer:nbsession 0.0.0.0:0 LISTENING
UDP SQLReplServer:1059 *:*
UDP SQLReplServer:1088 *:*
UDP SQLReplServer:135 *:*
UDP SQLReplServer:nbname *:*
UDP SQLReplServer:nbdatagram *:*