Assign a Function-String Class to a Database

You can assign a function-string class to a database connection in Sybase Central or with the create connection or alter connection commands, executed in the Replication Server that manages the database.

When you add a database connection using the rs_init program, the class rs_sqlserver_function_class is assigned to the database by default.

You must suspend the connection to the database before you alter the function-string class that is assigned to the database. The set function string class clause of create connection and alter connection specifies the name of the function-string class to use with the database.

Before you can assign a function-string class to a database connection:
Note: When you create a connection using a connection profile, the function string class is assigned by the connection profile.

See Replication Server Administration Guide Volume 1 > Manage Database Connections > Create Database Connections and Replication Server Administration Guide Volume 1 > Manage Database Connections > Altering Database Connections for more information about using the create connection and alter connection commands, and connection profiles. Also refer to reference pages for these commands in the Replication Server Reference Manual > Replication Server Commands.

Refer to the Replication Server installation and configuration guides for your platform for more information about rs_init.

Example for Creating New Connection

The following command creates a connection to the pubs2 database managed by the TOKYO_DS data server:
create connection to TOKYO_DS.pubs2
 set error class tokyo_error_class
 set function string class tokyo_func_class
 set username pubs2_maint
 set password pubs2_maint_pw

This command assigns the tokyo_func_class function-string class to the database connection.

Example for Altering an Existing Connection

The following command alters an existing database connection to specify a different function-string class:
alter connection to TOKYO_DS.pubs2
 set function string class tokyo_func_class2
Related concepts
Create Function Strings
Related tasks
Creating a Function-String Class