Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am implementing a database replication between different geograhical locations where each one is on a different domain. After going through all the process, when I start the agent it runs and stops.

When I look at the details it shows:

Error messages:
The process could not connect to Subscriber 'Mydomain\myusername'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20084)

Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. (Source: MSSQLServer, Error number: 18452)
share|improve this question
add comment

3 Answers 3

up vote 1 down vote accepted

Replication across non-trusted domains or workgroups can be done using Windows Authentication by configuring pass-through authentication.

Create a local Windows account on both the Publisher and Subscriber that has the same username and password. Use this account for the replication agent process account and have the connections to the publisher, distributor, and/or subscriber impersonate this account. Ensure the account has the permissions required in Replication Agent Security Model.

This approach is covered in the section Use Windows Authentication to Set Up Replication Between Two Computers Running SQL Server in Non-Trusted Domains in HOW TO: Replicate Between Computers Running SQL Server in Non-Trusted Domains or Across the Internet.

share|improve this answer
    
i following this link you provided.Am still having change to make the process connect to the subcriber.I create the same account with the same password on both domain –  kombo Nov 5 '13 at 16:31
    
They need to be local Windows accounts on both Publisher and Subscriber. Not domain accounts. –  Brandon Williams Nov 5 '13 at 16:43
    
I did exactly that.But the process could still not access the subcriber. am trying this link –  kombo Nov 5 '13 at 16:57
1  
Process could not connect to the ddnserver.i click start agent on the replication monitor from the subcriber it display:The agent could not be started. Additional information: An exception occurred while exucuting a Transact-sql statement or batch. Sqlagent error.Request to run job SM-PC2 Schoo_dbprist_publication DDNSERVER(from user sa refused because the job is already running from a request by user sa (change database context to school_db.Error:22022 –  kombo Nov 5 '13 at 17:32
1  
,it works now.Syncrozination is taking place and the agent now is running –  kombo Nov 6 '13 at 12:19
show 3 more comments

This is failing because the two domains do not trust each other. Because of that, a process executing under an account in the one domain cannot use windows authentication to connect to a SQL Server in the other domain. To get around this, you have three options:

  1. Create a trust relationship between the two domains.

  2. Use path-through authentication. (Create a windows account with the same user name and password on all machines in your topology.)

  3. Use SQL Authentication for cross domain connections when setting up replication.

My replication stairway articles give a step by step walkthrough of setting up SQL Server Replication and includes detailed information about the different security credentials used by the different processes. While the Stairway is not a step by step guide for setting up a cross domain installation, you should find enough information in there to get you past this problem.

share|improve this answer
add comment

First of all, you need to setup connectivity between these two servers on different domain with the help of the network administrator and update DNS entry as well.

  1. Create SQL login with same password on both server
  2. Make sure to connect SQL Server from one server to other server and vice versa using SQL login.
  3. Create publication on source server using agent security account and define articles
  4. Create PUSH subscription so that both snapshot/transaction agent and distribution agent will run on publisher.while configuring make sure that connection to subscriber should be with SQL login created on step1.
  5. Verify Replication monitor and confirm everything working fine.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.