Configuring the Adapter for Sybase

In this section:

x x

Configuring the adapter consists of specifying connection and authentication information for each of the connections you want to establish.


Top of page

x
Declaring Connection Attributes

How to:

Reference:

In order to connect to the Sybase database server, the adapter requires connection and authentication information. You supply this information using the SET CONNECTION_ATTRIBUTES command. You can:

You can declare connections to more than one Sybase database server by including multiple SET CONNECTION_ATTRIBUTES commands. The actual connection to the Sybase Server takes place when the first query that references the connection is issued. If you issue multiple SET CONNECTION_ATTRIBUTES commands:



x
Procedure: How to Declare Connection Attributes

You can configure the adapter from either the Web Console or the Data Management Console.

  1. From the Web Console menu bar, click Adapters

    or

    from the Data Management Console, expand the Adapters folder.

    The Adapters folder opens.

  2. Expand the Available folder, if it is not already expanded.
  3. Expand the appropriate group folder and the specific adapter folder. The group folder is described in the connection attributes reference.
  4. Right click the adapter name/version and select Configure.

    The Add Adapter to Configuration pane opens.

    If you are using a Sybase ASE database, click either OCS 15 to connect to the OCS client, which in turn connects to the 15 version of Sybase ASE, or click Sybase ASE 12.5 to connect to the older version of the database.

    If you are using a Sybase IQ database, click either OCS 15 to connect to the OCS client, which in turn connects to the 15 version of Sybase IQ, or click Sybase IQ 12.5 to connect to the older version of the database.

  5. Enter values for the parameters required by the adapter as described in the connection attributes reference.
  6. Click Configure. The configured adapter is added to the Adapters list in the navigation pane.


x
Reference: Connection Attributes for Sybase

The Sybase adapter is under the SQL group folder.

The following list describes the connection attributes for which you can supply values. To complete the attribute declaration, click the Configure button.

Server

Name of the Sybase server to access. It must match an entry in the Sybase interfaces file.

Security

There are two methods by which a user can be authenticated when connecting to a database server:

  • Explicit. The user ID and password are explicitly specified for each connection and passed to the database, at connection time, for authentication.
  • Password Passthru. The user ID and password received from the client application are passed to the database, at connection time, for authentication.
User

Primary authorization ID by which you are known to the data source.

Password

Password associated with the primary authorization ID.

Select profile

Select a profile from the drop-down menu to indicate the level of profile in which to store the CONNECTION_ATTRIBUTES command. The global profile, edasprof.prf, is the default.

If you wish to create a new profile, either a user profile (user.prf) or a group profile if available on your platform (using the appropriate naming convention), choose New Profile from the drop-down menu and enter a name in the Profile Name field (the extension is added automatically).

Store the connection attributes in the server profile (edasprof).



x
Syntax: How to Declare Connection Attributes Manually

Explicit authentication. The user ID and password are explicitly specified for each connection and passed to Sybase, at connection time, for authentication.

ENGINE SQLSYB SET CONNECTION_ATTRIBUTES server/userid,password

Password passthru authentication. The user ID and password are explicitly specified for each connection and passed to Sybase, at connection time, for authentication.

ENGINE SQLSYB SET CONNECTION_ATTRIBUTES server/

where:

SQLSYB

Indicates the adapter. You can omit this value if you previously issued the SET SQLENGINE command.

server

Is the name of the Sybase server you wish to access.

userid

Is the primary authorization ID by which you are known to Sybase.

password

Is the password associated with the primary authorization ID.



Example: Declaring Connection Attributes

The following SET CONNECTION_ATTRIBUTES command connects to the Sybase database server named SAMPLESERVER with an explicit user ID (MYUSER) and password (PASS). To ensure security, specify connection attributes from the Web Console, which encrypts the password before adding it to the server profile.

ENGINE SQLSYB SET CONNECTION_ATTRIBUTES SAMPLESERVER/MYUSER,PASS

The following SET CONNECTION_ATTRIBUTES command connects to the Sybase database server named SAMPLESERVER using Password Passthru authentication:

ENGINE SQLSYB SET CONNECTION_ATTRIBUTES SAMPLESERVER/

Top of page

x
Overriding the Default Connection

How to:

Once connections have been defined, the connection named in the first SET CONNECTION_ATTRIBUTES command serves as the default connection. You can override this default using the SET DEFAULT_CONNECTION command.



x
Syntax: How to Change the Default Connection
ENGINE SQLSYB SET DEFAULT_CONNECTION connection

where:

SQLSYB

Indicates the adapter. You can omit this value if you previously issued the SET SQLENGINE command.

connection

Is the connection defined in a previously issued SET CONNECTION_ATTRIBUTES command. If this name was not previously declared, the following message is issued:

FOC1671, Command out of sequence

Note:



Example: Selecting the Default Connection

The following SET DEFAULT_CONNECTION command selects the database server named SAMPLENAME as the default database server:

ENGINE SQLSYB SET DEFAULT_CONNECTION SAMPLENAME

Top of page

x
Controlling the Connection Scope

How to:

The SET AUTODISCONNECT command controls the persistence of connections when using the adapter for each of the connections you want to establish.



x
Syntax: How to Control the Connection Scope
ENGINE SQLSYB SET AUTODISCONNECT ON {FIN|COMMAND|COMMIT}

where:

SQLSYB

Indicates the adapter. You can omit this value if you previously issued the SET SQLENGINE command.

FIN

Disconnects automatically only after the session has been terminated. FIN is the default value.

COMMAND

Disconnects automatically after each request. Depending on how often the event occurs, the SET AUTODISCONNECT command may result in considerable overhead. Almost all of this overhead is not related to the server. It is related to the operating system and the data source.

COMMIT

Disconnects automatically only after COMMIT or ROLLBACK is issued as a native SQL command.


iWay Software