Chapter 8: Setting Up the DirectConnect TDS Driver  Connecting to the data source

Chapter 8: Setting Up the DirectConnect TDS Driver

Configuring the data source

StepsTo configure a DirectConnect for z/OS data source

  1. Start the ODBC Administrator by selecting the TDS icon from the Windows control panel.

  2. Do one of the following:

  3. Specify values for the data source using the information in the following table.

    Table 8-1: Required data source configuration properties

    Property

    Description

    DataSourceName

    A string that identifies this DirectConnect data source configuration in the ODBC.ini file. Examples include “Accounting” or “Sys11-Serv1.”

    Description

    An optional long description of a data source name. Examples include “My Accounting Database” or “DB2 via region DWS1.”

    ServerName

    The name of the DirectConnect server.

  4. Specify values for any optional properties that you require. The properties are listed in the following table.

    Table 8-2: Optional data source configuration properties

    Property

    Description

    ServerList

    The list of servers that appear in the logon dialog box. Use commas to separate the server names.

    DatabaseName

    The name of the database to which you want to connect by default. If you do not specify a value, the default is the database defined for each user.

    DatabaseList

    The databases that appear in the logon dialog box. Use commas to separate the database names.

    DefaultLogonID

    The default logon ID used to connect to DB2. This ID is case sensitive. A logon ID is required only if security is enabled for the database to which you are connecting. Your ODBC application can override this value, or you can override this value in the logon dialog box or the connection string.

    InterfacesFile

    The path name of the interfaces file. The default is the normal Sybase interfaces file.

    Initialization String

    A string of commands that execute when the data source connection initializes. Use semicolons to separate multiple commands.

    ModifySQL Statement

    An instruction to the driver to convert a single- or two-part table name to a three-part format for create table SQL statements. Valid values are:

    • 0 instructs the driver to treat all SQL statements as being in Passthrough transformation mode and to not modify them.

    • 1 instructs the driver to modify the SQL statements, including convert table names to three-part format and change NULL and NOT NULL statements.

    Password Encryption

    A number that determines whether password encryption can be performed from the Open Client Library to the server. Valid values are:

    • 0 prevents encryption from being performed.

    • 1 allows encryption to be performed.

    Charset

    The name of a character set corresponding to a subdirectory in Sybase_root\charsets. The default is the setting on the DirectConnect server.

    WorkstationID

    The workstation ID used by the client.

    Language

    The national language corresponding to a subdirectory in Sybase_root\locales. The default is U.S. English.

    ApplicationName

    The name used by the DirectConnect Server to identify your application.

    YieldProc

    A numeric value that determines whether you can work in other applications when the DirectConnect server is busy. Valid values are:

    • 0 (peek and dispatch) causes the driver to check the Microsoft Windows message queue and send any messages to the appropriate application.

    • 1 (no yielding; the default) prevents you from working in other applications.

    • 3 (dispatch via Windows Yield function) gives control to the Windows kernel, which checks the message queue and sends messages to the appropriate applications.

    Sybase recommends that you use value 1.

    OptimizePrepare

    A value that determines whether stored procedures are created on the server for every call to SQLPrepare. Valid values are:

    • 0 causes stored procedures to be created for every call to SQLPrepare. This setting can decrease performance.

    • 1 causes the driver to create stored procedures only if the statement contains parameters. Otherwise, the statement is cached and executed directly at SQLExecute time. This is the initial default value.

    • 2 prevents the driver from creating stored procedures.

    ArraySize

    The number of rows the driver retrieves from the server for each fetch. This is not the number of rows given to the user. The default is 10 rows.

    SelectMethod

    A value that determines whether database cursors are used for select statements. Valid values are:

    • 0 allows database cursors to be used. This is the initial default. In some cases, performance degradation can occur when large numbers of sequential select statements execute because of the large amount of overhead associated with creating the cursors.

    • 1 allows select statements to execute directly without database cursors. The data source is limited to one active statement and one active connection.

    ReuseFailed Cursor

    A value that determines whether the server attempts to reuse a cursor that contains an error. Valid values are:

    • 0 causes the server to deallocate a cursor that contains an error and force the application to start over.

    • 1 causes the server to attempt to reuse a cursor containing an error. This is the default value.

    PacketSize

    A number that determines the number of bytes per network packet transferred from the database server to the client. The correct setting of this attribute can improve performance. Valid values are:

    • 0 directs the driver to use the default packet size as specified in the System 11 or DirectConnect Server configuration. This is the initial default configuration.

    • -1 directs the driver to compute the maximum allowable packet size on the first connect to the data source and save the value in the ODBC.ini file.

    • x (an integer from 1 to 10) directs the driver to set the packet size to x times 512 bytes. For example, a value of 6 sets the packet size at 6 times 512, or 3072 bytes.

    To use this connection attribute, you must configure the System 11 or DirectConnect server for a maximum network packet size greater than or equal to the value of this property.

    The ODBC specification specifies a connect option sql_packet_size that offers this same functionality. To avoid conflicts with applications that can set both the connection string attribute and the ODBC connect option, both functions are defined as mutually exclusive.

    If PacketSize is specified, you receive the message “Driver Not Capable” if you attempt to call sql_packet_size. If you do not set PacketSize, the driver accepts application calls to sql_packet_size.

    Translate

    An instruction that displays the Select Translator dialog box, from which you can perform a data translation from one character set to another. Choose the INTERSOLV OEM ANSI translator to translate data from the IBM PC character set to the ANSI character set.

  5. Choose OK to write these values to the ODBC.ini file.

    The values are now the default values when you connect to this data source.

  6. To change the values, do one of the following:





Copyright © 2005. Sybase Inc. All rights reserved. Connecting to the data source

View this book as PDF