Show TOC

rs_get_charsetLocate this document in the navigation structure

Returns the character set used by a data server. This function allows Replication Server to print a warning message if the character set is not what is expected.

Examples
Example 1

Creates an rs_get_charset function string with output language that calls the sp_serverinfo system procedure and returns the data server’s character set.

create function string rs_get_charset
 for rs_sqlserver2_function_class
 output language
 'sp_serverinfo server_csname'
Usage
  • rs_get_charset obtains the name of the character set used by a data server. The Replication Server executes this function each time it connects to the data server.

  • rs_get_charset has function-string class scope.

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

  • If you use a user-created base function-string class, you must create an rs_get_charset function string.

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

  • The default rs_get_charset function string for the <rs_sqlserver_function_class> and <rs_default_function_class> classes calls the Adaptive Server stored procedure sp_serverinfo with the argument< server_csname>.

  • The data server should return a string with the name of a valid SAP-supported character set. Valid SAP character sets are defined in the release directory in charsets/charset_name/charset.loc, where each <charset_name> represents the name of a supported character set. For example, the file charsets/iso_1/charset.loc defines the iso_1 character set.