Show TOC

rs_initialize_threadsLocate this document in the navigation structure

Sets the sequence of each entry in the <rs_threads> system table to 0.

rs_initialize_threads @<rs_id>

A number from 1 through <dsi_num_threads>, representing the ID of the entry Replication Server will set to 0.

Example 1
Creates an rs_initialize_threads function string that executes a stored procedure named rs_initialize_threads. The text of the stored procedure is:
create procedure rs_initialize_threads
   @rs_id int
     delete from rs_threads where id = @rs_id
     insert into rs_threads values
       (@rs_id, 0,"", "", "", "")
create function string rs_initialize_threads
 for sqlserver_derived_class
 output language
 'execute rs_initialize_threads
   @rs_id = ?rs_id!param?'
  • rs_initialize_threads executes function when a connection is initialized. It is executed only when more than one DSI thread is defined for the connection. It sets the sequence number of each entry in the <rs_threads> system table to 0.

  • rs_initialize_threads has function-string-class scope.

  • Replication Server creates an initial rs_initialize_threads function string for the system-provided function-string classes during installation.

  • If you use a user-created base function-string class and you use the parallel DSI feature, create a function string for rs_initialize_threads.

  • Create or customize an rs_initialize_threads function string at the Replication Server that is the primary site for the class.