Ask the Expert

Merge replication

If I use Merge Replication in SQL Server, which "Data Types" will be synchronizing? Is it possible to synchronize "Text" Data Type if I use Merge Replication?

    Requires Free Membership to View

Merge replication supports the replication of text and image columns only if they have explicitly been updated by an UPDATE statement. Using the WRITETEXT and UPDATETEXT operations alone will not propagate the change to other sites. If your application uses WRITETEXT and UPDATETEXT to update the text columns, then explicitly add an "UPDATE statement" after the text operations, within the same transaction, to guarantee that the change will be propagated to other sites.

For example, updating the review column of the employees table:

 BEGIN TRAN DECLARE @mytextptr varbinary(16) SELECT @mytextptr = TEXTPTR(review) FROM employees WHERE emp_id = '444-55-6666' IF @mytextptr IS NOT NULL UPDATETEXT @mytextptr 0 NULL 'Terrific job this review period ....' -- Use of Update to ensure that the text gets propagated to other Subscribers UPDATE employees SET review = review WHERE emp_id = '444-55-6666' COMMIT TRAN

I hope this example works well for you.


For More Information

This was first published in May 2001

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: