Showing posts with label publication. Show all posts
Showing posts with label publication. Show all posts

Friday, March 30, 2012

Microsoft SQL Server 2005 RTM merge replication issues

We are trying to implement merge replication between 2 servers. Database size is around 11GB.

When I tried to create publication, snaphot agent is failing with following errror.

Error: 14151, Severity: 18, State: 1.
Replication-Replication Snapshot Subsystem: agent NBTENTSQL1X-PayDirectWeb-PayDirectPub-2 failed. The
replication agent had encountered an exception.
Source: Replication
Exception Type: Microsoft.SqlServer.Replication.ReplicationAgentSqlException
Exception Message: String or binary data would be truncated.
Cannot find the object 'MSmerge_sel_4D388

The table where the snapshot is breaking contains around 169 columns. Can someone please help me get through this error ?

Are you using vertical partitioning to replicate subset of the columns of the table? You may be hitting an known issue in Microsoft SQL Server 2005 where the list of column names for the table is longer than 4K and hence gets truncated in an internal proc.

|||

Thanks Sudarshan, your reply is very helpful. No we are not using vertical partitioning.

If this is a known issue, did Microsoft have any immediate fix for it or we have wait for SQL2K5 SP2 ?

|||Please wait for SQL2K5 SP2. You can install the latest CTPs availalbe and test out that your scenarios works. If not, please reply back and we can take a look further.|||This is a known issue in SQL2K5 SP1 which is fixed in SP2.|||Does the same limitation apply to the complexity of joined tables in the filter? I'm getting an error in the snapshot agent, saying:

String or

binary data would be truncated.

Cannot find

the object 'MSmerge_ctsv_2C675AF5938E4EA1B7D0DCFF9ECAD9EB', because it does not

exist or you do not have permission.

sp_MS_marksystemobject:

Invalid object name '[dbo].[MSmerge_upd_2C675AF5938E4EA1B7

But this only happens when I add too many joined tables to the filter section of the publication.

Dan

Microsoft SQL Server 2005 RTM merge replication issues

We are trying to implement merge replication between 2 servers. Database size is around 11GB.

When I tried to create publication, snaphot agent is failing with following errror.

Error: 14151, Severity: 18, State: 1.
Replication-Replication Snapshot Subsystem: agent NBTENTSQL1X-PayDirectWeb-PayDirectPub-2 failed. The
replication agent had encountered an exception.
Source: Replication
Exception Type: Microsoft.SqlServer.Replication.ReplicationAgentSqlException
Exception Message: String or binary data would be truncated.
Cannot find the object 'MSmerge_sel_4D388

The table where the snapshot is breaking contains around 169 columns. Can someone please help me get through this error ?

Are you using vertical partitioning to replicate subset of the columns of the table? You may be hitting an known issue in Microsoft SQL Server 2005 where the list of column names for the table is longer than 4K and hence gets truncated in an internal proc.

|||

Thanks Sudarshan, your reply is very helpful. No we are not using vertical partitioning.

If this is a known issue, did Microsoft have any immediate fix for it or we have wait for SQL2K5 SP2 ?

|||Please wait for SQL2K5 SP2. You can install the latest CTPs availalbe and test out that your scenarios works. If not, please reply back and we can take a look further.|||This is a known issue in SQL2K5 SP1 which is fixed in SP2.|||Does the same limitation apply to the complexity of joined tables in the filter? I'm getting an error in the snapshot agent, saying:

String or

binary data would be truncated.

Cannot find

the object 'MSmerge_ctsv_2C675AF5938E4EA1B7D0DCFF9ECAD9EB', because it does not

exist or you do not have permission.

sp_MS_marksystemobject:

Invalid object name '[dbo].[MSmerge_upd_2C675AF5938E4EA1B7

But this only happens when I add too many joined tables to the filter section of the publication.

Dan

Wednesday, March 7, 2012

Meta Data Cleanup For Merge Repl.

I am wondering specifically when the changes on the Publisher are cleaned
up. I have implemented merge replication with each publication having a
retention time (set in sp_addmergepublication) of 18 months and a
@.max_disretention (set in sp_adddistributiondb) also at 18 months. Also I
have a system where there is 1 Subscription PER Publication. The
Subscribers can be disconnected for long periods of time (I'm hoping for
less than 18 months). Now the changes on the Publisher will be stored on
the Distributor and will wait until a PULL Subscriber connects to Merge the
changes (changes made on both sides). From what I understand the merge
agent controls the meta data and will clean up the stored changes on the
distributor depending on the Retention period of the publication. So at
each merge agent run, anything older than 18 months that whether or not it
has been merged will be cleaned up (the max_disretention gets rid of changes
that have not been applied to subscribers too). Is this basically how the
cleanup of changes works?
When a connection is made I have a script that can be run to reinitialize a
subscription. It basically runs the merge agent, starts the snapshot agent,
sets the subscription to be reinitialized, and then runs the merge agent
again to apply the snapshot. Will Reinitializing a subscription clean up
the changes for a publication, kind of override the retention period?
Any ideas as to when the Change log (change info stored for a merge) is
cleaned up?
thanks,
Nate
Oops, the Distribution DB doesn't do anything during merge replication so
min_distretention and max_distretention don't apply. Just the Retention
period of the Publications. Can anyone confirm that the MetaData is only
cleaned up by the merge agent using the Retention period? And, that the
data is not cleaned up when a subscription is reinitialized?
thanks,
nate