Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

SQL Server transactional replication error 'The process could not execute 'sp_MSadd_replcmds'

$
0
0

This is for SQL Server 2012 transactional replication using a backup for initialization. I start by creating the publication without a snapshot and then go to the properties to allow initialization from backup files. I then backup/restore. I then create the subscription with the following:

EXEC sp_addsubscription
@publication = N'<publication name>',
@subscriber = N'<Servername>',
@destination_db = N'<dbname>',
@article = N'all', 
@sync_type = N'initialize with backup',
@backupdevicetype='Disk',
@backupdevicename= N'\\backup_device',
@subscription_type = N'push',
@update_mode = N'read only'
GO

And it fails. I have added verbose logging and I get the following from the log:

2016-08-01 09:58:21.317 OLE DB DISTOLE '<servername>': sp_MSget_last_transaction @publisher_id = 0, @publisher_db = N'<dbname>', @for_truncate = 0x1
2016-08-01 09:58:21.319 Publisher: {call sp_repldone ( 0x002cd57a00002f39000b, 0x002cd57a00002f39000b, 0, 0)}
2016-08-01 09:58:21.321 Publisher: {call sp_replcmds (500, 0, 0, , 0, 500000)}
2016-08-01 09:58:21.324 I~0x002cd57a000042560006~1: 0xffffffb3002cd57a0000425600010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
2016-08-01 09:58:21.326 O~4~73: 0x002cd57a00003fe60001002cd57a00004256000600017b9b000000014000003600000e000000000000000000000000000000000000000000000000ffffffb3002cd57a000042560001000000000000000000000000000000000000000000000000000000
2016-08-01 09:58:21.328 Status: 0, code: 1007, text: 'The process could not execute 'sp_MSadd_replcmds' on 'databasename'.'.
2016-08-01 09:58:21.330 The process could not execute 'sp_MSadd_replcmds' on 'databasename'.
2016-08-01 09:58:21.331 Status: 0, code: 1007, text: 'Conversion failed when converting the nvarchar value '.' to data type int.'.
2016-08-01 09:58:21.334 Status: 4, code: 6001, text: 'Background thread for 'Command Loader' is exiting.'.
2016-08-01 09:58:21.337 Status: 0, code: 22020, text: 'Batches were not committed to the Distributor.'.
2016-08-01 09:58:21.340 Status: 0, code: 22037, text: 'The last step did not log any message!'.
2016-08-01 09:58:21.344 Disconnecting from OLE DB DISTOLE 'databasename'

It does not mention what table is having a problem going to the distributor, does anyone have an idea what the issue may be?


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>