Use the using profile clause with the create connection command to create a connection between a non-ASE database and Adaptive Server using a connection profile.
Here is a portion of the create connection syntax that shows the using profile and display_only clauses:
create connection to data_server.database using profile connection_profile[;version] set username [to] user [other_create_connection_options]] [display_only]
Parameters:
connection_profile – provide the connection profile you want to use to configure a connection, modify the Replication Server System Database (RSSD), and build replicate database objects.
version – specify the particular version of a connection profile.
other_create_connection_options – use other_create_connection_options to set connection options not specified in the profile, such as setting your password, or to override options specified in the profile, such as specifying a custom function string class to override the function string class provided in Replication Server. See “create connection,” in Chapter 3, “Replication Server Commands” in the Replication Server Reference Manual for all the parameters you can use with create connection.
display_only – use with a connection profile to display but not execute commands and the servers where the commands would be executed. Use the client and Replication Server logs to see the results of using display_only.
Example 1 Creates a connection to an Oracle replicate database:
create connection to oracle.instance using profile rs_ase_to_oracle set username to ora_maint set password to ora_maint_pwd
Example 2 Creates a connection to a Microsoft SQL Server replicate database that is also a primary database. In this example, the command replaces any error class setting provided by the connection profile with another error class—my_msss_error_class:
create connection to msss_server.msss_db using profile rs_ase_to_msss set username to msss_maint set password to msss_maint_pwd set error class to my_msss_error_class with log transfer on
Example 3 Creates a connection to a DB2 replicate database using a specific version of the profile—v9_1. In this example, the command overrides the command batch size provided by the connection profile with a new value—16384:
create connection to db2.subsys using profile rs_ase_to_db2;v9_1 set username to db2_maint set password to db2_maint_pwd set dsi_cmd_batch_size to ‘16384’
Example 4 Use the display_only option to show the commands that will be executed if you use a particular profile. The commands and the command output display on your screen and are also written to the Replication Server log:
create connection to oracle.instance using profile rs_ase_to_oracle set username to ora_maint set password to ora_maint_pwd display_only
go