SQL Server Replication

PUBLISHER
SQL Server Agent account must be running on publisher
Snapshot folder must be a UNC folder which is shared

SUBSCRIBER
Agent process account could be Subscriber Computer or Domain name \ User Name
Distributer connection and Publisher connection I used a SQL Authentication account which will already work for normal login

ERROR: On Subsciber
Msg 14058, Level 16, State 1, Procedure sp_addmergesubscription, Line 381
Cannot create the subscription because the subscription already exists in the subscription database. Only one subscription to the same publication is allowed in each subscription database. Drop the subscription and add it again if necessary. If the problem persists, replication metadata might be incorrect; see Books Online for troubleshooting information.

SOLUTION: On Publisher
SELECT * FROM sysmergesubscriptions
DELETE FROM sysmergesubscriptions WHERE subscriber_server = ‘ServerName’

ERROR: On Publisher
Unable to start execution of step 2 (reason: Error authenticating proxy ComputerName\UserName, system error: Logon failure: unknown user name or bad password.).  The step failed.

SOLUTION: On Publisher
Agent Security use a windows account. Password is the windows password for that account.
This account must have at least db_owner for the database being published.
It must also have write permissions on the publication folder.
http://msdn.microsoft.com/en-us/library/ms186515(v=SQL.105).aspx
STATUS: Should now have files on Publisher in Snapshot folder

ERROR: On Subsriber
the schema script ‘….sch’ could not be propagated to the subscriber
Go to subscriber view job history. Message in there may be above plus
‘The process could not read file ‘…\MSSQL\ReplData\unc\…’ due to OS error 3.

SOLUTION: On Publisher
Use a UNC path on the publication. To do this > Publisher > Publication > Right click properties > Snapshot > Put files in the following folder
Then use \\ server or computer name \ .. \ MSSQL \ReplData or which ever folder
Should now work

Advertisements

One Response to SQL Server Replication

  1. Pingback: How do I … work with Guid in ADO.Net? « Steve Shakespeare

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: