System Functions with Function-String-Class Scope

Replication Server provides several system functions with function-string-class scope.

Replication Server provides default generated function strings for each system-provided class when you install the replication system.

Some functions are required for every Replication Server application, while other functions only apply in particular cases, such as warm standby applications, parallel DSI threads, or coordinated dumps.

If you use a function-string class other than the default (rs_sqlserver_function_class), and you are not using function-string inheritance, you must create a function-string for each system function you use that has function-string class scope.

Customize function strings for system functions with class scope at the Replication Server that is the primary site for the function-string class. You may also need to assign or change the primary site from one Replication Server to another for a function-string class.

System Functions with Function-String-Class Scope

Function Name

Description

rs_batch_start

Specify the SQL statements required in addition to the rs_begin statements to mark the beginning of a batch of commands.

rs_batch_end

Specify the SQL statements required to mark the end of a batch of commands. This function string is used with rs_batch_start.

rs_begin

Begin a transaction.

rs_check_repl

Check if a table is marked for replication.

rs_commit

Commit a transaction.

rs_dumpdb

Initiate a coordinated database dump.

rs_dumptran

Initiate a coordinated transaction dump.

rs_get_charset

Return the character set used by a data server.

rs_get_lastcommit

Retrieve rows from the rs_lastcommit system table.

rs_get_sortorder

Return the sort order used by a data server.

rs_get_thread_seq

Return the current sequence number for the specified entry in the rs_threads system table. This function is executed only when you are using parallel DSI.

rs_get_thread_seq_noholdlock

Return the current sequence number for the specified entry in the rs_threads system table, using the noholdlock option. This thread is used when dsi_isolation_level is 3.

rs_initialize_threads

Set the sequence of each entry in the rs_threads system table to 0. This function is executed only when you are using parallel DSI.

rs_marker

Help coordinate subscription materialization. The function passes its first parameter to Replication Server as an independent command.

rs_non_blocking_commit

Coordinates Replication Server non-blocking commit with the corresponding function in the replicate data server.

Maps to the set delayed_commit on function string in Adaptive Server 15.0 and later, and with the alter session set commit_write = nowait; function string in Oracle 10g v2. For all other non-Sybase databases, rs_non_blocking_commit maps to null.

Executes every time DSI connects to the replicate data server and if the dsi_non_blocking_commit value is from 1 to 60. If the value of dsi_non_blocking_commit is zero, rs_non_blocking_commit does not execute.

rs_non_blocking_commit_flush

Ensures that database transactions are flushed to disk when dsi_non_blocking_commit is enabled.

Maps to the corresponding function string in Adaptive Server 15.0 and later, and Oracle 10g v2 and later. For all other non-Sybase databases, rs_non_blocking_commit_flush maps to null.

rs_non_blocking_commit_flush executes at intervals equal to any number of minutes from 1 to 60 that you specify with dsi_non_blocking_commit. rs_non_blocking_commit_flush does not execute if the value of dsi_non_blocking_commit is zero.

rs_raw_object_serialization

Replicate Java columns as serialized data.

rs_repl_off

Set replication off in Adaptive Server for a standby database connection.

rs_repl_on

Set replication on in Adaptive Server for a standby database connection.

rs_rollback

Roll back a transaction.

rs_set_ciphertext

Turn on set ciphertext on, which enables replication of encrypted columns for rs_default_function_class and rs_sqlserver_function_class. For all other classes, this function is set to null.

rs_set_isolation_level

Passes the isolation level for transaction to replicate data server.

rs_set_dml_on_computed

Is applied at the replicate database DSI when a connection is established. It issues the command set dml_on_computed “on” after the use database statement

rs_set_proxy

Assume the permissions, login name, and server user ID of the user.

rs_set_quoted_identifiers

Sets the DSI connection to the data server to allow quoted identifiers to be sent through the connection.

Pre-requisites: dsi_quoted_identifier must be set to “on” and rs_set_quoted_identifier must contain the necessary commands to enable the use of quoted identifiers for the data server. For Adaptive Server and Microsoft SQL Server the command is: set quoted_identifiers on.

rs_thread_check_lock

Determines whether or not the DSI executor thread is holding a lock that blocks a replicate database process.

rs_triggers_reset

Set triggers off in Adaptive Server for a standby database connection.

rs_trunc_reset

Reset the secondary truncation point in warm standby databases. This function is executed only when you create a warm standby database or when you switch to a standby database.

rs_trunc_set

Set the secondary truncation point in warm standby databases. This function is executed only when you create a warm standby database or when you switch to a standby database.

rs_update_threads

Update the sequence number for the specified entry in the rs_threads table. This function is executed only when you are using parallel DSI.

rs_usedb

Change the database context.

Related concepts
Change the Primary Site for a Function-String Class