The rs_updatetext form of the applied subcommand supports the partial update of large object datatypes. Partial update lets you directly insert a character string or overwrite an existing character string of a table column without issuing delete and replace commands, as would happen in a full update.
{distribute | _ds} command_tags {applied | _ap} 'table'.rs_updatetext {partialupd | _pu} [{first | _fi}] [last] [{changed | _ch}] [with log] [{withouttp | _wo}] [{offset | _os}=offsetvalue {deletelen | _dln}=deletelength] [{textlen | _tl}=length] text_image_column
partialupd or _pu indicates that there is one segment of LOB data for partial update.
first or _fi marks the first segment of data for the LOB column.
last marks the last segment of data for the LOB column.
changed or _ch indicates that the LOB column changed value. Omit the changed keyword if the LOB value did not change. The minimal columns feature uses this flag to discard data after Replication Server determines it is not needed.
with log indicates that the modification is logged at the primary database transaction log. with log is required only in the first segment of the LOB data.
withouttp or wo indicates that the datatype is an LOB datatype without a text pointer such as varchar(max), nvarchar(max), and varbinary(max).
offset or _os indicates the starting point in the value of LOB column at which the partial update is performed. offsetvalue is a zero-based integer and cannot be a negative number. offset is required only in the first partial update command.
deletelen or _dln indicates the length of the section in the LOB column, starting from offset, that is to be replaced. deletelength is a zero-based integer and cannot be a negative number. deletelen is required only in the first partial update command.
textlen or _tl indicates the length of the LOB data that is to be inserted into the LOB column. The value of textlen can be smaller than or equal to the the new length of the LOB column.
A partial update transaction that contains the commands begin transaction, rs_update, rs_updatetext, and commit transaction:
distribute @origin_qid=~,A{0x}0000000036e 800000011000700000007000036e8000000110001000000100002, @origin_time=~*620080317 18:01:40:653,@tran_id=~,; {0x}72616d6c696e647361792e6d7332303035766d31000486020 000 begin transaction for ~"(qafuser osid 52 distribute @origin_qid=~,A{0x}0000000036e 800000011000700000008000036e8000000110001000000100002, @origin_time=NULL,@tran_id=~,;{0x}72616d6c696e6473617 92e6d7332303035766d31000486020000 applied owner=~"$dbo ~"+qaf_oldlob.rs_update yielding before ~$%pkey=1,~$)text_col=hastext always_rep ,~$*ntext_col=hastext always_rep ,~$*image_col=hastext always_rep _isbinary after distribute @origin_qid=~,A{0x}0000000036e 800000011000700000009000036e8000000110001000000100002, @origin_time=~*620080317 18:01:40:653,@tran_id=~,; {0x}72616d6c696e647361792e6d7332303035766d31000486020 000 applied owner=~"$dbo ~"+qaf_oldlob.rs_updatetext partialupd first last changed with log offset=10 deletelen=10 textlen=20~$*ntext_col=~8!!5 {0x}0062006200620062006200620062006200620062 distribute @origin_qid=~,A{0x}0000000036e 80000001100080000000a000036e8000000110001000000100002, @origin_time=NULL,@tran_id=~,;{0x}72616d6c696e6473617 92e6d7332303035766d31000486020000 commit transaction
rs_updatetext does not support multiple character set conversion.
Partial update support is restricted to Microsoft SQL Server 2005.