Replication and TEXT fields

  • I want to subchronize to databases. There are some text fileds in somme tables. If I use transactional replication, the were some errors on initial snapshots and distribution. And some of the articles have advised not to replicate text fields.

    My question is:

    How to synchronize a table with text fields by using replication or other ways?

    Thanks

  • Actually you can replicate text fields using transactional replication, but because WRITETEXT and UPDATETEXT are by default not logged you might have to check your application. Another problem using text/image columns and transactional replication is that it doesn't allow updates of those columns on the subscriber. In case you need to maake updates on both sides, use merge replication.

    One more advise, depending on the size of your textcolumns you might have to adjust the "max text repl size" setting. The default is 64K.

    [font="Verdana"]Markus Bohse[/font]

  • 1. Do you mean that if my appplication did not use UPDATETEXT/WRITETEXT, all changes on text fileds can be replicated?

    2. If I set "max text repl size" to a large number to accept all my text size, can this solve my problem?

  • About 1) I meant that you have to check that your application uses these statements including the WITH LOG clause.

    2) This was just an advice in case you have text columns longer than 64K, that you need to change this setting in order to replicate them.

    Anyway which errors did you get exactly with your snapshot ?

    [font="Verdana"]Markus Bohse[/font]

  • The snapshot errors are:

    snapshot 1

    "snapshot task is suspicious. No response for 10 minutes"

    snapshot 2

    "Can't buck copy table [dbo].[syncobj_0x3945373643313242]"

    p.s. since I am using a Chinese ver. SQL server, so the original error messages are in Chinese. I just translated them into English.

  • cch,

    I've seen these messages lot's of times when initializing a replication with (large) text or image columns. Especially if you initialize over a slow WAN link you can expect to get them. Usually there's no real reason to worry. After some time SQL Server will start a retry and continue bulk copying the data at the point the it ended during the previous timeout.

    Unfortunately sometimes if your line is too slow and/or your tables are too big it can happen that the whole initialization finally fails and your subscriber DB is pratically worthless.

    The only other option is too create a subscription database locally, initalize this one, when copy the files on tape or CD and send them to the remote server. After placing the files on the remote server you can set replication without initalizing, which basically means you don't have to send the whole DB over the network.

    Hope this helps

    M

    [font="Verdana"]Markus Bohse[/font]

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply