In the UNIX environment, the ODBC driver allows you to establish a centralized ODBC system information file that you can control. To do so, set the environment variable ODBCINI by executing the DirectConnect environment script to point to the qualified path name of the centralized file, provided by DirectConnect install. For example:
For C shell:
DC_SYBASE.csh
For Bourne or Korn shell:
DC_SYBASE.sh
Executing the script sets ODBCINI to $SYBASE/$SYBASE_ECON/odbcini.
Remember, there must be an [ODBC] section in the system information file that includes the InstallDir keyword. Be sure that the keyword value is the path to the directory $SYBASE/$SYBASE_ECON.
To create and configure data source entries for DRDA, edit the odbc.ini file using the attributes in each of these categories, or sections:
General, which defines connectivity parameters
Advanced, which contains optional fields that affect performance and use of resources
Bind, which defines parameters for package creation in the DB2 system
Each of these sections is delimited with comments.
As you edit the odbc.ini file, be sure you have the following parameters available on your worksheet. For all others, you can accept the default or provide a value appropriate for your site.
The following table contains the General parameters; the required parameters are indicated by an asterisk (*).
After entering these parameters, use the odbct tool (see Chapter 10, “Troubleshooting,”) to test connectivity to the DirectConnect for DB2 UDB source.
The default values for the Advanced parameters described in the following table should be sufficient for most DirectConnect for DB2 UDB installations.
The following table contains the Bind parameters, with the required parameters, indicated by an asterisk (*).
For version 12.6, packages are created automatically on the initial connection to the DB2 UDB server. The Bind utility is only needed to modify the package settings.
Use the bind20 utility included in the bin subdirectory to create packages. The bind20 utility will use the bind options defined in your DRDA DSN to configure the package and grant proper ownership. The bind20 syntax is:
bind20 db2-dsn
The utility will prompt for a DB2 user ID and password, create the packages, and then report a final status.
A separate package is not needed for each DirectConnect for DRDA access service; however, if an access service has different characteristics in its parameters that suit it for a specific solution, you can create other packages for other solutions.
The following examples identify the DSN parameters required and used for DRDA to the following targets:
DB2 UDB on AS/400
DB2 UDB on z/OS
DB2 UDB on Windows
DB2 UDB on UNIX
Following is an example of the contents of an odbc.ini file for DB2 UDB AS/400, with comments added:
;; DB2 Driver for DB2 UDB AS/400 ;; ;; Use values from installation worksheet. ;; ;; Data Source Name [dcdb2udbas400] Driver=/sybase/DC-12_6/lib/MVdb220.so IPAddress= TcpPort= Location= Collection= SecurityMechanism=0
WorkArounds2=131072 ;; ;; Advanced options ;; AddStringToCreateTable= AlternateID= CatalogSchema= IsolationLevel=CURSOR_STABILITY CharsetFor65535=0 ReportCodePageConversionErrors=0 ApplicationUsingThreads=1 UseCurrentSchema=1 WithHold=1 ;; ;; Bind options - for DSNs used with bind20 utility ;; GrantExecute=1 GrantAuthid=PUBLIC DynamicSections=64 ;; ;; Optional Failover options ;; LoadBalancing=0 AlternateServers= ConnectionRetryCount=0 ConnectionRetryDelay=3
Following is an example of the contents of an odbc.ini file for DB2 UDB on z/OS, with comments added:
;; DB2 Driver to DB2 UDB z/OS ;; ;; Use values from installation worksheet. ;; ;; Data Source Name [dcdb2udbosz/OS] Driver=/sybase/DC-12_6/lib/MVdb220.so IPAddress= TcpPort= Location= Collection= SecurityMechanism=0
WorkArounds2=131072 ;; ;; Advanced options ;; AddStringToCreateTable= AlternateID= CatalogSchema= IsolationLevel=CURSOR_STABILITY CharsetFor65535=0 ReportCodePageConversionErrors=0 ApplicationUsingThreads=1 UseCurrentSchema=1 WithHold=1 ;; ;; Bind options - for DSNs used with bind20 utility ;; GrantExecute=1 GrantAuthid=PUBLIC DynamicSections=64 ;; ;; Optional Failover options ;; LoadBalancing=0 AlternateServers= ConnectionRetryCount=0 ConnectionRetryDelay=3
Following is an example of the contents of an odbc.ini file for the DB2 UDB for Windows, with comments added:
;; DB2 Driver for DB2 UDB Windows ;; ;; Use values from installation worksheet. ;; ;; Data Source Name [dcdb2udbwin] Driver=/sybase/DC-12_6/lib/MVdb220.so IPAddress= TcpPort= Database= SecurityMechanism=0 WorkArounds2=131072 ;; ;; Advanced options ;; AddStringToCreateTable= AlternateID= CatalogSchema= IsolationLevel=CURSOR_STABILITY CharsetFor65535=0 ReportCodePageConversionErrors=0 ApplicationUsingThreads=1 UseCurrentSchema=1 WithHold=1 ;; ;; Bind options - for DSNs used with bind20 utility ;; GrantExecute=1 GrantAuthid=PUBLIC DynamicSections=64 ;; ;; Optional Failover options ;; LoadBalancing=0 AlternateServers= ConnectionRetryCount=0 ConnectionRetryDelay=3
Following is an example of the contents of an odbc.ini file for DB2 UDB on UNIX, with informational comments added:
;; DB2 Driver to DB2 UDB UNIX ;; ;; Use values from installation worksheet. ;; ;; Data Source Name [dcdb2udbunix] Driver=/sybase/DC-12_6/lib/MVdb220.so IPAddress= TcpPort= Database= SecurityMechanism=0 WorkArounds2=131072 ;; ;; Advanced options ;; AddStringToCreateTable= AlternateID= CatalogSchema= IsolationLevel=CURSOR_STABILITY CharsetFor65535=0 ReportCodePageConversionErrors=0 ApplicationUsingThreads=1 UseCurrentSchema=1 WithHold=1 ;; ;; Bind options - for DSNs used with bind20 utility ;; GrantExecute=1 GrantAuthid=PUBLIC DynamicSections=64 ;; ;; Optional Failover options ;; LoadBalancing=0 AlternateServers= ConnectionRetryCount=0 ConnectionRetryDelay=3
Copyright © 2005. Sybase Inc. All rights reserved. |