Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Replication Snapshot Errors Caused By Compatibility Level Setting

I ran across an interesting replication error recently that's worth sharing. It happened while using a distributor running SQL 2008, a publisher running SQL 2005, and the published database set to 2000 (80) compatibility. When adding a new subscription (version and compatibility of subscriber are irrelevant) the snapshot agent failed with the following error (extra details omitted for readability):

Error messages:
Source: Microsoft.SqlServer.Smo

Message: Script failed for Table 'dbo.Template_HeaderFooter'.

Message: Column HeaderFooter_Value in object Template_HeaderFooter contains type NVarCharMax, which is not supported in the target server version, SQL Server 2000.

The distributor was recently upgraded from SQL 2005 where this wasn't a problem. A quick search of Microsoft's KB turned up nothing on the error. After some tinkering I was able to figure out a workaround: change the compatibility level of the published DB to 2005 (90). While this works, it's less than ideal if your DB is already live because you may break code by changing the compatibility level.

Unfortunately I haven't found any other workarounds to the problem so if this is happening to you your best bet is to pick a time when no one is using the DB, change the compatibility level, take your snapshot, then change the compatibility level back. Of course an even better strategy is to work with your development teams to get the DB moved up to 2005 compatibility permanently.

Comments

No comments.

Leave a Comment

Please register or log in to leave a comment.