I'm initializing SQL Server replication from a backup, by following instructions from here:
...but, when I execute
USE MyDatabase
GO
EXEC sp_addsubscription
@publication = MyDatabasePublication,
@subscriber = 'AMAZONA-XXXXXXX',
@destination_db = MyDatabase,
@sync_type = 'initialize with backup',
@backupdevicetype ='disk',
@backupdevicename = 'D:\Temp\MyDatabasepublication.bak'
I get the following error:
Msg 8115, Level 16, State 2, Procedure sp_MSsetupnosyncsubscriptionwithlsn, Line 237
Arithmetic overflow error converting expression to data type nvarchar.
Any idea why, or at least where can I find this stored procedure to troubleshoot further?
SQL Server 2012, Standard Edition.
UPDATE: It looks like that the problem is caused by the fact that database was created using SQL Server 2008R2 and then attached here. Anyway, still need a solution for it.