Security Issues Are Preventing Data from Being Replicated

This topic describes a number of security-related issues that can occur during replication configuration and operation. For more information about replication security, see Security and Protection (Replication).

Explanation and User Action

Issue

To resolve the issue…

The password has changed for an account used by one or more replication agents.

Change the password for all agents that use the account. For more information, see How to: View and Modify Replication Security Settings (SQL Server Management Studio) and How to: View and Modify Replication Security Settings (Replication Transact-SQL Programming).

An account used by a replication agent is no longer valid and must be changed.

Change the account using the appropriate dialog box or stored procedure. For more information, see How to: View and Modify Replication Security Settings (SQL Server Management Studio) and How to: View and Modify Replication Security Settings (Replication Transact-SQL Programming).

A replication agent does not have sufficient permissions to connect to a computer in the topology or perform operations in a database.

Ensure the agent is using a valid login and has sufficient permissions. For more information, see Replication Agent Security Model.

The Snapshot Agent cannot write to the snapshot folder; the Distribution Agent or Merge Agent cannot read from the snapshot folder.

Ensure the agents are granted the correct directory and share permissions. For more information, see Securing the Snapshot Folder.

A snapshot cannot be transferred using file transfer protocol (FTP) because of a permissions issue or because the Distribution Agent or Merge Agent cannot locate the FTP folder for the publication.

Ensure that the FTP server is configured correctly and that the path to the FTP folder is specified correctly. For more information, see How to: Deliver a Snapshot Through FTP (SQL Server Management Studio) and How to: Deliver a Snapshot Through FTP (Replication Transact-SQL Programming).

You encounter permissions issues connecting to an Oracle Publisher.

There are a number of areas to check, which include ensuring the account replication uses to connect to the Oracle Publisher and the account under which Microsoft SQL Server runs on the Distributor have sufficient permissions. For more information, see Troubleshooting Oracle Publishers.

The following error message is raised: Login failed for user 'distributor_admin'.

Ensure that the distributor_admin account has a valid strong password. Replication creates a remote server, repl_distributor, which allows communication between the Distributor and Publisher. The login distributor_admin is associated with this remote server and must have a valid password. For more information, see Securing the Distributor.

The following error message is raised: '%s' must be a valid Windows Login in the form : 'MACHINE\Login' or 'DOMAIN\Login'. Please see the documentation for '%s'.

Ensure that a valid Microsoft Windows account is specified for each replication agent. For more information, see MSSQL_ENG021797.

The following error message is raised: The '%s' agent job must be added via '%s' before continuing. Please see the documentation for '%s'.

Ensure that the following agents are created before a transactional publication is created: the Log Reader Agent (for all transactional publications) and the Queue Reader Agent (for transactional publications that allow queued updating subscriptions). For more information, see MSSQL_ENG021798.

The following error message is raised: Failed to create a sub-directory under the replication working directory.(%ls)

Ensure that the correct path has been specified for the snapshot folder. If the subscription is initialized without a snapshot, ensure that the account under which the SQL Server service runs at the Publisher has sufficient permissions. For more information, see MSSQL_ENG021330.

The following error message is raised: Failed to copy user script file to the Distributor.(%ls)

Ensure that the correct path has been specified for the snapshot folder. If the subscription is initialized without a snapshot, ensure that the account under which the SQL Server service runs at the Publisher has sufficient permissions. For more information, see MSSQL_ENG021331.

The following error message is raised: An error occurred during decryption.

This is a general SQL Server error that can occur if you have used a tool other than SQL Server Management Studio (such as the Services snap-in) to change the account under which SQL Server runs. You should use one of the following approaches to revert to the original account, and then change to the new account in Management Studio:

  • Restore the service master key associated with the original account from a backup using the RESTORE SERVICE MASTER KEY command. For more information, see RESTORE SERVICE MASTER KEY (Transact-SQL).

  • Regenerate the service master key associated with the original account using the ALTER SERVICE MASTER KEY command. For more information, see ALTER SERVICE MASTER KEY (Transact-SQL).

  • Change the account back to the original account using the Services snap-in or another tool.

See Also

Concepts