Article ID: 321822 - Last Review: January 10, 2006 - Revision: 3.8 HOW TO: Replicate Between Computers Running SQL Server in Non-Trusted Domains or Across the InternetThis article was previously published under Q321822 On This PageSUMMARYSet Up Replication Between Two Computers Running SQL ServerConsider the following two issues when you set up replication between two computers running SQL Server.Security Context of the Replication AgentYou can configure the replication agent (including Log Reader Agent, the Merge Agent, the Distribution Agent, and the Snapshot Agent):
Default Client Net-LibraryStarting with SQL Server 2000 (Microsoft Data Access Component [MDAC] 2.6), the default client Net-Library is set to TCP/IP. In earlier versions of SQL Server, the default client Net-Library is set to named pipes. If the client computer uses Named Pipes to communicate to the server by using an alias or because the client is running an earlier version of MDAC, and the servers are in trusted domains, the executable file of the replication agent creates a named pipe (a file at the operating system level) on the destination server to establish a connection.The executable file creates a named pipe by using the security context of the SQL Server Agent account on the source server. If the destination server cannot verify the credentials of this account, the connection is not successful, and you receive the following error message: SQL server does not exist or access is
denied.
If you use TCP/IP, the connection is established by using the Winsock API calls that are made by using the sockets network library. The connection establishes an underlying TCP session by using the TCP three-way handshake protocol. The client computer opens a source port and communicates to a destination port. Problems If You Use an IP Address to Configure ReplicationIf you try to register the server (Publisher or the Subscriber) by using an IP address instead of a client alias, or if the client alias is different from the actual SQL Server NetBIOS name, the Merge Agent may fail, and you receive the following error messages:
Set Up Replication Between Two Computers Running SQL Server Across the InternetExample 1: The Subscriber Has Schema and Data, and the Initial Snapshot Is Not Necessary.Push Subscription
Pull SubscriptionTo pull the subscription, create an alias for the Publisher at the Subscriber, and then follow these steps:
Example 2: The Subscriber Does Not Have the Schema and Data, and the Initial Subscription from the Publisher Is Required.This example requires you to configure the FTP service at the Publisher, and then configure the Subscriber to download the initial snapshot from the FTP site. For more information, see the following topics in SQL Server Books Online:
Use Windows Authentication to Set Up Replication Between Two Computers Running SQL Server in Non-Trusted DomainsIf you have to set up replication across two non-trusted domains or workgroups by using Windows authentication, you must configure pass-through authentication. Configure a local Windows account on both the Publisher and the Subscriber that has the same name and password. After you configure this account, use the account to start the SQL Server Agent service on the Publisher for push subscriptions and on the Subscriber for pull subscriptions. Make sure that this account is configured according to the "Setting up Windows Services Accounts" topic in SQL Server Books Online. If the user tries to make a network connection to a remote computer that is in a non-trusted domain, the logon proceeds as if the user is connecting to an account on the remote computer. The remote computer authenticates the logon credentials against its directory database. If the account is not defined in the directory database, but the guest account on the remote computer is enabled and the guest account has no password set, the user logs on with guest permissions. If the guest account is not enabled, the logon is not successful. Important In the previous examples, if there is a firewall between the two servers, make sure that the firewall is configured according to the following article: 287932
(http://support.microsoft.com/kb/287932/EN-US/
)
INF: TCP Ports Needed for Communication to SQL Server Through a Firewall
REFERENCES For additional information, click the following article
numbers to view the articles in the Microsoft Knowledge Base: 320499
(http://support.microsoft.com/kb/320499/EN-US/
)
HOW TO: Manually Synchronize Replication Subscriptions by Using Backup or Restore
312292
(http://support.microsoft.com/kb/312292/EN-US/
)
HOW TO: Enable Replication Agents for Logging to Output Files in SQL Server
299903
(http://support.microsoft.com/kb/299903/EN-US/
)
FIX: sp_scriptpublicationcustomprocs Generates Replication Stored Procedures
| Article Translations
|

Back to the top
