Function ‘rs_get_textptr’ for ‘sometable’ returned no rows,  table example:-

create table test_tab( cola int not null, colb_txt text null)

This occurs with columns containing text columns.  The problem is you forgot sp_setrepcol.  The default for text/image is always replicate and so not null is assumed.  So you need to run sp_setrepcol to set the status to ‘replicate_if_changed’ and then add the same clause to your repdef

create replication definition test_tab_repdef
with primary at PDS.PDB
with all tables named ‘test_tab’
cola int,
colb_txt text
replicate_if_changed (colb_txt)

— in the Primary database

sp_setrepcol test_tab, colb_txt, replicate_if_changed


Function ‘rs_get_textptr’ for ‘table_name’ returned multiple rows.

When Replicating text or image data in the SRS, the replicated data is applied to the replicate dataserver in 2 passes.

  1. First the SRS inserts or updates all of the non-text/image data in the replicate dataserver.
  2. Then, it selects the row back that it just inserted to get the text pointer of where to insert the text/image data to the replicate. Once it gets the text pointer, it applies the text data via a writetext command with the retrieved text pointer.

If the non-text column data value is not unique, or does not have a unique index on it, then when the SRS selects the changed row back to find the text pointer, it is possible that the select statement returns more than one row.

Replication cannot proceed because the SRS cannot retrieve a single text pointer on where to insert the changed text data.

This error essentially indicates that you are trying to insert a duplicate row (except for the text/image data) in the replicate.


To resolve this issue you, will need to create a unique index on the primary and replicate table on a column that is not the text/image column. Once you receive the error 5150, you will need to resume the connection with the ‘skip transaction’ option.

Leave a Reply

Your email address will not be published. Required fields are marked *