Show TOC

rs_helpobjfstringLocate this document in the navigation structure

Displays the parameters and function-string text for target scope function strings.

Syntax
rs_helpobjfstring <data_server>, <database>, <[owner.]object_name>[, <function_name]>
Parameters
<data_server>

Specifies the replicate or standby data server the target-scope function string is for.

<database>
Specifies the replicate or standby database the target-scope function string is for.
[owner.]object_name

The table or stored procedure to view customized function strings. Specify the owner if the table has a owner.

function_name

A string of characters that corresponds to a function name that you must enter in full. For example, if the function name is rs_writetext, do not enter "rs_write."

Examples
Example 1
Suppose you create a target-scope function string for the upd_datetime stored procedure:
create function string upd_datetime.upd_datetime
     for database NY_DS.rdb1
     with overwrite
          output language
          'update datetime set
          row_num = ?row_num!param?,
          datecol = ?datecol!param?,
          timecol = ?timecol!param?,
          ndatecol = ?ndatecol!param?,
          ntimecol = ?ntimecol!param?,
          comment = ?comment!param?
          where
          row_num = ?row_num!param?'
If you enter:
  • rs_helpobjfstring NY_DS,rdb1,upd_datetime
    or
  • rs_helpobjfstring NY_DS,rdb1,upd_datetime,upd_datetime
You see:
Function String information for Target Object: 'upd_datetime'.

Object Name     Object Type        Function Name   
-----------     -----------        --------------  
upd_datetime    stored procedure   upd_datetime    

Function String Name   Output Type Option       System Generated
--------------------   -------------------      -----------------
upd_datetime           language not applicable  no


         --- Beginning of Function String Text ---

FString Text
-----------------------------------------------------------------
 update datetime set
         row_num = ?row_num!param?,
         datecol = ?datecol!param?,
         timecol = ?timecol!param?,
         ndatecol = ?ndatecol!param?,
         ntimecol = ?ntimecol!param?,
         comment = ?comment!param?
         where
         row_num = ?row_num!param?

         --- End of Function String Text ---


(return status = 0)
Example 2

Creates a target-scope function string for the dbo table:

create function string dbo.datetime.rs_insert
     for database NY_DS.rdb1
     with overwrite
     output language
     'insert datetime values (
             ?row_num!new? ,
             ?datecol!new? ,
             ?timecol!new? ,
             ?ndatecol!new? ,
             ?ntimecol!new? ,
             ?comment!new?)
       update fn_monitor set insert_count = insert_count + 1'
If you enter:
rs_helpobjfstring NY_DS,rdb1,'dbo.datetime',rs_insert
You see:
Function String information for Target Object: 'dbo.datetime'.

Object Name       Object Type   Function Name   
-------------     -----------   --------------  
datetime          table         rs_insert       


Function String Name   Output Type Option        System Generated
--------------------   -------------------       ----------------
rs_insert              language not applicable   no


         
         --- Beginning of Function String Text ---

FString Text
-----------------------------------------------------------------
	 insert datetime values (
                         ?row_num!new? ,
			             ?datecol!new? ,
	                     ?timecol!new? ,
	                     ?ndatecol!new? ,
	                     ?ntimecol!new? ,
	                     ?comment!new?)
		                 update fn_monitor 
                         set insert_count = 
                         insert_count + 1

        --- End of Function String Text --- 
(return status = 0)
In this example, the object name in the create function string command includes the table owner dbo.
Note The dbo.datetime must be quoted.
If you omit the table owner when you create the function string, and then enter:
rs_helpobjfstring NY_DS,rdb1,datetime,rs_insert
You see:
Target Object 'datetime' does not have customized function string.
(return status = -1 
Example 3
Creates a target-scope function string for the dbo.tbl1 table:
create function string dbo.tbl1.rs_writetext; unitext_fld1 for NY_DS.rdb1
        output RPC
        'exec update_repl_unitext
                @p_key       = ?p_key!new?,
                @unitext_fld       = ?unitext_fld1!new?,
                @last_chunk         = ?rs_last_text_chunk!sys?'
If you enter:
rs_helpobjfstring NY_DS,rdb1,'dbo.tbl1',rs_writetext
You see:
Function String information for Target Object: 'dbo.tbl1'.

Object Name        Object Type    Function Name   
-------------      -----------    --------------  
tbl1               table          rs_writetext

Function String Name     Output Type Option    System Generated
----------------------   -------------------   ----------------
unitext_fld1             RPC  not applicable   no

         --- Beginning of Function String Text ---
 
 FString Text
 -----------------------------------------------------------------
        exec update_repl_unitext
             @p_key = ?p_key!new?,
             @unitext_fld = ?unitext_fld1!new?,
             @last_chunk = ?rs_last_text_chunk!sys?

         --- End of Function String Text ---


(return status = 0)
Example 4
Suppose you create a target-scope function string for the dbo.tbl1 table:
create function string dbo.tbl1.rs_datarow_for_writetext
for NY_DS.rdb1
        output RPC
        'exec update_txtimg_stat
                @p_key       = ?p_key!new?,
                @txtfld_stat = ?unitext_fld1!text_status?'
If you enter:
rs_helpobjfstring NY_DS,rdb1,'dbo.tbl1',rs_datarow_for_writetext
You see:
Function String information for Target Object: 'dbo.tbl1'.

Object Name         Object Type    Function Name   
-------------       -----------    --------------  
tbl1                table          rs_datarow_for_writetext

Function String Name      Output Type Option     System Generated
--------------------      ------------------     ----------------
rs_datarow_for_writetext  RPC not applicable     no


         --- Beginning of Function String Text ---
 
 FString Text
 ----------------------------------------------------------------
 exec update_txtimg_stat
                @p_key = ?p_key!new?,
                @txtfld_stat = ?unitext_fld1!text_status?


         --- End of Function String Text ---


(return status = 0)
If you enter:
rs_helpobjfstring NY_DS,rdb1,'dbo.tbl1'
You see the function string information for both:
  • rs_helpobjfstring NY_DS,rdb1,'dbo.tbl1',rs_datarow_for_writetext
    from this example, and
  • rs_helpobjfstring NY_DS,rdb1,'dbo.tbl1',rs_writetext
    from Example 3
Usage
  • If you do not supply a <function_name>, rs_helpobjfstring displays all function strings of the object.

  • If you supply a <function_name>, rs_helpobjfstring displays function strings that match <function_name>, such as rs_insert, rs_delete, rs_update, and rs_select, or a user-defined function.

  • System-generated default function strings have no function-string text stored in the RSSD. For these function strings, rs_helpobjfstring shows “System-Supplied Transact-SQL Statement”.