|
REPLICATION |
| Replication Overview A best practice method of creating tables In SQL Server with identity’s is Not to use identity’s But if you must then design a database first! Design the db with primary key identity’s set to Yes but not for replication! This will save a lot of time down the road! In this example the parent database was NOT Originally set up for replication! Because of Operating System permissions associated with this replication you must make sure that a domain account can log in from either Box!
Without Identity keys Publication Box Expand the Replication Folder on the Server that
the database lies.
Welcome to the Wizard. Do not select advanced option! Select next Now select a distribution server. Usually you take the default on this one. Select next Selected by default - Yes, Configure the SQL Server Agent service to start automatically. Select next Specify Snapshot Folder Take default if possible, Otherwise point to your folder.
Subscriber Box Now Go to Subscribing box (usually a server). Open Enterprise manager. Right Click Replication - Select Pull Subscription. Find and select the Publishing server. Select the publication from that server you would like to subscribe too. Select next Select transaction type - There are 3 of them
Under Replication Monitor Now go back to the Publication Box and Reintialize the publication or all publications! Now Start the snap shot by selecting start agent! If you have selected Transactional this is as far as you need to go on this box. Back to the Sub
Concept |
| Case Summary: Distribution Agent not able to deliver initial snapshot and fails with
the error "SQL Server Could not start the distribution agent error:14262"
Case Resolution: - Changed the SQL Server agent startup account on the Subscriber to a Domain account that is setup as a SQL Sysadmin account - Setup the same account as a sysadmin on the Publisher - Shared the Replication folder and set this account with full control - Changed the Job owner for the Distribution Agent Job to this account Additional Information: Detailed steps to resolve the issue: - Transactional Replication with a Pull Subscription - Hard Drive on the Subscriber crashed so Subscriber SQL Server was re-installed. - On the Subscriber Setup a login for "NMAR\RepAxxxx" and set this to sysadmin role - Change the SQL Server Agent Startup account on the subscriber to "NMAR\RepAxxxx" - Stopped and re-started the SQL Agent - On the Publihser Setup a login for "NMAR\RepAxxxx" and set this to sysadmin role - Deleted the Subscription from the Publisher - Subscription still on the Subscriber so ran sp_removedbreplication to remove the subscription from the subscriber - Re- Created the Pull Subscription - Distribution agent giving the error "login failed for user nmar\administrator" - On the subscriber went to properties for the Subscription and selected the Synchronization tab. Selected Distribution Agent properties and changed the owner from "nmar\administrator" to "nmar\repaxxxx" - Now distribution agent runs and then stops - Customer is using a folder different than default for the snapshot and has specified drive letter - Created a share, on the Publisher, for the snapshot folder "\\nmarserver\repldata" and gave "NMAR\RepAxxxx" Full control on this - Changed the snapshot folder for the publication to the Share as following: 1. tools-->Replication-->"Configure Publishing, Subscribers..." 2. Select the Publication Tab and select the Publication and then select the elipses button 3. Did the same from the Publication Properties - Now the Distrib agent was failing with error "Incorrect path c:\repldata\unc" - Re-Initialized the Subscription but still the same error - Removed the Subscription from the Subscriber. Re- created it. In the snapshot delivery dialog changed the Snapshot folder - Replication worked without any problems - Agents Folder and Publications folders on the Publisher still had Red x's but none of the agents did - Re-Started SQL Server and the x's went away |