Assigning 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:

NoteWhen you create a connection using a connection profile, the function string class is assigned by the connection profile.

See “Creating database connections” on page 171 and “Altering database connections” on page 174 in the Replication Server Administration Guide Volume 1 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.

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