Tell me more ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm initializing SQL Server replication from a backup, by following instructions from here:

http://www.mssqltips.com/sqlservertip/2386/initialize-sql-server-replication-using-a-database-backup/

...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.

share|improve this question
consider migrating your question over to Database Administrators - they do have some decent MS SQL server people answering questions there. – syneticon-dj Apr 29 at 9:50
I'm guessing that cross version initialization from backup isn't supported, but I'm checking for you. – mrdenny Apr 29 at 12:54
So someone who has a similar configuration was able to test the config and it does work between SQL 2008 and SQL Server 2012. I'd recommend firing up profiler or an XEvent session on the subscriber and seeing what internal errors are being generated that aren't exposed. Might be useful info in there. – mrdenny Apr 29 at 15:37

migrated from serverfault.com Apr 29 at 12:37

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.