3

I am trying to set up replication using SQL Server 2017 Developer edition. The publisher, distributor, and subscriber are all local. I have been (faithfully) following the tutorial here:

https://learn.microsoft.com/en-us/sql/relational-databases/replication/tutorial-replicating-data-between-continuously-connected-servers?view=sql-server-2017

In the section "Configure the publisher for transactional replication" after completing step 13 and clicking "Finish", which should create the initial snapshot for replication, the New Publication Wizard reports there was an Error Creating Publication 'AdvWorksProductTrans'. The message is clickable and launches a dialog that reads as follows:

SQL Server could not create publication 'AdvWorksProductTrans'.

Additional information:

-> An exception occurred while executing a Transact-SQL statement or batch.

(Microsoft.SqlServer.ConnectionInfo)

-> The current transaction cannot be committed and cannot support operations that write to the log file. Roll back the transaction.

     The current transaction cannot be committed and cannot be rolled back to a savepoint. Roll back the entire transaction.

     Changed database context to 'AdventureWorks2012'. (Microsoft SQL Server, Error: 50000)

Any help will be greatly appreciated. Thanks!

Jacob H
  • 2,455
  • 1
  • 12
  • 29
Inversus
  • 3,125
  • 4
  • 32
  • 37
  • 1
    I don't understand why someone would vote to close this.. it's a perfectly cromulent question – Inversus Jul 03 '18 at 19:19
  • 1
    Just to rule out this being a security issue you may want to re-run the setup setting the log reader agent and snapshot agent to "Run Under Sql Server Agent account..." in steps 11 and 12. – Ross Bush Jul 03 '18 at 19:58
  • @RossBush Thanks for the help! I made the changes you suggested and it works. So there is some error in configuration of the windows accounts.? The article mentions to not do this going forward so I have to figure out how to get it working with the windows auth.. Your suggestion points to the issue, but I'm not sure what the next steps are... any thoughts? – Inversus Jul 03 '18 at 21:07
  • The snapshot agent will need access to the snapshot directory as well as to all articles you replicate. The log reader needs similar access, however, I don't think the log reader uses the snapshot directory. Also, you might want to stick with UNC paths when specifying a network folder. I had a problem with a mapped drive in the past and have always used UNC file paths. – Ross Bush Jul 04 '18 at 13:29

0 Answers0