Datadirect Connect Odbc 71
Datadirect Connect Odbc 71
Release 7.1.6
Copyright
© 2022 Progress Software Corporation and/or one of its subsidiaries or affiliates. All
rights reserved.
®
These materials and all Progress software products are copyrighted and all rights are reserved by Progress
Software Corporation. The information in these materials is subject to change without notice, and Progress
Software Corporation assumes no responsibility for any errors that may appear therein. The references in these
materials to specific platforms supported are subject to change.
#1 Load Balancer in Price/Performance, 360 Central, 360 Vision, Chef, Chef (and design), Chef Habitat, Chef
Infra, Code Can (and design), Compliance at Velocity, Corticon, Corticon.js, DataDirect (and design), DataDirect
Cloud, DataDirect Connect, DataDirect Connect64, DataDirect XML Converters, DataDirect XQuery, DataRPM,
Defrag This, Deliver More Than Expected, DevReach (and design), Driving Network Visibility, Flowmon, Inspec,
Ipswitch, iMacros, K (stylized), Kemp, Kemp (and design), Kendo UI, Kinvey, LoadMaster, MessageWay,
MOVEit, NativeChat, OpenEdge, Powered by Chef, Powered by Progress, Progress, Progress Software
Developers Network, SequeLink, Sitefinity (and Design), Sitefinity, Sitefinity (and design), Sitefinity Insight,
SpeedScript, Stylized Design (Arrow/3D Box logo), Stylized Design (C Chef logo), Stylized Design of Samurai,
TeamPulse, Telerik, Telerik (and design), Test Studio, WebSpeed, WhatsConfigured, WhatsConnected,
WhatsUp, and WS_FTP are registered trademarks of Progress Software Corporation or one of its affiliates or
subsidiaries in the U.S. and/or other countries.
Analytics360, AppServer, BusinessEdge, Chef Automate, Chef Compliance, Chef Desktop, Chef Workstation,
Corticon Rules, Data Access, DataDirect Autonomous REST Connector, DataDirect Spy, DevCraft, Fiddler,
Fiddler Classic, Fiddler Everywhere, Fiddler Jam, FiddlerCap, FiddlerCore, FiddlerScript, Hybrid Data Pipeline,
iMail, InstaRelinker, JustAssembly, JustDecompile, JustMock, KendoReact, OpenAccess, PASOE, Pro2,
ProDataSet, Progress Results, Progress Software, ProVision, PSE Pro, Push Jobs, SafeSpaceVR, Sitefinity
Cloud, Sitefinity CMS, Sitefinity Digital Experience Cloud, Sitefinity Feather, Sitefinity Thunder, SmartBrowser,
SmartComponent, SmartDataBrowser, SmartDataObjects, SmartDataView, SmartDialog, SmartFolder,
SmartFrame, SmartObjects, SmartPanel, SmartQuery, SmartViewer, SmartWindow, Supermarket, SupportLink,
Unite UX, and WebClient are trademarks or service marks of Progress Software Corporation and/or its
subsidiaries or affiliates in the U.S. and other countries. Java is a registered trademark of Oracle and/or its
affiliates. Any other marks contained herein may be trademarks of their respective owners.
Please refer to the NOTICE.txt or Release Notes – Third-Party Acknowledgements file applicable to a particular
Progress product/hosted service offering release for any related required third-party acknowledgements.
Updated: 2022/05/16
Table of Contents
Advanced Features......................................................................................77
Using Failover.......................................................................................................................................78
Connection Failover...................................................................................................................78
Extended Connection Failover...................................................................................................80
Select Connection Failover........................................................................................................81
Guidelines for Primary and Alternate Servers............................................................................82
Using Client Load Balancing .....................................................................................................83
Using Connection Retry.............................................................................................................84
Summary of Failover-Related Options.......................................................................................84
Using Client Information........................................................................................................................87
How Databases Store Client Information...................................................................................87
Storing Client Information...........................................................................................................87
Using Security.......................................................................................................................................89
Authentication............................................................................................................................89
Data Encryption Across the Network.........................................................................................91
SSL Encryption..........................................................................................................................92
Using DataDirect Connection Pooling...................................................................................................97
Creating a Connection Pool.......................................................................................................98
Adding Connections to a Pool....................................................................................................98
Removing Connections from a Pool...........................................................................................99
Handling Dead Connections in a Pool.......................................................................................99
Connection Pool Statistics.......................................................................................................100
Summary of Pooling-Related Options......................................................................................100
Using DataDirect Bulk Load................................................................................................................101
Bulk Export and Load Methods................................................................................................102
Exporting Data from a Database..............................................................................................102
Bulk Loading to a Database.....................................................................................................104
The Bulk Load Configuration File.............................................................................................105
Sample Applications.................................................................................................................107
Character Set Conversions......................................................................................................108
External Overflow Files............................................................................................................108
Using Bulk Load for Single Inserts/Updates/Deletes (Salesforce Driver)................................108
Summary of Related options for DataDirect Bulk Load............................................................109
Using Bulk Load for Batch Inserts.......................................................................................................109
Determining the Bulk Load Protocol.........................................................................................110
Summary of Related Options for Bulk Load or Batch Inserts..................................................110
ODBCINI..................................................................................................................................112
ODBCINST...............................................................................................................................113
DD_INSTALLDIR......................................................................................................................113
The Test Loading Tool.........................................................................................................................114
Data Source Configuration..................................................................................................................114
Configuration Through the Administrator.................................................................................115
Configuration Through the System Information (odbc.ini) File.................................................117
The demoodbc Application.................................................................................................................132
The example Application.....................................................................................................................132
DSN-less Connections........................................................................................................................132
Sample odbcinst.ini File...........................................................................................................133
File Data Sources...............................................................................................................................136
UTF-16 Applications on UNIX and Linux............................................................................................137
Unicode Support......................................................................................................................435
Advanced Features..................................................................................................................435
User-defined Functions' Results..............................................................................................436
Persisting a Result Set as an XML Data File...........................................................................437
Isolation and Lock Levels Supported.......................................................................................437
SQL Support............................................................................................................................437
ODBC Conformance Level.......................................................................................................437
Number of Connections and Statements Supported................................................................438
Using Arrays of Parameters.....................................................................................................438
The Progress OpenEdge Wire Protocol Driver...................................................................................438
Driver Requirements................................................................................................................438
Configuring and Connecting to Data Sources..........................................................................438
Connection Option Descriptions for OpenEdge Wire Protocol................................................445
Performance Considerations....................................................................................................468
Data Types...............................................................................................................................469
Unicode Support......................................................................................................................470
Advanced Features..................................................................................................................470
Isolation and Lock Levels Supported.......................................................................................471
SQL Grammar Support............................................................................................................471
ODBC Conformance Level.......................................................................................................471
Number of Connections and Statements Supported................................................................471
The SQL Server Wire Protocol Driver.................................................................................................471
Driver Requirements................................................................................................................472
Configuring and Connecting to Data Sources..........................................................................472
Connection Option Descriptions for SQL Server Wire Protocol...............................................486
Performance Considerations....................................................................................................533
Data Types...............................................................................................................................534
Unicode Support......................................................................................................................535
Advanced Features..................................................................................................................536
Persisting a Result Set as an XML Data File...........................................................................539
Isolation and Lock Levels Supported.......................................................................................539
SQL Support............................................................................................................................540
ODBC Conformance Level.......................................................................................................540
Number of Connections and Statements Supported................................................................540
Using Arrays of Parameters.....................................................................................................540
Support for Azure Synapse Analytics and Analytics Platform System.....................................541
The Sybase Wire Protocol Driver........................................................................................................542
Driver Requirements................................................................................................................542
Configuring and Connecting to Data Sources..........................................................................543
Connection Option Descriptions for Sybase Wire Protocol......................................................558
Performance Considerations....................................................................................................607
Data Types...............................................................................................................................609
Unicode Support......................................................................................................................610
Advanced Features..................................................................................................................611
Performance Considerations....................................................................................................613
Unexpected Characters...........................................................................................................614
MTS Support............................................................................................................................615
NULL Values............................................................................................................................615
Persisting a Result Set as an XML Data File...........................................................................616
Isolation and Lock Levels Supported.......................................................................................616
SQL Grammar Support............................................................................................................616
ODBC Conformance Level.......................................................................................................616
Number of Connections and Statements Supported................................................................616
Using Arrays of Parameters.....................................................................................................617
The Oracle Driver ...............................................................................................................................617
Driver Requirements................................................................................................................617
Configuring and Connecting to Data Sources..........................................................................618
Connection Option Descriptions...............................................................................................627
Performance Considerations....................................................................................................652
Data Types...............................................................................................................................653
Unicode Support......................................................................................................................656
Advanced Features..................................................................................................................657
Unexpected Characters...........................................................................................................657
MTS Support............................................................................................................................658
OS Authentication....................................................................................................................658
Support for Oracle RAC...........................................................................................................659
Support of Materialized Views..................................................................................................659
Stored Procedure Results........................................................................................................659
Persisting a Result Set as an XML Data File...........................................................................660
Isolation and Lock Levels Supported.......................................................................................660
SQL Support............................................................................................................................660
ODBC Conformance Level.......................................................................................................660
Number of Connections and Statements Supported................................................................660
Using Arrays of Parameters.....................................................................................................661
The SQL Server Legacy Wire Protocol Driver....................................................................................661
Driver Requirements................................................................................................................661
Configuring and Connecting to Data Sources..........................................................................662
Connection Option Descriptions...............................................................................................667
Performance Considerations....................................................................................................688
Data Types...............................................................................................................................688
Unicode Support......................................................................................................................690
Advanced Features..................................................................................................................690
Isolation and Lock Levels Supported.......................................................................................690
SQL Support............................................................................................................................691
ODBC Conformance Level.......................................................................................................691
Number of Connections and Statements Supported................................................................691
Using Arrays of Parameters.....................................................................................................691
The Text Driver....................................................................................................................................691
Driver Requirements................................................................................................................692
Formats for Text Files...............................................................................................................692
SQL Support..........................................................................................................................1000
ODBC Conformance Level.....................................................................................................1000
Number of Connections and Statements Supported.............................................................1001
The Sybase IQ Wire Protocol Driver.................................................................................................1001
Driver Requirements..............................................................................................................1001
Configuring and Connecting to Data Sources........................................................................1001
Connection Option Descriptions.............................................................................................1011
Performance Considerations..................................................................................................1038
Data Types.............................................................................................................................1039
Unicode Support....................................................................................................................1041
Advanced Features................................................................................................................1041
Unexpected Characters.........................................................................................................1042
NULL Values..........................................................................................................................1043
Persisting a Result Set as an XML Data File.........................................................................1043
Isolation and Lock Levels Supported.....................................................................................1044
SQL Support..........................................................................................................................1044
ODBC Conformance Level.....................................................................................................1044
Number of Connections and Statements Supported.............................................................1044
Using Arrays of Parameters...................................................................................................1044
The Driver for Apache Hive...............................................................................................................1045
Driver Requirements..............................................................................................................1045
Configuring and Connecting to Data Sources........................................................................1045
Connection Option Descriptions for Apache Hive..................................................................1052
Performance Considerations..................................................................................................1078
Data Types.............................................................................................................................1078
Advanced Features................................................................................................................1079
Materialized Views.................................................................................................................1080
Stored Procedures ................................................................................................................1080
Unicode Support....................................................................................................................1080
Isolation and Lock Levels Supported.....................................................................................1080
SQL Support..........................................................................................................................1080
ODBC Conformance Level.....................................................................................................1081
Using Arrays of Parameters...................................................................................................1081
Limitations on Apache Hive Functionality..............................................................................1081
The Driver for the Teradata Database...............................................................................................1082
Driver Requirements..............................................................................................................1082
Configuring and Connecting to Data Sources........................................................................1082
Connection Option Descriptions.............................................................................................1089
Data Types.............................................................................................................................1109
Unicode Support....................................................................................................................1110
Persisting a Result Set as an XML Data File.........................................................................1111
Isolation and Lock Levels Supported.....................................................................................1111
SQL Support..........................................................................................................................1111
ODBC Conformance Level.....................................................................................................1111
Number of Connections and Statements Supported.............................................................1111
Create Table...........................................................................................................................1162
Create View............................................................................................................................1173
Delete.....................................................................................................................................1174
Drop Cache (EXT)..................................................................................................................1175
Drop Index..............................................................................................................................1176
Drop Sequence......................................................................................................................1176
Drop Table..............................................................................................................................1177
Drop View...............................................................................................................................1177
Explain Plan...........................................................................................................................1178
Insert......................................................................................................................................1178
Refresh Cache (EXT).............................................................................................................1180
Refresh Schema (EXT)..........................................................................................................1181
Select.....................................................................................................................................1181
Set Checkpoint Defrag...........................................................................................................1191
Set Logsize............................................................................................................................1191
Update....................................................................................................................................1192
SQL Expressions...................................................................................................................1193
Subqueries.............................................................................................................................1205
The Progress DataDirect Connect Series for ODBC provides ODBC drivers for a number of leading databases,
® ® ™
as well as flat-file database systems. The drivers are compliant with the Open Database Connectivity (ODBC)
specification and compatible with ODBC 3.8 applications. The drivers are tested and supported across numerous
platforms. Progress DataDirect Connect Series for ODBC includes the following products:
Note: This guide contains information for the 7.1.6 version of the Apache Hive Wire Protocol, Oracle Wire
Protocol, and SQL Server Wire Protocol drivers. For 8.0 and higher versions of those drivers, documentation
is available by data source at the Progress DataDirect Connectors Documentation page:
https://docs.progress.com/bundle/datadirect-connectors/page/DataDirect-Connectors-by-data-source.html.
The content of this guide assumes that you are familiar with your operating system and its commands. It
contains the following information:
• Quick Start Connect on page 33 explains the basics for quickly configuring and testing the drivers.
• General Information on Using Connect Drivers on page 57 explains the drivers and ODBC, and discusses
environment-specific subjects.
• Advanced Features on page 77 explains at a general level advanced driver features such as failover,
security, connection pooling, and bulk load.
• Configuring the Product on UNIX/Linux on page 111 discusses UNIX and Linux environment variables and
configuration of the drivers. It also provides a sample system information file, as well as discussing other
driver tools for UNIX and Linux.
• A chapter for each database driver. Each driver’s chapter is structured in the same way. First, it lists which
versions of the databases the driver supports, the operating environments in which the driver runs, and the
driver requirements for your operating environment. Next, it explains how to configure a data source and
how to connect to that data source. Finally, the chapter provides information about data types, ODBC
conformance levels, isolation and lock levels supported, and other driver-specific information.
The documentation for DataDirect Connect Series for ODBC drivers also includes the Progress DataDirect for
ODBC Drivers Reference. The reference provides general reference information for all DataDirect drivers for
ODBC, including content on troubleshooting, supported SQL escapes, and DataDirect tools. For the complete
documentation set, visit to the Progress DataDirect Connectors Documentation Hub:
https://docs.progress.com/bundle/datadirect-connectors/page/DataDirect-Connectors-by-data-source.html.
If you are writing programs to access ODBC drivers, you need to obtain a copy of the ODBC Programmer’s
Reference for the Microsoft Open Database Connectivity Software Development Kit, available from Microsoft
Corporation.
For the latest information about the specific drivers available for your platform, refer to the readme file in your
software package.
Database drivers are continually being added to each operating environment. For the latest information about
the specific drivers available for your platform, refer to the readme file in your software package, or refer to the
Progress DataDirect database support matrix Web pages at the DataDirect Support Matrices page:
https://www.progress.com/matrices/datadirect.
Note: This guide refers the reader to Web pages using URLs for more information about specific topics,
including Web URLs not maintained by Progress DataDirect. Because it is the nature of Web content to change
frequently, Progress DataDirect can guarantee only that the URLs referenced in this guide were correct at the
time of publication.
• Product Matrix
• Product Platforms
• Support for setting the value of undocumented connection options using the setup dialog for the
following drivers on Windows:
Note: The legacy setting for enabling Kerberos Authentication (AuthenticationMethod=1) will
continue to be valid for this release; however, it will be disabled in future versions of the product.
• Added support for SSL encryption, including the following connection options:
• The CryptoLibName connection option allows you to determine the cryptographic library used when
SSL is enabled. See CryptoLibName on page 1058 for details.
• The Encryption Method connection option now allows you to encrypt data sent between the driver
and the database. See Encryption Method on page 1062 for details.
• The Host Name In Certificate connection option now allows you to specify the host name for certificate
validation when SSL encryption and validation are enabled. See Host Name In Certificate on page
1064 for details.
• The Key Password connection option now allows you to specify the key password that is used to
access the individual keys in the keystore file when SSL and SSL client authentication are enabled
on the database server. See Key Password on page 1065 for details.
• The Key Store connection option now allows you to specify the directory containing the keystore file
that is to be used when SSL and SSL client authentication are enabled on the database server. See
Key Store on page 1065 for details.
• The Key Store Password connection option allows you to specify the keystore password that is used
to access the keystore file when SSL and SSL client authentication are enabled on the database
server. See Keystore Password on page 1066 for details.
• The SSLLibName connection option allows you to determine the SSL library used when SSL is
enabled. See Key Password on page 1065 for details.
• The Truststore connection option now allows you to specify the directory that contains the truststore
file and the truststore file name that is to be used when SSL is enabled and the server authentication
is used. See Truststore on page 1074 for details.
• The User Name connection option now allows you to specify the user ID that is used to connect to
your database. See User Name on page 1076 for details.
• The Validate Server Certificate connection option now determines whether the driver validates the
certificates that are sent by the database server when SSL encryption is enabled. See Validate Server
Certificate on page 1077 for details.
• The Array Size configuration option has been refreshed to allow specifying the number of cells retrieved
instead of rows. By determining the fetch size based on the number of cells, the driver can avoid out of
memory errors when fetching from tables containing a large number of columns. See Array Size on page
1055 for details.
• Certified with Apache Hive Sentry, which enables HiveServer2 administrators to enforce role-based
authorization for Apache Hadoop clusters. See Apache Sentry on page 1080 for details.
• The driver has been enhanced to support the Char data type when connected to Hive 0.13 and higher.
See Data Types on page 1078 for details.
• The driver has been enhanced to support the Decimal data type when connected to Hive 0.11 and higher.
See Data Types on page 1078 for details.
• The driver has been enhanced to support the Date and Varchar data types in Hive 0.12 and higher. See
Data Types on page 1078 for details.
• The TCP Keep Alive connection option allows you to use TCP Keep Alive to maintain idle TCP
connections. See TCP Keep Alive on page 1073 for details.
• The User Name and Password connection options are now required for a connection to HiveServer2.
See User Name on page 1076 and Password on page 1068 for details.
• When connection to HiveServer2, simultaneous connections per port are supported.
• The new Wire Protocol Version connection option specifies the version of the HiveServer to which the
driver will connect. See Wire Protocol Version on page 1077 for details.
• The String Describe Type connection option now allows you to describe string columns as
SQL_WLONGVARCHAR or SQL_WVARCHAR. See String Describe Type on page 1072 for details.
• The Use Native Catalog Function connection option allows you to specify whether the driver uses native
catalog functions to retrieve information returned by the SQLTables, SQLColumns, and SQLStatistics
catalog functions. See Use Native Catalog Functions on page 1076 for details.
• Added support for Kerberos authentication, including the following connection options:
• The GSS Client Library connection option now allows you to specify the name of the GSS client library
that the driver uses to communicate with the Key Distribution center (KDC). See GSS Client Library
on page 1062 for details.
• The Authentication Method connection option now allows you to specify the method the driver uses
to authenticate the user to the server when a connection is established. See Authentication Method
on page 1056 for details.
• The Service Principal Name connection option allows you to specify the service principal name to be
used by the driver for Kerberos authentication. See Service Principal Name on page 1070 for details.
• The new CryptoLibName and SSLLibName connection options allow you to designate the OpenSSL
libraries used when SSL is enabled. See CryptoLibName on page 848 and SSLLibName on page 872 for
details.
• The new Crypto Protocol Version connection option allows you to specify the cryptographic protocols
used when SSL is enabled. See Crypto Protocol Version on page 847 for details.
• The new Unbounded Numeric Precision connection option allows you to define the precision for
unbounded NUMERIC columns when described within the column, parameter, result set, or table
metadata. See Unbounded Numeric Precision on page 877 for details.
• The new Unbounded Numeric Scale connection option allows you to define the scale for unbounded
NUMERIC columns described within the column, parameter, result set, or table metadata. See Unbounded
Numeric Scale on page 877 for details.
• The TCP Keep Alive connection option allows you to use TCP Keep Alive to maintain idle TCP
connections. See TCP Keep Alive on page 873 for details.
• The Max Char Size connection option specifies the maximum size of columns of type SQL_VARCHAR
that the driver describes through result set descriptions and catalog functions. See Max Char Size on
page 866 for details.
• The Max Long Varchar Size connection option specifies the maximum size of columns of type
SQL_LONGVARCHAR that the driver describes through result set descriptions and catalog functions.
See Max Long Varchar Size on page 866 for details.
• The Enable Keyset Cursors connection option enables emulated Keyset cursors to provide scrollable
cursors to an ODBC application. See Enable Keyset Cursors on page 851 for details.
• The Keyset Cursor Options connection option determines which columns are used to comprise the keyset
that the driver uses to create the initial keyset on which cursor operations are based. See Keyset Cursor
Options on page 861 for details.
• Added support for SSL encryption with Greenplum 4.2 and higher, including the following connection
options:
• The Encryption Method connection option now allows you to encrypt data sent between the driver
and the database. See Encryption Method on page 852 for details.
• The Host Name In Certificate connection option now allows you to specify the host name for certificate
validation when SSL encryption and validation are enabled. See Host Name In Certificate on page
859 for details.
• The Key Password connection option now allows you to specify the key password that is used to
access the individual keys in the keystore file when SSL and SSL client authentication are enabled
on the database server. See Key Password on page 862 for details.
• The Keystore connection option now allows you to specify the directory containing the keystore file
that is to be used when SSL and SSL client authentication are enabled on the database server. See
Keystore on page 862 for details.
• The Key Store Password connection option allows you to specify the keystore password that is used
to access the keystore file when SSL and SSL client authentication are enabled on the database
server. See Keystore Password on page 863 for details.
• The Truststore connection option now allows you to specify the directory that contains the truststore
file and the truststore file name that is to be used when SSL is enabled and the server authentication
is used. See Truststore on page 874 for details.
• The Truststore Password connection option now allows you to specify the truststore password that
is used to access the truststore file when SSL is enabled and the server authentication is used. See
Truststore Password on page 875 for details.
• The User Name connection option now allows you to specify the user ID that is used to connect to
your database. See User Name on page 875 for details.
• The Validate Server Certificate connection option now determines whether the driver validates the
certificates that are sent by the database server when SSL encryption is enabled. See Validate Server
Certificate on page 876 for details.
• The Authentication Method connection option has been refreshed with a new valid value for enabling
Kerberos Authentication. To use Kerberos authentication with the driver, set AuthenticationMethod=4.
See Authentication Method on page 896 for details.
Note: The legacy setting for enabling Kerberos Authentication (AuthenticationMethod=1) will
continue to be valid for this release; however, it will be disabled in future versions of the product.
• Support for Kerberos Authentication, which can be configured using the following connection options:
• Authentication Method specifies the method the driver uses to authenticate the user to the server
when a connection is established. See Authentication Method on page 896 for details.
• GSS Client Library specifies the GSS client library that the driver uses to communicate with the Key
Distribution Center (KDC). See GSS Client Library on page 903 for details.
• Service Principal Name specifies the service principal name to be used by driver for Kerberos
authentication. See Service Principal Name on page 911 for details.
• Certified with Apache Sentry for Impala 1.1 and higher. Sentry enables administrators to control access
to data and metadata stored on an Hadoop cluster by defining user roles and permissions. See Apache
Sentry on page 919 for details.
• The driver has been enhanced to support the Char, Decimal, and Varchar data types when connected
to Impala 2.0 and higher. See Data Types on page 918 for details.
• The Array Size configuration option has been refreshed to allow specifying the number of cells retrieved
instead of rows. By determining the fetch size based on the number of cells, the driver can avoid out of
memory errors when fetching from tables containing a large number of columns. See Array Size on page
895 for details.
• The new AllowedOpenSSLVersions option allows you to determine which version of the OpenSSL library
file the driver uses for data encryption. See AllowedOpenSSLVersions on page 251 or Designating an
OpenSSL Library on page 94 for details.
• The new CryptoLibName and SSLLibName connection options allow you to designate the OpenSSL
libraries used when SSL is enabled. See CryptoLibName on page 257 and SSLLibName on page 274 for
details.
• The new Crypto Protocol Version connection option allows you to specify the cryptographic protocols
used when SSL is enabled. See Crypto Protocol Version on page 256 for details.
• The TCP Keep Alive connection option allows you to use TCP Keep Alive to maintain idle TCP
connections. See TCP Keep Alive on page 275 for details.
• The new CryptoLibName and SSLLibName connection options allow you to designate the OpenSSL
libraries used when SSL is enabled. See CryptoLibName on page 323 and SSLLibName on page 360 for
details.
• The new Crypto Protocol Version connection option allows you to specify the cryptographic protocols
used when SSL is enabled. See Crypto Protocol Version on page 323 for details.
• The TCP Keep Alive connection option allows you to use TCP Keep Alive to maintain idle TCP
connections. See TCP Keep Alive on page 362 for details.
• Oracle Advanced Security support, which can be configured using the following connection options:
• Data Integrity Level sets the level of OAS data integrity used for data sent between the driver and
database server. See Data Integrity Level on page 325 for details.
• Data Integrity Types specifies one or multiple algorithms to protect against attacks that intercept and
modify data being transmitted between the client and server when OAS data integrity is enabled using
the Data Integrity Level option. See Data Integrity Types on page 325 for details.
• Encryption Level determines whether data is encrypted and decrypted when transmitted over the
network between the driver and database server using OAS encryption. See Encryption Level on
page 333 for details.
• Encryption Types specifies one or multiple algorithms to use if OAS encryption is enabled using the
Encryption Level property. See Encryption Types on page 335 for details.
• Modified to support all Oracle 11g R2 Kerberos encryption algorithms.
• For PostgreSQL 9.0 and later, the driver behavior has been updated to support executing multiple
prepared statements in a single query that contain inserts for BYTEA values. However, for versions
earlier than PostgreSQL 9.0, this functionality is not supported and the driver returns an error. See Data
Types on page 879 for details.
• A Power BI connector is now included with the product package. You can use this connector to access
your PostgreSQL data with Power BI. See Accessing PostgreSQL data with Power BI on page 390 for
details.
• The new AllowedOpenSSLVersions option allows you to determine which version of the OpenSSL library
file the driver uses for data encryption. See AllowedOpenSSLVersions on page 394 or Designating an
OpenSSL Library on page 94 for details.
• The driver has been enhanced to support Select queries with parameterized arrays.
• The driver has been enhanced to support MD5 and SCRAM-SHA-256 authentication methods.
• Support materialized views and foreign tables.
• Support for Kerberos Authentication, which can be configured using the following connection options:
• Authentication Method specifies the method the driver uses to authenticate the user to the server
when a connection is established. See Authentication Method on page 396 for details.
• GSS Client Library specifies the GSS client library that the driver uses to communicate with the Key
Distribution Center (KDC). See GSS Client Library on page 410 for details.
• Service Principal Name specifies the service principal name to be used by driver for Kerberos
authentication. See Service Principal Name on page 424 for details.
• The new CryptoLibName and SSLLibName connection options allow you to designate the OpenSSL
libraries used when SSL is enabled. See CryptoLibName on page 401 and SSLLibName on page 424 for
details.
• The new Crypto Protocol Version connection option allows you to specify the cryptographic protocols
used when SSL is enabled. See Crypto Protocol Version on page 400 for details.
• The new Unbounded Numeric Precision connection option allows you to define the precision for
unbounded NUMERIC columns when described within the column, parameter, result set, or table
metadata. See Unbounded Numeric Precision on page 428 for details.
• The new Unbounded Numeric Scale connection option allows you to define the scale for unbounded
NUMERIC columns described within the column, parameter, result set, or table metadata. See Unbounded
Numeric Scale on page 428 for details.
• The TCP Keep Alive connection option allows you to use TCP Keep Alive to maintain idle TCP
connections. See TCP Keep Alive on page 425 for details.
• The Max Char Size connection option specifies the maximum size of columns of type SQL_CHAR that
the driver describes through result set descriptions and catalog functions. See Max Char Size on page
419 for details.
• The Max Long Varchar Size connection option specifies the maximum size of columns of type
SQL_LONGVARCHAR that the driver describes through result set descriptions and catalog functions.
See Max Long Varchar Size on page 419 for details.
• The Enable Keyset Cursors connection option enables emulated Keyset cursors to provide scrollable
cursors to an ODBC application. See Enable Keyset Cursors on page 404 for details.
• The Keyset Cursor Options connection option determines which columns are used to comprise the keyset
that the driver uses to create the initial keyset on which cursor operations are based. See Keyset Cursor
Options on page 416 for details.
• The Encryption Method connection option now supports Request SSL functionality. See Encryption
Method on page 405 for details.
• Certified with Salesforce API Version 26, 27, 28, 29, 33, 34, 38
• The driver no longer supports 32-bit Solaris x86 and 32-bit Solaris on SPARC platforms due to changes
in Salesforce security standards. As previously announced, Salesforce now requires Java SE 8 and
higher versions of the JVM. The highest version currently supported on either platform is Java SE 6;
therefore, the driver is no longer able to connect to Salesforce instances on these platforms.
• The Salesforce driver has been updated to require a JVM that is version Java SE 8 or higher. This
change is being implemented to comply with recent revisions to Salesforce security standards.
In keeping with best security practices, Salesforce will begin deprecating support for the TLS 1.0 encryption
protocol within inbound and outbound connections on June 25th, 2016. TLS 1.0 will initially be disabled
in Sandbox instances, before being retired for all services in early 2017. To maintain compatibility with
services after TLS 1.0 is disabled, the driver must employ a JVM that allows TLS 1.0 to be disabled
independently from other encryption protocols, functionality that was first introduced in Java SE 7.
By default, the driver uses the Java SE 8 JVM that is installed with the driver. If you designate a JVM
that is version Java SE 7 or earlier, the driver will return an error when attempting to establish a connection.
To correct this issue, set the library path environment variable to the location of a supported JVM.
For more information on changes to the Salesforce security policy, refer to
https://help.salesforce.com/apex/HTViewSolution?id=000221207#Whatischange.
• The Refresh Schema connection option specifies whether the driver automatically refreshes the remote
object mapping and other information contained in a remote schema the first time a user connects to
the specified embedded database. See Refresh Schema on page 966 for details.
• The KeywordConflictSuffix config option allows you to specify a string of up to five alphanumeric characters
that the driver appends to any object or field name that conflicts with a SQL engine keyword. See Config
Options on page 945 for details.
See Host Name on page 513, Application Intent on page 492, and Multi-Subnet Failover on page 520 for
details.
• The new Bulk Load Threshold option allows you to determine when the driver uses bulk load for insert,
update, delete, or batch operations. See Bulk Load Threshold on page 497 for details.
• The new CryptoLibName and SSLLibName connection options allow you to designate the OpenSSL
libraries used when SSL is enabled. See CryptoLibName on page 503 and SSLLibName on page 527 for
details.
• The driver has been enhanced to support NTLMv2 authentication, which can be configured using the
Authentication Method connection option. See Authentication Method on page 494 for details.
• The new Crypto Protocol Version connection option allows you to specify the cryptographic protocols
used when SSL is enabled. See Crypto Protocol Version on page 502 for details.
• The TCP Keep Alive connection option allows you to use TCP Keep Alive to maintain idle TCP
connections. See TCP Keep Alive on page 528 for details.
• The driver has been enhanced to support BINARY and VARBINARY data types when using the bulk
load protocol.
• The new AllowedOpenSSLVersions option allows you to determine which version of the OpenSSL library
file the driver uses for data encryption. See AllowedOpenSSLVersions on page 561 or Designating an
OpenSSL Library on page 94 for details.
• The new CryptoLibName and SSLLibName connection options allow you to designate the OpenSSL
libraries used when SSL is enabled. See CryptoLibName on page 572 and Crypto Protocol Version on
page 571 for details.
• The new Crypto Protocol Version connection option allows you to specify the cryptographic protocols
used when SSL is enabled. See Crypto Protocol Version on page 571 for details.
• The TCP Keep Alive connection option allows you to use TCP Keep Alive to maintain idle TCP
connections. See TCP Keep Alive on page 602 for details.
Note: The Connect64 Text driver uses a driver-specific installer, instead of the Connect Series installer.
Both installers are available on the Progress website.
• Returns result set metadata for parameterized statements that have been prepared but not yet
executed.
• Supports parameter arrays, processing the arrays as a series of executions, one execution for each
row in the array.
• Provides a connection option that allows you to configure the driver to report that it supports
transactions, although Hive does not support transactions. This provides a workaround for applications
that do not operate with a driver that reports that transactions are not supported.
• Supports the following standard SQL functionality:
• Create Index, Create Table, and Create View
• Insert, Update, and Delete
• Drop Index, Drop Table, and Drop View
See The Driver for Apache Hive on page 1045 for details.
• Supports Cloudera Impala database servers and formally certified with the following file formats and
storage handlers:
• File Formats:
• Parquet
• TextFile
• Storage Handlers:
• HBase
• Returns result set metadata for parameterized statements that have been prepared by not yet executed.
• Supports parameter arrays, processing the arrays as a series of executions, one execution for each
row in the array.
• Provides a connection option that allows you to configure the driver to report that it supports
transactions, although Impala does not support transactions. This provides a workaround for
applications that do not operate with a driver that reports that transcations are not supported.
• Provides a connection option that allows you to set a default limit for the number of rows returned
when an ORDER BY clause is submitted. This provides a workaround for applications that are not
compatible with Impala's requirement that ORDER BY clauses limit the number of rows returned.
• Supports the following standard SQL functionality:
• Create Index and Create Table
• Insert, Update, and Delete
• Drop Index and Drop Table
See The Impala Wire Protocol Driver on page 884 for details.
Product Matrix
The DataDirect Connect Series for ODBC products include 32- and 64-bit drivers. DataDirect Connect for ODBC
(32-bit) and DataDirect Connect64 for ODBC (64-bit) are detailed in the following table.
Note: 8.0 and higher versions of Connect Series for ODBC drivers and the 7.1 version of the Connect64 Text
driver use standalone installers. For information on those installers, refer to the Progress DataDirect for ODBC
Drivers Installation Guide.
Oracle (client) X X
Text X X
Btrieve X
dBASE X
Informix (client) X
XML X
DataDirect Connect XE for ODBC (32-bit) and DataDirect Connect64 XE for ODBC (64-bit) products consists of
the drivers detailed in the following table.
Salesforce X X
Sybase IQ X X
™
Product Platforms
DataDirect Connect Series for ODBC drivers allow you to connect to a variety of databases from these platforms:
Windows (32-bit)
• Windows 10
• Windows 8.1
• Windows 7
• Windows Server 2012
• Windows Server 2008
Windows (64-bit)
• Windows 10
• Windows 8.1
• Windows 7
• Windows Server 2012
• Windows Server 2008
UNIX and Linux (32-bit)
• AIX
• HP-UX aCC Enabled
• Linux
• Oracle Solaris
UNIX and Linux (64-bit)
• AIX
• HP-UX aCC Enabled
• Linux
• Oracle Solaris
• DataDirect Connect Series for ODBC Installation Guide details requirements and procedures for installing
the product.
• DataDirect Connect Series for ODBC User’s Guide provides information about configuring and using the
product.
• DataDirect Connect Series for ODBC Reference provides detailed reference information about the product.
• DataDirect Connect Series for ODBC Troubleshooting Guide provides information about error messages
and troubleshooting procedures for the product.
• Your number or the serial number that corresponds to the product for which you are seeking support, or a
case number if you have been provided one for your issue. If you do not have a SupportLink contract, the
SupportLink representative assisting you will connect you with our Sales team.
• Your name, phone number, email address, and organization. For a first-time call, you may be asked for full
information, including location.
• The Progress DataDirect product and the version that you are using.
• The type and version of the operating system where you have installed your product.
• Any database, database version, third-party software, or other environment information required to understand
the problem.
• A brief description of the problem, including, but not limited to, any error messages you have received, what
steps you followed prior to the initial occurrence of the problem, any trace logs capturing the issue, and so
on. Depending on the complexity of the problem, you may be asked to submit an example or reproducible
application so that the issue can be re-created.
• A description of what you have attempted to resolve the issue. If you have researched your issue on Web
search engines, our Knowledgebase, or have tested additional configurations, applications, or other vendor
products, you will want to carefully note everything you have already attempted.
• A simple assessment of how the severity of the issue is impacting your organization.
This chapter provides basic information about configuring your driver immediately after installation and testing
your connection. To take full advantage of the features of the driver, read About the Product on page 57 and
the driver-specific chapter.
Information that the driver needs to connect to a database is stored in a data source. The ODBC specification
describes three types of data sources: user data sources, system data sources (not a valid type on UNIX/Linux),
and file data sources. On Windows, user and system data sources are stored in the registry of the local computer.
The difference is that only a specific user can access user data sources, whereas any user of the machine can
access system data sources. On Windows, UNIX, and Linux, file data sources, which are simply text files, can
be stored locally or on a network computer, and are accessible to other machines.
When you define and configure a data source, you store default connection values for the driver that are used
each time you connect to a particular database. You can change these defaults by modifying the data source.
1. From the DataDirect program group, start the ODBC Administrator and click either the User DSN, System
DSN, or File DSN tab to display a list of data sources.
• User DSN: If you installed default DataDirect ODBC user data sources as part of the installation, select
the appropriate data source name and click Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the
appropriate driver and click Finish to display the driver Setup dialog box.
• System DSN: To configure a new system data source, click Add to display a list of installed drivers.
Select the appropriate driver and click Finish to display the driver Setup dialog box.
• File DSN: To configure a new file data source, click Add to display a list of installed drivers. Select the
driver and click Advanced to specify attributes; otherwise, click Next to proceed. Specify a name for
the data source and click Next. Verify the data source information; then, click Finish to display the driver
Setup dialog box.
The General tab of the Setup dialog box appears by default.
Note: The General tab displays only fields that are required for creating a data source. The fields on all
other tabs are optional, unless noted otherwise in this book.
2. The following two options appear on the General tab of all driver Setup dialog boxes:
Data Source Name: Type a string that identifies this data source configuration, such as Accounting.
Description: Type an optional long description of a data source name, such as My Accounting Database.
Provide the requested information for all other options on the General tab; then, click Apply to configure
the data source.
Oracle Teradata
• Location Name: This field is valid and required only if you are connecting to a DB2 database on DB2 for i
or z/OS. Type the DB2 location name. Use the name defined during the local DB2 installation.
On z/OS only, your system administrator can determine the name of your DB2 location using the DISPLAY
DDF command.
On DB2 for i only, your system administrator can determine the name of your DB2 location using the
WRKRDBDIRE command. The name of the database that is listed as *LOCAL is the value you should use.
• Collection: This field is valid only if you are connecting to a DB2 database on DB2 for i or z/OS. By default,
the user ID is used for the value of Collection. The user ID should always be used on z/OS.
• Database Name: This field is valid and required only if you are connecting to a DB2 database on
Linux/UNIX/Windows. Type the name of the database to which you want to connect.
Note: This field is disabled if the Location Name or Collection fields are populated.
Informix
Prerequisites:
• You must have all components of your database client software installed and connecting properly; otherwise,
the driver will not operate correctly.
Following is a list of connection options on the General Tab:
• Database Name: Type the name of the database to which you want to connect by default.
You must also provide the following information on the Connection tab; then, click Apply.
• Host Name: Type the name of the machine on which the Informix server resides.
• Service Name: Type the name of the service as it appears on the host machine.
• Server Name: Type the name of the Informix server as it appears in the sqlhosts file.
Oracle
Prerequisites:
• You must have all components of your database client software installed and connecting properly; otherwise,
the driver will not operate correctly.
Following is a list of connection options on the General Tab:
• Server Name: Type the client connection string designating the server and database to be accessed. The
information required varies depending on the client driver you are using.
• Host: Type either the name or the IP address of the server to which you want to connect.
• Port Number: Type the port number of your Oracle listener. Check with your database administrator for
the correct number.
• SID: Type the Oracle System Identifier that refers to the instance of Oracle running on the server. The
default is ORCL.
This option and the Service Name option are mutually exclusive. If the Service Name option is specified,
do not specify this option.
• Service Name: Type the Oracle service name that specifies the database used for the connection. The
service name is a string that is the global database name—a name that is comprised of the database name
and domain name, for example: sales.us.acme.com.
This option and the SID option are mutually exclusive. If the SID option is specified, do not specify this
option.
• Edition Name: Oracle 11g R2 and higher only. Type the name of the Oracle edition that the driver is to use
when establishing a connection. Oracle 11g R2 and higher allows your database administrator to create
multiple editions of schema objects so that your application can still use those objects while the database
is being upgraded. This option tells the driver which edition of the schema objects to use.
Salesforce
Prerequisites:
• The driver requires Java SE 8 or higher. Before you configure a data source for the Salesforce driver, you
must set the PATH library path environment variable to the path of the jvm.dll file of your JVM.
Provide the following information on the General Tab:
• Host Name: The default Salesforce instance is login.salesforce.com. If you are logging into a different
Salesforce instance, type the root of the Salesforce URL. Otherwise, leave the field blank.
You must provide the following information in the logon dialog box:
• User Name: Type your logon ID for Salesforce.
• Password: Type your case-sensitive password for the Salesforce instance.
If your Salesforce instance requires a security token, you can append it to the password, for example,
secretXaBARTsLZReM4Px47qPLOS, where secret is the password and the remainder of the value is
the security token. Both the password and security token are case-sensitive.
• Port Number: Type the port number of the server listener. The default is 1433.
• Database Name: Type the name of the database to which you want to connect by default.
• Database Name: Type 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 by the system administrator for each user.
• User Name: The default user ID that is used to connect to your database. Your ODBC application may
override this value or you may override it in the logon dialog box or connection string.
• Database Name: Type 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 by the system administrator for each user.
• DBCName List: Type the IP addresses or the alias names that are to appear in the drop-down list of the
logon dialog box. Separate the names with commas. The same restrictions apply as described for the
DBCName or Alias option.
Using an alias name increases the time it takes to connect because the driver must search a local hosts
file to resolve the name to an IP address, but it allows the driver to try and connect to alternate IP addresses
if the first address fails. If you use an alias name, you must have or create a local hosts file that contains
the alias names. The alias name cannot be more than eight characters long.
• Integrated Security: Select this check box to enable the user to connect to the database through single
sign-on (SSO) using one of the authentication mechanisms that support SSO. When this check box is not
selected (the default), UserID is required.
• Security Mechanism: Select TD2 from the drop-down list to specify the authentication mechanism used
for connections to the data source. Valid values are:
• Default—uses TD2.
• KRB5— uses Kerberos as the authentication mechanism on Windows clients working with Windows
servers if the server is V2R6.0.
• KRB5C— uses Kerberos Compatibility as the authentication mechanism on Windows clients working
with Windows servers if the server is pre-V2R6.0.
• LDAP—uses LDAP as the authentication mechanism.
• NTLM— uses NTLM as the authentication mechanism on Windows clients working with Windows servers
if the server is V2R6.0.: Type a string of characters that is to be regarded as a parameter to the
authentication mechanism. The string is ignored by the ODBC driver and is passed on to the TeraSSO
function that is called to set the authentication mechanism. The characters [] {} () , ; ? * = ! @ must be
enclosed in curly braces.
• NTLMC— uses NTLM Compatibility as the authentication mechanism on Windows clients working with
Windows servers if the server is pre-V2R6.0.
• TD1—uses Teradata 1 as the authentication mechanism.
• TD2—(default) uses Teradata 2 as the authentication mechanism.
• Security Parameter
• UserID: Type the default UserID for the Teradata database.
1. After you have configured the data source, you can click Test Connect on the Setup dialog box to attempt
to connect to the data source using the connection options specified in the dialog box. Some drivers
immediately return a message indicating success or failure. For most drivers, a logon dialog box appears
as described in each individual driver chapter.
2. Supply the requested information in the logon dialog box and click OK. Note that the information you enter
in the logon dialog box during a test connect is not saved.
• If the driver can connect, it releases the connection and displays a Connection Established message.
Click OK.
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message. Click OK.
3. On the driver Setup dialog box, click OK. The values you have specified are saved and are the defaults
used when you connect to the data source. You can change these defaults by using the previously described
procedure to modify your data source. You can override these defaults by connecting to the data source
using a connection string with alternate values. See individual driver chapters for information about using
connection strings.
The following basic information enables you to configure a data source and test connect with a driver immediately
after installation. See Configuring the Product on UNIX/Linux on page 111 for detailed information about
configuring the UNIX/Linux environment and data sources.
Note: In the following examples, xx in a driver filename represents the driver level number.
Environment Configuration
To configure the environment:
1. Check your permissions: You must log in as a user with full r/w/x permissions recursively on the entire
product installation directory.
2. From your login shell, determine which shell you are running by executing:
echo $SHELL
3. Run one of the following product setup scripts from the installation directory to set variables: odbc.sh or
odbc.csh. For Korn, Bourne, and equivalent shells, execute odbc.sh. For a C shell, execute odbc.csh. After
running the setup script, execute:
env
to verify that the installation_directory/lib directory has been added to your shared library path.
4. Set the ODBCINI environment variable. The variable must point to the path from the root directory to the
system information file where your data source resides. The system information file can have any name,
but the product is installed with a default file called odbc.ini in the product installation directory. For example,
if you use an installation directory of /opt/odbc and the default system information file, from the Korn or
Borne shell, you would enter:
ODBCINI=/opt/odbc/odbc.ini export ODBCINI
From the C shell, you would enter:
setenv ODBCINI /opt/odbc/odbc.ini
ivtestlib /opt/odbc/lib/ivoraxx.so
Note: On Solaris, AIX, and Linux, the full path to the driver does not have to be specified for the tool. The
HP-UX version, however, requires the full path.
If the load is successful, the tool returns a success message along with the version string of the driver. If the
driver cannot be loaded, the tool returns an error message explaining why.
Note: The Linux ODBC Administrator is currently supported only on Linux for x86 and x64 processors with
Motif 2.0.3 or higher. It is not supported on Linux for Itanium II or other UNIX platforms.
The Linux ODBC Administrator is located in the /tools directory of the product installation directory. For
example:
/opt/odbc/tools/odbcadmin
1. To start the Linux ODBC Administrator, change to the install_dir/tools directory, where install_dir
is the path to the product installation directory. At a command prompt, enter:
./odbcadmin
2. Click either the User DSN or File DSN tab to display a list of data sources.
• User DSN: Select the appropriate data source name and click Configure to display the driver Setup
dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the
appropriate driver and click Finish to display the driver Setup dialog box.
• File DSN: To configure a new file data source, click Add to display a list of installed drivers. Select the
appropriate driver and click Advanced to specify attributes; otherwise, click Next to proceed. Specify a
name for the data source and click Next. Verify the data source information; then, click Finish to display
the driver Setup dialog box.
The General tab of the Setup dialog box appears by default.
Note: The General tab displays only fields that are required for creating a data source. The fields on all
other tabs are optional, unless noted otherwise in this book.
3. The following two options appear on the General tab of all driver Setup dialog boxes:
Data Source Name: Type a string that identifies this data source configuration, such as Accounting.
Description: Type an optional long description of a data source name, such as My Accounting Database.
Provide the requested information for all other options on the General tab; then, click Apply to configure
the data source.
Oracle Teradata
The following example demonstrates the minimum connection information required to establish a connection
to DB2 for Linux/UNIX/Windows:
The following example demonstrates the minimum connection information required to establish a connection
to DB2 for i or z/OS:
• Database: This option is valid and required only if you are connecting to a DB2 database on
Linux/UNIX/Windows. Enter the name of the database to which you want to connect.
• Location: This option is valid and required only if you are connecting to a DB2 database on DB2 for i or
z/OS. Enter the DB2 location name. Use the name defined during the local DB2 installation.
On z/OS only, your system administrator can determine the name of your DB2 location using the DISPLAY
DDF command.
On DB2 for i only, your system administrator can determine the name of your DB2 location using the
WRKRDBDIRE command. The name of the database that is listed as *LOCAL is the value you should use.
• Collection: This option is valid only if you are connecting to a DB2 database on DB2 for i or z/OS. By
default, the user ID is used for the value of Collection. The user ID should always be used on z/OS.
Informix
Prerequisites:
• You must have all components of your database client software installed and connecting properly; otherwise,
the driver will not operate correctly.
The following example demonstrates the minimum connection information required to establish a connection:
[Informix]
Driver=ODBCHOME/lib/ivinfxx.nn
...
Database=Informix3
...
HostName=InformixHost
...
ServerName=InformixServer
...
Service=online
...
Oracle
Prerequisites:
• You must have all components of your database client software installed and connecting properly; otherwise,
the driver will not operate correctly.
The following example demonstrates the minimum connection information required to establish a connection:
[Oracle]
Driver=ODBCHOME/lib/ivor8xx.nn
ServerName=OracleServer
• Hostname: Either the name or the IP address of the server to which you want to connect.
• PortNumber: The port number of your Oracle listener. Check with your database administrator for the
number.
• ServiceName: The Oracle service name that specifies the database used for the connection. The service
name is a string that is the global database name—a name that is comprised of the database name and
domain name, for example: sales.us.acme.com.
• SID: The Oracle System Identifier that refers to the instance of Oracle running on the server. The default
is ORCL.
Note: SID and ServiceName are mutually exclusive. Only one or the other can be specified in the data
source; otherwise, an error is generated.
• EditionName: Oracle 11g R2 and higher only. The name of the Oracle edition the driver uses when
establishing a connection. Oracle 11g R2 and higher allows your database administrator to create multiple
editions of schema objects so that your application can still use those objects while the database is being
upgraded. This option is only valid for Oracle 11g R2 and higher databases and tells the driver which edition
of the schema objects to use.
• Database: The name of the database to which you want to connect by default.
• Hostname: Either the name or the IP address of the server to which you want to connect.
• PortNumber: The port number of the server listener.
Salesforce
Prerequisites:
• The driver requires a Java Virtual Machine (JVM): Java SE 8 or higher. Before you configure a data source
for the Salesforce driver, you must set the library path environment variable for your operating system to
the directory containing your JVM’s libjvm.so [sl | a] file, and that directory’s parent directory. The library
path environment variable is:
• LD_LIBRARY_PATH on Linux, Oracle Solaris, and HP-UX Itanium
• SHLIB_PATH on HP-UX PA-RISC
• LIBPATH on AIX
The following example demonstrates the minimum connection information required to establish a connection:
[Salesforce]
Driver=ODBCHOME/lib/ivsfrc27.so
...
HostName=test.salesforce.com
...
UserName=JohnDoe
...
Password=secret
...
• FetchSize: Smaller fetch sizes can improve the initial response time of the query. Larger fetch sizes
improve overall fetch times at the cost of additional memory. Smaller fetch sizes can improve the initial
response time of the query. Larger fetch sizes improve overall fetch times at the cost of additional memory.
• WSfetchSize: If set to 0, the driver attempts to fetch up to a maximum of 2000 rows. This value typically
provides the maximum throughput. Setting the value lower than 2000 can reduce the response time for
returning the initial data.
• Database: The name of the database to which you want to connect by default.
• PortNumber: The port number of the server listener. The default is 1433.
• User Name: The default user ID that is used to connect to your database. Your ODBC application may
override this value.
[Teradata]
Driver=ODBCHOME/lib/xxterann.zz
...
DBCName=123.123.12.12
...
SecurityMechanism=TD2
...
SecurityParameter=5678
...
UserID=John
...
1. After you have configured the data source, you can click Test Connect on the Setup dialog box to attempt
to connect to the data source using the connection options specified in the dialog box. Some drivers
immediately return a message indicating success or failure. For most drivers, a logon dialog box appears
as described in each individual driver chapter.
2. Supply the requested information in the logon dialog box and click OK. Note that the information you enter
in the logon dialog box during a test connect is not saved.
• If the driver can connect, it releases the connection and displays a Connection Established message.
Click OK.
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message. Click OK.
3. On the driver Setup dialog box, click OK. The values you have specified are saved and are the defaults
used when you connect to the data source. You can change these defaults by using the previously described
procedure to modify your data source. You can override these defaults by connecting to the data source
using a connection string with alternate values. See individual driver chapters for information about using
connection strings.
Note: Security features set in your browser can prevent the Performance Wizard from launching. If this is the
case, a security warning message is displayed. Often, the warning message provides instructions for unblocking
the Performance Wizard for the current session. To allow the Performance Wizard to launch without encountering
a security warning message, the security settings in your browser can be modified. Check with your system
administrator before disabling any security features.
• On Windows, you can start the Wizard by selecting it from the product program group.
• On all platforms, you can start the Wizard by launching the following file from your browser window, where
install_dir is your product installation directory:
install_dir/wizards/index.html
When you have answered all questions for a driver, the results appear in the form of a connection string, as
shown in the following example:
You can copy these results to an existing connection string for immediate use or to a text file for later reference.
You can also either click Administrator, if you are using the Windows or Linux ODBC administrator, or
ODBC.INI, if you are editing the odbc.ini file. Clicking either of these buttons displays a window that provides
the values to use for configuring a data source.
See Data Source Configuration on page 114 for details about configuring data sources through the
odbc.ini file.
• Environment-Specific Information
• Using IP Addresses
• Translators
Progress DataDirect provides ODBC drivers for both relational and flat-file database systems. The flat-file
drivers provide full SQL support; see SQL Statements for Flat-File Drivers for details.
Environment-Specific Information
The sections For Windows Users on page 58 and For UNIX and Linux Users on page 60 contain information
specific to your operating environment.
The following sections refer to threading models.
Refer to "Threading" in the Progress DataDirect for ODBC Drivers Reference for more information.
32-Bit Drivers
• All required network software that is supplied by your database system vendors must be 32-bit compliant.
• If your application was built with 32-bit system libraries, you must use 32-bit drivers. If your application was
built with 64-bit system libraries, you must use 64-bit drivers (see 64-Bit Drivers on page 59). The database
to which you are connecting can be either 32-bit or 64-bit enabled.
• The following processors are supported:
• x86: Intel
• x64: Intel and AMD
• The following operating systems are supported for DataDirect Connect for ODBC. All editions are supported
unless otherwise noted.
• Windows 10
• Windows 8.1
• Windows Server 2012
• Windows 7
• Windows Server 2008
• The following operating systems are supported for DataDirect Connect XE for ODBC. All editions are supported
unless otherwise noted.
• Windows 10
• Windows 8.1
• Windows Server 2012
• Windows 7
• Windows Server 2008 Enterprise, Datacenter, Web and Small Business Editions
• For the Salesforce driver: A 32-bit Java Virtual Machine (JVM), Java SE 8 or higher, is required. Also, you
must set the PATH environment variable to the directory containing your 32-bit JVM’s jvm.dll file, and
that directory’s parent directory.
• An application that is compatible with components that were built using Microsoft Visual Studio 2010 compiler
and the standard Win32 threading model.
• You must have ODBC header files to compile your application. For example, Microsoft Visual Studio includes
these files.
64-Bit Drivers
• All required network software that is supplied by your database system vendors must be 64-bit compliant.
• The following processors are supported:
• Intel
• AMD
• The following operating systems are supported for DataDirect Connect64 for ODBC. All editions are supported
unless otherwise noted.
• Windows 10
• Windows 8.1
• Windows Server 2012
• Windows 7
• Windows Server 2008
• The following operating systems are supported for DataDirect Connect64 XE for ODBC. All editions are
supported unless otherwise noted.
• Windows 10
• Windows 8.1
• Windows Server 2012
• Windows 7
• Windows Server 2008 Enterprise, Standard, or Datacenter Editions
• An application that is compatible with components that were built using Microsoft C/C++ Optimizing Compiler
Version 14.00.40310.41 and the standard Windows 64 threading model.
• For the Salesforce driver: A 64-bit JVM, Java SE 8 or higher, is required. Also, you must set the PATH
environment variable to the directory containing your 32-bit JVM’s jvm.dll file, and that directory’s parent
directory.
• You must have ODBC header files to compile your application. For example, Microsoft Visual Studio includes
these files.
Driver Names
The prefix for all 32-bit driver file names is IV. The prefix for all 64-bit driver file names is DD. The file extension
is .DLL, which indicates dynamic link libraries. For example, the 32-bit DB2 Wire Protocol driver file name is
IVDB2nn.DLL, where nn is the revision number of the driver.
Refer to the readme file shipped with the product for the file name of each driver.
The following are requirements for the 32- and 64-bit drivers on UNIX/Linux operating systems.
32-Bit Drivers
• All required network software that is supplied by your database system vendors must be 32-bit compliant.
• If your application was built with 32-bit system libraries, you must use 32-bit drivers. If your application was
built with 64-bit system libraries, you must use 64-bit drivers (see 64-Bit Drivers on page 63). The database
to which you are connecting can be either 32-bit or 64-bit enabled.
• For the Salesforce driver: A 32-bit Java Virtual Machine (JVM), Java SE 8 or higher, is required. Also, you
must set the library path environment variable of your operating system to the directory containing your
JVM’s libjvm.so [sl | a] file and that directory’s parent directory.
The library path environment variable is:
AIX
• IBM POWER processor
• AIX 5L operating system, version 5.3 fixpack 5 and higher, 6.1, and 7.1
• An application compatible with components that were built using Visual Age C++ 6.0.0.0 and the AIX native
threading model
Note: SALESFORCE USERS: When compiling an application on AIX for use with the driver for Salesforce,
you must not use the -brtl option.
Note: TERADATA USERS: When compiling an application on AIX for use with the driver for the Teradata
database, you must use the -brtl option. For example, use cc -o pgm pgm.o –brtl -lodbc or ld -o
pgm –brtl pgm.o -lodbc
HP-UX
• The following processors are supported:
• PA-RISC
• Intel Itanium II (IPF)
• For PA-RISC: An application compatible with components that were built using HP aC++ 3.30 and the
HP-UX 11 native (kernel) threading model (posix draft 10 threads).
All of the standard 32-bit UNIX drivers are supported on HP PA-RISC.
• For IPF: An application compatible with components that were built using HP aC++ 5.36 and the HP-UX
11 native (kernel) threading model (posix draft 10 threads)
Note: All of the standard 32-bit UNIX drivers are supported on HP PA-RISC.
For IPF, the following DataDirect Connect for ODBC are supported:
Linux
• The following processors are supported:
• x86: Intel
• x64: Intel and AMD
• An application compatible with components that were built using g++ GNU project C++ Compiler version
3.4.6 and the Linux native pthread threading model (Linuxthreads).
Note: All drivers are supported on Linux except for the Informix driver.
Oracle Solaris
• The following processors are supported:
• Oracle SPARC
• x86: Intel
• x64: Intel and AMD
• For Oracle SPARC: An application compatible with components that were built using Oracle Workshop v.
6 update 2 and the Solaris native (kernel) threading model.
• For x86/x64: An application compatible with components that were built using Oracle C++ 5.8 and the Solaris
native (kernel) threading model
Note: All of the standard 32-bit UNIX drivers are supported on Solaris SPARC.
For x86, the following DataDirect Connect for ODBC drivers are supported:
64-Bit Drivers
All required network software that is supplied by your database system vendors must be 64-bit compliant.
• For the Salesforce driver: A 64-bit Java Virtual Machine (JVM), Java SE 8 or higher, is required. Also, you
must set the library path environment variable of your operating system to the directory containing your
JVM’s libjvm.so [sl | a] file and that directory’s parent directory.
• The library path environment variable is:
• LD_LIBRARY_PATH on Linux, HP-UX Itanium, and Oracle Solaris
• LIBPATH on AIX
AIX
• IBM POWER Processor
• AIX 5L operating system, version 5.3 fixpack 5 and higher, 6.1, and 7.1
• An application compatible with components that were built using Visual Age C++ version 6.0.0.0 and the
AIX native threading model
Note: SALESFORCE USERS: When compiling an application on AIX for use with the driver for Salesforce,
you must not use the -brtl option.
HP-UX
• Intel Itanium II (IPF) processor
• HP-UX IPF 11i operating system, Versions 2 and 3 (B.11.23 and B.11.31)
• HP aC++ v. 5.36 and the HP-UX 11 native (kernel) threading model (posix draft 10 threads)
Linux
• The following processors are supported:
• Intel Itanium II (IPF)
• x64: Intel and AMD
• For x64:
• CentOS Linux 4.x, 5.x, 6.x, 7.x, and 8.x
• Debian 7.11 and 8.5
• Oracle Linux 4.x, 5.x, 6.x, 7.x, and 8.x
• Red Hat Enterprise Linux AS, ES, and WS version 4.x, 5.x, 6.x, 7.x, and 8.x
• SUSE Linux Enterprise Server 10.x, 11
• Ubuntu 14.04, 16.04, and 18.04
Note: The Oracle (client) driver is not supported on the Red Hat x64 operating system.
• For Itanium II: an application compatible with components that were built using g++ GNU project C++
Compiler version 3.3.2 and the Linux native pthread threading model (Linuxthreads)
• For x64: an application compatible with components that were built using g++ GNU project C++ Compiler
version 3.4 and the Linux native pthread threading model (Linuxthreads)
Note: The Greenplum Wire Protocol driver is the only Connect XE driver supported on Linux Itanium. II.
Oracle Solaris
• The following processors are supported:
• Oracle SPARC
• x64: Intel and AMD
• For Oracle SPARC: An application compatible with components that were built using Oracle Workshop v.
6 update 2 and the Solaris native (kernel) threading model
• For x64: An application compatible with components that were built using Oracle C++ Compiler version 5.8
and the Solaris native (kernel) threading model
All of the standard 32-bit UNIX drivers are supported on Solaris SPARC. For x64,The following drivers are
supported for Oracle Solaris:
AIX
If you are building 64-bit binaries, you must pass the define ODBC64. Demoodbc provides an example of this.
See the installed file demoodbc.txt and The demoodbc Application for details.
You must also include the correct compiler switches if you are building 64-bit binaries. For example, to build
demoodbc, you would use:
xlC_r –DODBC64 -q64 -qlonglong -qlongdouble -qvftable -o demoodbc
-I../include demoodbc.c -L../lib -lc_r -lC_r -lodbc
HP-UX 11 aCC
The ODBC drivers require certain runtime library patches. The patch numbers are listed in the readme file for
your product. HP-UX patches are publicly available from the HP Web site www.hp.com.
HP updates the patch database regularly; therefore, the patch numbers in the readme file may be superseded
by newer versions. If you search for the specified patch on an HP site and receive a message that the patch
has been superseded, download and install the replacement patch.
If you are building 64-bit binaries, you must pass the define ODBC64. Demoodbc provides an example of this.
See the installed file demoodbc.txt and The demoodbc Application for details. You must also include the +DD64
compiler switch if you are building 64-bit binaries. For example, to build demoodbc, you would use:
aCC -Wl,+s +DD64 -DODBC64 -o demoodbc -I../include demoodbc.c -L../lib -lodbc
Linux
If you are building 64-bit binaries, you must pass the define ODBC64. Demoodbc provides an example of this.
See the installed file demoodbc.txt and The demoodbc Application for details.
You must also include the correct compiler switches if you are building 64-bit binaries. For example, to build
demoodbc, you would use:
g++ -o demoodbc -DODBC64 -I../include demoodbc.c -L../lib -lodbc -lodbcinst -lc
Oracle Solaris
If you are building 64-bit binaries, you must pass the define ODBC64. Demoodbc provides an example of this.
See the installed file demoodbc.txt and The demoodbc Application for details.
You must also include the -xarch=v9 compiler switch if you are building 64-bit binaries. For example, to build
demoodbc, you would use:
CC -mt –DODBC64 -xarch=v9 -o demoodbc -I../include demoodbc.c -L../lib -lodbc –lCrun
Driver Names
The drivers are ODBC API-compliant dynamic link libraries, referred to in UNIX and Linux as shared objects.
The prefix for all 32-bit driver file names is iv. The prefix for all 64-bit driver file names is dd. The driver file
names are lowercase and the extension is .so, the standard form for a shared object. For example, the 32-bit
DB2 Wire Protocol driver file name is ivdb2nn.so, where nn is the revision number of the driver. For drivers on
HP-UX PA-RISC only, the extension is .sl, for example, ivdb2nn.sl.
Refer to the readme file shipped with your DataDirect product for the file name of each driver.
Using IP Addresses
The drivers support Internet Protocol (IP) addresses in IPv4 and IPv6 format as shown in the following tables.
Table 1: IP Address Formats Supported by 32- and 64-bit DataDirect Connect for ODBC Drivers
Microsoft SQL Server Legacy Wire All supported All supported versions
Protocol (UNIX/Linux only) versions
Microsoft SQL Server Wire Protocol All supported All supported versions
versions
Table 2: IP Address Formats Supported by 32- and 64-bit DataDirect Connect XE for ODBC Drivers
If your network supports named servers, the server name specified in the data source can resolve to an IPv4
or IPv6 address.
In the following connection string example, the IP address for the DB2 server is specified in IPv4 format:
DRIVER=DataDirect DB2 Wire Protocol;
IpAddress=123.456.78.90;PORT=5179;
DB=DB2ACCT;UID=JOHN;PWD=XYZZYYou
In the following connection string example, the IP address for the DB2 server is specified in IPv6 format:
DRIVER=DataDirect DB2 Wire Protocol;
IpAddress=2001:DB8:0000:0000:8:800:200C:417A;PORT=5179;
DB=DB2ACCT;UID=JOHN;PWD=XYZZYYou
In addition to the normal IPv6 format, the drivers in the preceding tables support IPv6 alternative formats for
compressed addresses. For example, the following connection string specifies the server using IPv6 format,
but uses the compressed syntax for strings of zero bits:
DRIVER=DataDirect DB2 Wire Protocol;
IpAddress=2001:DB8:0:0:8:800:200C:417A;PORT=5179;
DB=DB2ACCT;UID=JOHN;PWD=XYZZYYou
• The data type of the variable that the application maps to the dynamic parameter
• The SQL data type of the dynamic parameter (the data type that the database system assigned to the
parameter marker)
The two data types are identified separately using the SQLBindParameter function. You can also use descriptor
APIs as described in the Descriptor section of the ODBC specification (version 3.0 and higher).
The driver relies on the binding of parameters to know how to send information to the database system in its
native format. If an application furnishes incorrect parameter binding information to the ODBC driver, the results
will be unpredictable. For example, the statement might not be executed correctly.
To ensure interoperability, the DataDirect Connect for ODBC driver uses only the parameter binding information
that is provided by the application. Some DBMSs cannot publish dynamic parameter information back to an
ODBC driver. For example, both the Microsoft SQL Server and Oracle databases can determine that a parameter
is an integer; however, the Oracle query process cannot publish this information back to the driver.
Btrieve X
dBASE X
Informix X
Oracle X
Progress OpenEdge X
Text X
Salesforce X
Teradata X
XX.YY.ZZZZ(BAAAA, UBBBB)
or
XX.YY.ZZZZbAAAA, uBBBB)
1
Because Apache HiveServer1 servers do not currently handle multiple connections well, consider using a single Apache
HiveServer1 for each connection.
The Driver Manager on UNIX and Linux has a version string of the format:
XX.YY.ZZZZ(UBBBB)
The component for the Unicode conversion tables (ICU) has a version string of the format:
XX.YY.ZZZZ
where:
XX is the major version of the product.
YY is the minor version of the product.
ZZZZ is the build number of the driver or ICU component.
AAAA is the build number of the driver's bas component.
BBBB is the build number of the driver's utl component.
CCCC is the build number of a flat-file driver's flt component.
DDDDDD is the version of the Java components used by the Salesforce driver.
For example:
07.16.0002 (b0001, u0002, F0001)
|__| |___| |___| |___|
Driver Bas Utl Flt
On Windows, you can check the version string through the properties of the driver DLL. Right-click the
driver DLL and select Properties. The Properties dialog box appears. On the Version tab, click File Version
in the Other version information list box.
You can always check the version string of a driver on Windows by looking at the About tab of the driver’s
Setup dialog.
On UNIX and Linux, you can check the version string by using the test loading tool shipped with
the product. This tool, ivtestlib for 32-bit drives and ddtestlib for 64-bit drivers, is located in
install_directory/bin.
The syntax for the tool is:
ivtestlib shared_object
or
ddtestlib shared_object
For example, for the 32-bit Oracle Wire Protocol driver on Oracle Solaris:
ivtestlib ivora27.so
returns:
07.16.0001 (B0002, U0001)
Note that the Oracle Wire Protocol driver is not a flat-file driver; therefore, there is no flt component listed in
the example.
For example, for the Driver Manager on Solaris:
ivtestlib libodbc.so
returns:
07.16.0001 (U0001)
For example, for the 64-bit Driver Manager on Solaris:
ddtestlib libodbc.so
returns:
07.16.0001 (U0001)
For example, for 32-bit ICU component on Solaris:
ivtestlib libivicu27.so
07.16.0001
Note: On AIX, Linux, and Solaris, the full path to the driver does not have to be specified for the test loading
tool. The HP-UX version of the tool, however, requires the full path.
getFileVersionString Function
Version string information can also be obtained programmatically through the function getFileVersionString.
This function can be used when the application is not directly calling ODBC functions.
This function is defined as follows and is located in each driver's shared object:
const unsigned char* getFileVersionString();
This function is prototyped in the qesqlext.h file shipped with the product.
SQLINTEGER strlenTypeName,
strlenSqlDataType,
strlenColumnSize;
rc = SQLGetTypeInfo(hstmt, dataType);
if (rc == SQL_SUCCESS) {
do {
For information about how a database’s data types map to the standard ODBC data types, see the appropriate
driver chapter in this book.
Note: A result set can be persisted as an XML data file only if the result set is generated using STATIC
cursors. Otherwise, the following error is returned:
Driver only supports XML persistence when using driver’s static cursors.
Argument Definition
StatementHandle The handle of the statement that contains the result set to persist as XML.
Pointer to a URL that specifies the full path name of the XML data file to be
ValuePtr generated. The directory specified in the path name must exist, and if the
specified file name exists, the file will be overwritten.
A client application can choose to persist the data at any time that the statement is in an executed or
cursor-positioned state. At any other time, the driver returns the following message:
Function Sequence Error
1. From the product program group, select XML Persistence Demo. The XMLPersistence dialog box appears.
2. First, you must connect to the database. Click Connect. The Select Data Source dialog box appears.
3. You must either select an existing data source or create a new one. Take one of the following actions:
4. After you have connected to a database, type a SQL Select statement in the Query text box of the XML
Persistence dialog box. Then, click Persist. The Save As dialog box appears.
5. Specify a name and location for the XML data file that will be created. Then, click OK.
Note that the Status box in the XML Persistence dialog box displays whether the action failed or succeeded.
On UNIX and Linux, the drivers are shipped with an XML persistence demo tool named demoodbc.
This tool is installed in the installation directory, in the /samples/demo subdirectory. For information about how
to use this tool, refer to the demoodbc.txt file installed in the demo subdirectory.
Translators
Progress DataDirect provides a sample translator named "OEM to ANSI" that provides a framework for coding
a translation library.
On Windows, refer to the readme.trn file in the \TRANSLAT subdirectory in the product installation directory.
On UNIX and Linux, refer to the readme.trn file in the product installation directory, in the /samples/trn
subdirectory.
• Using Failover
• Using Security
Using Failover
To ensure continuous, uninterrupted access to data, the DataDirect Connect Series for ODBC drivers provide
the following levels of failover protection, listed from basic to more comprehensive:
• Connection failover provides failover protection for new connections only. The driver fails over new
connections to an alternate, or backup, database server if the primary database server is unavailable, for
example, because of a hardware failure or traffic overload. If a connection to the database is lost, or dropped,
the driver does not fail over the connection. This failover method is the default.
• Extended connection failover provides failover protection for new connections and lost database connections.
If a connection to the database is lost, the driver fails over the connection to an alternate server, preserving
the state of the connection at the time it was lost, but not any work in progress.
• Select Connection failover provides failover protection for new connections and lost database connections.
In addition, it provides protection for Select statements that have work in progress. If a connection to the
database is lost, the driver fails over the connection to an alternate server, preserving the state of the
connection at the time it was lost and preserving the state of any work being performed by Select statements.
The method you choose depends on how failure tolerant your application is. For example, if a communication
failure occurs while processing, can your application handle the recovery of transactions and restart them?
Your application needs the ability to recover and restart transactions when using either extended connection
failover mode or select connection failover mode. The advantage of select mode is that it preserves the state
of any work that was being performed by the Select statement at the time of connection loss. If your application
had been iterating through results at the time of the failure, when the connection is reestablished the driver
can reposition on the same row where it stopped so that the application does not have to undo all of its previous
result processing. For example, if your application were paging through a list of items on a Web page when a
failover occurred, the next page operation would be seamless instead of starting from the beginning.
Performance, however, is a factor in selecting a failover mode. Select mode incurs additional overhead when
tracking what rows the application has already processed.
You can specify which failover method you want to use by setting the Failover Mode connection option. Read
the following sections for details on each failover method:
Connection Failover
Connection failover is available in the following DataDirect Connect Series for ODBC drivers:
• Oracle
• PostgreSQL Wire Protocol
• Progress OpenEdge Wire Protocol
• SQL Server Wire Protocol
• SQL Server Legacy Wire Protocol (UNIX only)
• Sybase Wire Protocol
• Sybase IQ Wire Protocol
Connection failover allows an application to connect to an alternate, or backup, database server if the primary
database server is unavailable, for example, because of a hardware failure or traffic overload. Connection
failover provides failover protection for new connections only and does not provide protection for lost connections
to the database, nor does it preserve states for transactions or queries.
You can customize the drivers for connection failover by configuring a list of alternate database servers that
are tried if the primary server is not accepting connections. Connection attempts continue until a connection
is successfully established or until all the alternate database servers have been tried the specified number of
times.
For example, suppose you have the environment shown in the following illustration with multiple database
servers: Database Server A, B, and C. Database Server A is designated as the primary database server,
Database Server B is the first alternate server, and Database Server C is the second alternate server.
First, the application attempts to connect to the primary database server, Database Server A (1). If connection
failover is enabled and Database Server A fails to accept the connection, the application attempts to connect
to Database Server B (2). If that connection attempt also fails, the application attempts to connect to Database
Server C (3).
In this scenario, it is probable that at least one connection attempt would succeed, but if no connection attempt
succeeds, the driver can retry each alternate database server (primary and alternate) for a specified number
of attempts. You can specify the number of attempts that are made through the connection retry feature. You
can also specify the number of seconds of delay, if any, between attempts through the connection delay feature.
See Using Connection Retry on page 84 for more information about connection retry.
A driver fails over to the next alternate database server only if a successful connection cannot be established
with the current alternate server. If the driver successfully establishes communication with a database server
and the connection request is rejected by the database server because, for example, the login information is
invalid, then the driver generates an error and does not try to connect to the next database server in the list. It
is assumed that each alternate server is a mirror of the primary and that all authentication parameters and
other related information are the same.
For details on configuring connection failover for your driver, see the appropriate driver chapter in this book.
• Restores the connection using the same connection options specified by the lost connection
• Reallocates statement handles and attributes
• Logs in the user to the database with the same user credentials
• Restores any prepared statements associated with the connection and repopulates the statement pool
• Restores manual commit mode if the connection was in manual commit mode at the time of the failover
The driver does not preserve work in progress. For example, if the database server experienced a hardware
failure while processing a query, partial rows processed by the database and returned to the client would be
lost. If the driver was in manual commit mode and one or more Inserts or Updates were performed in the current
transaction before the failover occurred, then the transaction on the primary server is rolled back. The Inserts
or Updates done before the failover are not committed to the primary server. Your application needs to rerun
the transaction after the failover because the Inserts or Updates done before the failover are not repeated by
the driver on the failover connection.
When a failover occurs, if a statement is in allocated or prepared state, the next operation on the statement
returns a SQL state of 01000 and a vendor code of 0. If a statement is in an executed or prepared state, the
next operation returns a SQL state of 40001 and a vendor code of 0. Either condition returns an error message
similar to:
Your connection has been terminated. However, you have been successfully connected to
the next available AlternateServer: 'HOSTNAME=Server4:PORTNUMBER= 1521:SERVICENAME=test'.
All active transactions have been rolled back.
The driver retains all connection settings made through ODBC API calls when a failover connection is made.
It does not, however, retain any session settings established through SQL statements. This can be done through
the Initialization String connection option, described in the individual driver chapters.
The driver retains the contents of parameter buffers, which can be important when failing over after a fetch. All
Select statements are re-prepared at the time the failover connection is made. All other statements are placed
in an allocated state.
If an error occurs while the driver is reestablishing a lost connection, the driver can fail the entire failover process
or proceed with the process as far as it can. For example, suppose an error occurred while reestablishing the
connection because a table for which the driver had a prepared statement did not exist on the alternate
connection. In this case, you may want the driver to notify your application of the error and proceed with the
failover process. You can choose how you want the driver to behave if errors occur during failover by setting
the Failover Granularity connection option.
During the failover process, your application may experience a short pause while the driver establishes a
connection on an alternate server. If your application is time-sensitive (a real-time customer order application,
for example) and cannot absorb this wait, you can set the Failover Preconnect connection option to true. Setting
the Failover Preconnect option to true instructs the driver to establish connections to the primary server and
an alternate server at the same time. Your application uses the first connection that is successfully established.
If this connection to the database is lost at a later time, the driver saves time in reestablishing the connection
on the server to which it fails over because it can use the spare connection in its failover process.
This pre-established failover connection is not used by the driver until the driver determines that it needs to fail
over. If the server to which the driver is connected or the network equipment through which the connection is
routed is configured with a timeout, the pre-configured failover connection could time out. The pre-configured
failover connection can also be lost if the failover server is brought down and back up again. The driver tries
to establish the connection to the failover server again if the connection is lost.
Select connection failover provides failover protection for the following types of connections:
If you have configured Failover Granularity to fail the entire failover process, the driver returns a SQL state of
08S01 and an error message similar to:
Your connection has been terminated and attempts to complete the failover process to the
following Alternate Servers have failed: AlternateServer: 'HOSTNAME=Server4:PORTNUMBER=
1521:SERVICENAME=test'. All active transactions have been rolled back.
• Alternate servers should mirror data on the primary server or be part of a configuration where multiple
database nodes share the same physical data.
• If using failover with DB2 HADR, the primary server must be the primary server configured in your HADR
system and any alternate server must be a standby server configured in your HADR system.
First, Database Server B is tried (1). Then, Database Server C may be tried (2), followed by a connection
attempt to Database Server A (3). In contrast, if client load balancing were not enabled in this scenario, each
database server would be tried in sequential order, primary server first, then each alternate server based on
its entry order in the alternate servers list.
Client load balancing is controlled by the Load Balancing connection option. For details on configuring client
load balancing, see the appropriate driver chapter in this book.
Option Characteristic
Alternate Servers One or multiple alternate database servers. An IP address or server name
identifying each server is required.
(See step 1 on page 85)
Connection Retry Count Number of times the driver retries the primary database server, and if
specified, alternate servers until a successful connection is established.
(See step 5 on page 86)
Connection Retry Delay Wait interval, in seconds, between connection retry attempts when the
Connection Retry Count option is set to a positive integer.
(See step 6 on page 86)
Failover Granularity The type of behavior that the driver exhibits when errors are detected during
the failover process.
(See step 3 on page 85)
Failover Preconnect Determines whether the driver makes a connection attempt to the next server
in the Alternate Servers list at the time of the initial connection.
(See step 4 on page 86)
Load Balancing Determines whether the driver uses client load balancing in its attempts to
connect to primary and alternate database servers. If enabled, the driver
(See step 7 on page 86)
attempts to connect to the database servers in random order.
1. To configure connection failover, you must specify one or more alternate database servers that are tried
at connection time if the primary server is not accepting connections. To do this, use the Alternate Servers
connection option. Connection attempts continue until a connection is successfully established or until all
the database servers in the list have been tried once (the default).
2. Choose a failover method by setting the Failover Mode connection option. The default method is Connection
(FailoverMode=0).
3. If Failover Mode is Extended Connection (FailoverMode=1) or Select (FailoverMode=2), set the Failover
Granularity connection option to specify how you want the driver to behave if errors occur while trying to
reestablish a lost connection. The default behavior of the driver is Non-Atomic (FailoverGranularity=0),
which continues with the failover process and posts any errors on the statement on which they occur. Other
values are:
Atomic (FailoverGranularity=1): the driver fails the entire failover process if an error is generated as the
result of anything other than executing and repositioning a Select statement. If an error is generated as a
result of repositioning a result set to the last row position, the driver continues with the failover process, but
generates a warning that the Select statement must be reissued.
Atomic including Repositioning (FailoverGranularity=2): the driver fails the entire failover process if any error
is generated as the result of restoring the state of the connection or the state of work in progress.
Disable Integrity Check (FailoverGranularity=3: the driver does not verify that the rows restored during the
failover process match the original rows. This value applies only when Failover Mode is set to Select
(FailoverMode=2).
4. Optionally, enable the Failover Preconnect connection option (FailoverPreconnect=1) if you want the driver
to establish a connection with the primary and an alternate server at the same time. This value applies only
when Failover Mode is set to Extended Connection (FailoverMode=1) or Select (FailoverMode=2). The
default behavior is to connect to an alternate server only when failover is caused by an unsuccessful
connection attempt or a lost connection (FailoverPreconnect=0).
5. Optionally, specify the number of times the driver attempts to connect to the primary and alternate database
servers after the initial unsuccessful connection attempt. By default, the driver does not retry. To set this
feature, use the Connection Retry Count connection option.
6. Optionally, specify the wait interval, in seconds, between attempts to connect to the primary and alternate
database servers. The default interval is 3 seconds. To set this feature, use the Connection Retry Delay
connection option.
7. Optionally, specify whether the driver will use client load balancing in its attempts to connect to primary and
alternate database servers. If load balancing is enabled, the driver uses a random pattern instead of a
sequential pattern in its attempts to connect. The default value is not to use load balancing. To set this
feature, use the Load Balancing connection option.
Action The current action within the current Oracle ACTION value in the V$SESSION table.
module.
Client Host Host name of the client on which the DB2 CURRENT CLIENT_WRKSTNNAME
Name application using the connection is register (DB2 for Linux/UNIX/Windows) or
running CLIENT WRKSTNNAME register (DB2 for
z/OS).
Client User User ID for whom the application DB2 CURRENT CLIENT_USERID register
using the connection is performing (DB2 for Linux/UNIX/Windows) or
work CLIENT USERID register (DB2 for z/OS).
Module The name of a stored procedure or Oracle MODULE value in the V$SESSION table.
the name of the application
Program ID Product name and version of the DB2 CLIENT_PRDID value. For DB2 V9.1 and
driver on the client higher for Linux/UNIX/Windows, the
CLIENT_PRDID value is located in the
SYSIBMADM.APPLICATIONS table.
Using Security
The drivers support the following security features:
Authentication
On most computer systems, a password is used to prove a user's identity. This password often is transmitted
over the network and can possibly be intercepted by malicious hackers. Because this password is the one
secret piece of information that identifies a user, anyone knowing a user's password can effectively be that
user. Authentication methods protect the identity of the user.
The drivers support the following authentication methods:
• User ID/password authentication authenticates the user to the database using a database user name and
password.
• Client authentication uses the user ID and password of the user logged onto the system on which the driver
is running to authenticate the user to the database. The database server relies on the client to authenticate
the user and does not provide additional authentication.
• Kerberos authentication is a trusted third-party authentication service that verifies user identities. DataDirect
Connect Series for ODBC supports both Windows Active Directory Kerberos and MIT Kerberos implementations.
• NTLM authentication authenticates clients to the database through a challenge-response authentication
mechanism that enables clients to prove their identities without sending a database password to the server.
Kerberos Authentication
Kerberos authentication is available in the following DataDirect Connect Series for ODBC drivers:
The Kerberos method requires knowledge of how to configure your Kerberos environment. This method supports
both Windows Active Directory Kerberos and MIT Kerberos environments.
To use Kerberos authentication, the application user first must obtain a Kerberos Ticket Granting Ticket (TGT)
from the Kerberos server. The Kerberos server verifies the identity of the user and controls access to services
using the credentials contained in the TGT.
If the application uses Kerberos authentication from a Windows client, the application user does not
explicitly need to obtain a TGT. Windows Active Directory automatically obtains a TGT for the user.
If the application uses Kerberos authentication from a UNIX or Linux client, the user must explicitly
obtain a TGT. To obtain a TGT explicitly, the user must log onto the Kerberos server using the kinit command.
For example, the following command requests a TGT from the server with a lifetime of 10 hours, which is
renewable for 5 days:
NTLM Authentication
NTLM authentication is available in the following the DataDirect Connect Series for ODBC drivers:
Support for NTLMv2 and NTLMv1:
2
NTLM single sign on is not supported. To connect to SQL Server, users must use connection attributes to supply the Windows
User Id, Password, and Domain to the driver.
Option Characteristic
Authentication Method The method the driver uses to authenticate the user to the server when a
connection is established.
GSS Client Library The name of the Generic Security Service (GSS) client library that the driver
uses to communicate with the Key Distribution Center (KDC).
Service Principal Name The service principal name to be used by driver for Kerberos authentication.
• You send sensitive data, such as credit card numbers, over a database connection.
• You need to comply with government or industry privacy and security requirements.
Certain DataDirect Connect Series for ODBC drivers support Secure Sockets Layer (SSL). SSL is an
industry-standard protocol for sending encrypted data over database connections. SSL secures the integrity
of your data by encrypting information and providing client/server authentication. In addition, the DataDirect
Connect Series for ODBC DB2 Wire Protocol driver supports DB2 database-specific encryption.
Note: Data encryption may adversely affect performance because of the additional overhead (mainly CPU
usage) required to encrypt and decrypt data.
SSL Encryption
SSL encryption is available in the following DataDirect Connect Series for ODBC drivers:
Note: Communication between the Salesforce driver and Salesforce.com and Force.com is always SSL
encrypted.
SSL works by allowing the client and server to send each other encrypted data that only they can decrypt. SSL
negotiates the terms of the encryption in a sequence of events known as the SSL handshake. During the
handshake, the driver negotiates the highest SSL/TLS protocol available. The result of this negotiation determines
the encryption cipher suite to be used for the SSL session. The drivers support the following protocols using
OpenSSL cipher suites:
• SSL server authentication requires the server to authenticate itself to the client.
• SSL client authentication is optional and requires the client to authenticate itself to the server after the server
has authenticated itself to the client. Not all databases support SSL client authentication.
Certificates
SSL requires the use of a digitally-signed document, an x.509 standard certificate, for authentication and the
secure exchange of data. The purpose of this certificate is to tie the public key contained in the certificate
securely to the person/company that holds the corresponding private key. The DataDirect Connect Series for
ODBC drivers support many popular formats. Supported formats include:
The private keys stored in a keystore can be individually password-protected. In many cases, the same password
is used for access to both the keystore and to the individual keys in the keystore. It is possible, however, that
the individual keys are protected by passwords different from the keystore password. The driver needs to know
the password for an individual key to be able to retrieve it from the keystore. An additional connection string
attribute, KeyPassword, allows you to specify a password for an individual key.
Not all databases support SSL client authentication. The individual driver chapters indicate whether client
authentication is supported.
Note: For the default library setting, current information, and a complete list of installed OpenSSL libraries,
refer to the readme file installed with your product.
File replacement
In the default configuration, the drivers use the OpenSSL library file located in the \drivers subdirectory for
Windows installations and the /lib subdirectory for UNIX/Linux. You can replace this file with a different library
to change the version used by the drivers. When using this method, the replacement file must contain both the
cryptographic and SSL libraries and use the same file name as the default library. For example, the latest
version of the library files use the following naming conventions:
Windows:
• Latest version: xxtls27.dll
• 1.0.2 and earlier versions: xxssl27.dll
UNIX/Linux:
• Latest version: libxxtls27.so [.sl]
• 1.0.2 and earlier versions: libxxssl27.so [.sl]
Option Characteristic
AllowedOpenSSLVersions Determines which version of the OpenSSL library file the driver uses for
data encryption. Although the latest version of the OpenSSL library is the
most secure, some characteristics of the library can cause connections to
certain databases to fail. This option allows you to continue using older
versions of the OpenSSL library while you transition your environment to
support the latest version.
Crypto Protocol Version The cryptographic protocols the driver uses when SSL is enabled.
CryptoLibName The absolute path for the OpenSSL library file containing the cryptographic
library to be used by the data source or connection.
Encryption Method The method the driver uses to encrypt data sent between the driver and the
database server.
Host Name In Certificate The host name established by the SSL administrator for the driver to validate
the host name contained in the certificate.
Key Password The password required to access an individual key in the keystore.
Keystore The path that specifies the location of the keystore file.
PRNGSeedFile (UNIX/Linux The absolute path for the entropy-source file or device used as a seed for
only) SSL key generation.
PRNGSeedSource (UNIX/Linux The source of the seed the driver uses for SSL key generation.
only)
SSLLibName The absolute path for the OpenSSL library file containing the SSL library to
be used by the data source or connection.
Option Characteristic
Truststore The path that specifies the location of the truststore file.
Validate Server Certificate Validates the security certificate of the server as part of the SSL
authentication handshake.
DSN=AcctOracleServer;EncryptionMethod=1;HostName=AccountingOracleServer;
HostNameInCertificate=MySubjectAltName;KeyPassword=YourKeyPassword;
Keystore=KeyStoreName;KeystorePassword=YourKSPassword;PortNumber=1521;
SID=Accounting;Truststore=TrustStoreName;TruststorePassword=YourTSPassword;
ValidateServerCertificate=1
PortNumber=1521
...
SID=Accounting
...
Truststore=TrustStoreName
TruststorePassword=TSXYZZY
...
ValidateServerCertificate=1
...
Note: Connection pooling works only with connections that are established using SQLConnect or
SQLDriverConnect with the SQL_DRIVER_NO_PROMPT argument and only with applications that are
thread-enabled.
DataDirect connection pooling that is implemented by the DataDirect driver is different than connection pooling
implemented by the Windows Driver Manager. The Windows Driver Manager opens connections dynamically,
up to the limits of memory and server resources. DataDirect connection pooling, however, allows you to control
the number of connections in a pool through the Min Pool Size (minimum number of connections in a pool)
and Max Pool Size (maximum number of connections in a pool) connection options. In addition, DataDirect
connection pooling is cross-platform, allowing it to operate on UNIX and Linux. See the "Connection Option
Descriptions" section in each driver’s chapter for details about how the connection options manage DataDirect
connection pooling.
Important: On a Windows system, do not use both Windows Driver Manager connection pooling and DataDirect
connection pooling at the same time.
Note: By default, if removing a connection causes the number of connections to drop below the number
specified in the Min Pool Size option, a new connection is not created until an application needs one.
Note: If the driver cannot reconnect to the server (for example, because the server is still down), an error is
returned indicating that the reconnect attempt failed, along with specifics about the reason the connection
failed.
The technique that Progress DataDirect uses for handling dead connections in connection pools allows for
maximum performance of the connection pooling mechanism. Some drivers periodically test the server with a
dummy SQL statement while the connections sit idle. Other drivers test the server when the application requests
the use of the connection from the connection pool. Both of these approaches add round trips to the database
server and ultimately slow down the application during normal operation.
Option Characteristic
Connection Reset Resets a connection that is removed from the connection pool to the initial
configuration settings of the connection.
Load Balance Timeout An integer value to specify the amount of time, in seconds, to keep connections
open in a connection pool.
Max Pool Size An integer value to specify the maximum number of connections within a single
pool.
Min Pool Size An integer value to specify the minimum number of connections that are opened
and placed in a connection pool when it is created.
100 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
Using DataDirect Bulk Load
Table 13: Bulk Load Behavior for DataDirect Connect for ODBC
DB2 Because DB2 does not have native bulk load support, the driver supports
bulk through the native parameter array mechanism.
Table 14: Bulk Load Behavior for DataDirect Connect XE for ODBC
Salesforce The driver sends data to a Salesforce instance using the Salesforce
Bulk API instead of the Web Service API. Using the Bulk API
significantly reduces the number of Web service calls the driver
uses to transfer data and may improve performance.
• DataDirect Bulk Load requires a licensed installation of the drivers. If the drivers are installed with an
evaluation license, the bulk load feature is available for prototyping with your applications, but with limited
scope. Contact your sales representative or Progress DataDirect SupportLink for further information.
• Because a bulk load operation may bypass data integrity checks, your application must ensure that the data
it is transferring does not violate integrity constraints in the database. For example, suppose you are bulk
loading data into a database table and some of that data duplicates data stored as a primary key, which
must be unique. The driver will not throw an exception to alert you to the error; your application must provide
its own data integrity checks.
Bulk load operations are accomplished by exporting the results of a query from a database into a
comma-separated value (CSV) file, a bulk load data file. The driver then loads the data from bulk load data file
into a different database. The file can be used by any DataDirect Connect Series for ODBC drivers. In addition,
the bulk load data file is supported by other DataDirect Connect product lines that feature bulk loading, for
example, a DataDirect Connect for ADO.NET data provider that supports bulk load.
Suppose that you had customer data on a Sybase server and need to export it to a DB2 server. The driver
would perform the following steps:
3
Supports bulk load for Oracle9i R2 and higher.
4
Supports bulk load for Microsoft SQL Server 2000 and higher.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 101
Chapter 4: Advanced Features
1. Application using Sybase Wire Protocol driver sends query to and receives results from Sybase server.
2. Driver exports results to bulk load data file.
3. Driver retrieves results from bulk load data file.
4. Driver bulk loads results on DB2 server.
Refer to "DataDirect Bulk Load" in the Progress DataDirect for ODBC Drivers Reference for supported functions
and statement attributes.
102 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
Using DataDirect Bulk Load
char tableName[128];
char fileName[512];
char logFile[512];
int errorTolerance;
int warningTolerance;
int codePage;
rc = (*exportTableToFile) (
driverHandle,
(const SQLCHAR *) tableName,
(const SQLCHAR *) fileName,
codePage,
errorTolerance, warningTolerance,
(const SQLCHAR *) logFile);
if (rc == SQL_SUCCESS) {
printf ("Export succeeded.\n");
}
else {
driverError (driverHandle, hmod);
}
Your application can export a result set using the DataDirect statement attributes SQL_BULK_EXPORT and
SQL_BULK_EXPORT_PARAMS.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 103
Chapter 4: Advanced Features
The export operation creates a bulk load data file with a .csv extension in which the exported data is stored.
For example, assume that an Oracle source table named GBMAXTABLE contains four columns. The resulting
bulk load data file GBMAXTABLE.csv containing the results of a query would be similar to the following:
1,0x6263,"bc","bc"
2,0x636465,"cde","cde"
3,0x64656667,"defg","defg"
4,0x6566676869,"efghi","efghi"
5,0x666768696a6b,"fghijk","fghijk"
6,0x6768696a6b6c6d,"ghijklm","ghijklm"
7,0x68696a6b6c6d6e6f,"hijklmno","hijklmno"
8,0x696a6b6c6d6e6f7071,"ijklmnopq","ijklmnopq"
9,0x6a6b6c6d6e6f70717273,"jklmnopqrs","jklmnopqrs"
10,0x6b,"k","k"
A bulk load configuration file with and .xml extension is also created when either a table or a result set is
exported to a bulk load data file. See The Bulk Load Configuration File on page 105 for an example of a bulk
load configuration file.
In addition, a log file of events as well as external overflow files can be created during a bulk export operation.
The log file is configured through either the driver Setup dialog Bulk tab, the ExportTableToFile function, or the
SQL_BULK_EXPORT statement attribute. The external overflow files are configured through connection options;
see External Overflow Files on page 108 for details.
104 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
Using DataDirect Bulk Load
}
/* Get the DM's shared library or DLL handle to the driver. */
loadTableFromFile = (PLoadTableFromFile)
resolveName (hmod, "LoadTableFromFile");
if (! loadTableFromFile) {
printf ("Cannot find LoadTableFromFile!\n");
exit (255);
}
rc = (*loadTableFromFile) (
driverHandle,
(const SQLCHAR *) tableName,
(const SQLCHAR *) fileName,
errorTolerance, warningTolerance,
(const SQLCHAR *) configFile,
(const SQLCHAR *) logFile,
(const SQLCHAR *) discardFile,
loadStart, loadCount,
readBufferSize);
if (rc == SQL_SUCCESS) {
printf ("Load succeeded.\n");
}
else {
driverError (driverHandle, hmod);
}
Use the BulkLoadBatchSize connection attribute to specify the number of rows the driver loads to the data
source at a time when bulk loading data. Performance can be improved by increasing the number of rows the
driver loads at a time because fewer network round trips are required. Be aware that increasing the number
of rows that are loaded also causes the driver to consume more memory on the client.
A log file of events as well as a discard file that contains rows rejected during the load can be created during
a bulk load operation. These files are configured through either the driver Setup dialog Bulk tab or the
LoadTableFromFile function.
The discard file is in the same format as the bulk load data file. After fixing reported issues in the discard file,
the bulk load can be reissued using the discard file as the bulk load data file.
Note: FOR SYBASE USERS: Additional database configuration is required for destination tables that do not
have an index. See the "Persisting a Result Set as an XML Data File" section in your driver chapter for more
information.
Note: FOR SALESFORCE USERS: In addition to bulk Insert, the Salesforce driver also supports bulk Delete,
Update, and Upsert. This functionality is enabled with the SetBulkOperation function which is implemented in
the driver.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 105
Chapter 4: Advanced Features
The bulk load configuration file defines in its metadata the names and data types of the columns in the bulk
load data file. The file defines these names and data types based on the table or result set created by the query
that exported the data.
It also defines other data properties, such as length for character and binary data types, the character encoding
code page for character types, precision and scale for numeric types, and nullability for all types.
When a bulk load data file cannot read its configuration file, the following defaults are assumed:
• All data is read in as character data. Each value between commas is read as character data.
• The default character set is defined, on Windows, by the current Windows code page. On UNIX/Linux, it is
the IANAAppCodePage value, which defaults to 4.
For example, the format of the bulk load data file GBMAXTABLE.csv (discussed in Exporting Data from a
Database on page 102) is defined by the bulk load configuration file, GBMAXTABLE.xml, as follows:
<?xml version="1.0" encoding="utf-8"?>
<table codepage="UTF-16LE" xsi:noNamespaceSchemaLocation=
"http://media.datadirect.com/download/docs/ns/bulk/BulkData.xsd" xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance">
<row>
<column datatype="DECIMAL" precision="38" scale="0" nullable=
"false">INTEGERCOL</column>
<column datatype="VARBINARY" length="10" nullable=
"true">VARBINCOL</column>
<column datatype="VARCHAR" length="10" sourcecodepage="Windows-1252"
externalfilecodepage="Windows-1252" nullable="true">VCHARCOL</column>
<column datatype="VARCHAR" length="10" sourcecodepage="Windows-1252"
externalfilecodepage="Windows-1252" nullable="true">UNIVCHARCOL</column>
</row>
</table>
106 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
Using DataDirect Bulk Load
Your application can also verify the metadata of the bulk load configuration file using the DataDirect functions
ValidateTableFromFile (ANSI application) or ValidateTableFromFileW (Unicode application). The application
must first obtain driver connection handles and function pointers, as shown in the following example:
HDBC hdbc;
HENV henv;
void *driverHandle;
HMODULE hmod;
PValidateTableFromFile validateTableFromFile;
char tableName[128];
char configFile[512];
char messageList[10240];
SQLLEN numMessages;
/* Get the driver's connection handle from the DM.
This handle must be used when calling directly into the driver. */
rc = SQLGetInfo (hdbc, SQL_DRIVER_HDBC, &driverHandle, 0, NULL);
if (rc != SQL_SUCCESS) {
ODBC_error (henv, hdbc, SQL_NULL_HSTMT);
EnvClose (henv, hdbc);
exit (255);
}/* Get the DM's shared library or DLL handle to the driver. */
rc = SQLGetInfo (hdbc, SQL_DRIVER_HLIB, &hmod, 0, NULL);
if (rc != SQL_SUCCESS) {
ODBC_error (henv, hdbc, SQL_NULL_HSTMT);
EnvClose (henv, hdbc);
exit (255);
}validateTableFromFile = (PValidateTableFromFile)
resolveName (hmod, "ValidateTableFromFile");
if (!validateTableFromFile) {
printf ("Cannot find ValidateTableFromFile!\n");
exit (255);
}messageList[0] = 0;
numMessages = 0;
rc = (*validateTableFromFile) (
driverHandle,
(const SQLCHAR *) tableName,
(const SQLCHAR *) configFile,
(SQLCHAR *) messageList,
sizeof (messageList),
&numMessages);
printf ("%d message%s%s\n", numMessages,
(numMessages == 0) ? "s" :
((numMessages == 1) ? " : " : "s : "),
(numMessages > 0) ? messageList : "");
if (rc == SQL_SUCCESS) {
printf ("Validate succeeded.\n");
}else {
driverError (driverHandle, hmod);
}
Sample Applications
Progress DataDirect provides a sample application that demonstrates the bulk export, verification, and bulk
load operations. This application is located in the \samples\bulk subdirectory of the product installation
directory along with a text file named bulk.txt. Please consult bulk.txt for instructions on using the sample bulk
load application.
A bulk streaming application is also provided in the \samples\bulkstrm subdirectory along with a text file
named bulkstrm.txt. Please consult bulkstrm.txt for instructions on using the bulk streaming application.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 107
Chapter 4: Advanced Features
108 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
Using Bulk Load for Batch Inserts
For example, if you set the Enable Bulk Load connection option to 1 and the Bulk Load Threshold connection
option to 2000, executing the following statement would use the Bulk API if the number of rows returned by
SELECT rowid, sys_name FROM account is more than 2000 rows.
Option Characteristic
Batch Size An integer value that specifies the number of rows at a time that the driver
sends to the database during bulk operations.
Bulk Binary Threshold An integer value that specifies the maximum size, in KB, of binary data
exported to the bulk data file. Any data exceeding this size is exported to an
external file.
Bulk Character Threshold An integer value that specifies the maximum size, in KB, of character data
exported to the bulk data file. Any data exceeding this size is exported to an
external file.
Field Delimiter Specifies the character that the driver will use to delimit the field entries in
a bulk load data file.
Record Delimiter Specifies the character that the driver will use to delimit the record entries
in a bulk load data file.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 109
Chapter 4: Advanced Features
For all drivers that support bulk operations, use the Bulk Load Batch Size connection option to specify the
number of rows the driver loads at a time when bulk loading data. Performance can be improved by increasing
the number of rows the driver loads at a time because fewer network round trips are required. Be aware that
increasing the number of rows that are loaded also causes the driver to consume more memory on the client.
Option Characteristic
Batch Size An integer value that specifies the number of rows at a time that the driver
sends to the database during bulk operations.
Enable Bulk Load When enabled, the driver uses database bulk load protocols. When not
enabled, the driver uses standard parameter arrays.
110 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
5
Configuring the Product on UNIX/Linux
This chapter contains specific information about using the DataDirect Connect Series for ODBC drivers in the
UNIX and Linux environments.
See Environment-Specific Information on page 58 for additional platform information.
• Environment Variables
• DSN-less Connections
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 111
Chapter 5: Configuring the Product on UNIX/Linux
Environment Variables
The first step in setting up and configuring the drivers for use is to set several environment variables. The
following procedures require that you have the appropriate permissions to modify your environment and to
read, write, and execute various files. You must log in as a user with full r/w/x permissions recursively on the
entire DataDirect Connect Series for ODBC installation directory.
C shell login (and related shell) users must execute the following command before attempting to use
ODBC-enabled applications:
source ./odbc.csh
Bourne shell login (and related shell) users must initialize their environment as follows:
. ./odbc.sh
Executing these scripts sets the appropriate library search path environment variable:
to verify that the installation_directory/lib directory has been added to your shared library path.
Some of the client-based drivers must have additional environment variables set. Consult the driver requirements
in each of the individual driver chapters for additional environment variable information.
ODBCINI
Setup installs in the product installation directory a default system information file, named odbc.ini, that contains
data sources. See Data Source Configuration on page 114 for an explanation of the odbc.ini file. The system
administrator can choose to rename the file and/or move it to another location. In either case, the environment
variable ODBCINI must be set to point to the fully qualified path name of the odbc.ini file.
For example, to point to the location of the file for an installation on /opt/odbc in the C shell, you would set this
variable as follows:
setenv ODBCINI /opt/odbc/odbc.ini
112 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
Environment Variables
As an alternative, you can choose to make the odbc.ini file a hidden file and not set the ODBCINI variable. In
this case, you would need to rename the file to .odbc.ini (to make it a hidden file) and move it to the user’s
$HOME directory.
The driver searches for the location of the odbc.ini file as follows:
1. The driver checks the ODBCINI variable
2. The driver checks $HOME for .odbc.ini
If the driver does not locate the system information file, it returns an error.
ODBCINST
Setup installs in the product installation directory a default file, named odbcinst.ini, for use with DSN-less
connections. See DSN-less Connections on page 132 for an explanation of the odbcinst.ini file. The system
administrator can choose to rename the file or move it to another location. In either case, the environment
variable ODBCINST must be set to point to the fully qualified path name of the odbcinst.ini file.
For example, to point to the location of the file for an installation on /opt/odbc in the C shell, you would set this
variable as follows:
setenv ODBCINST /opt/odbc/odbcinst.ini
As an alternative, you can choose to make the odbcinst.ini file a hidden file and not set the ODBCINST variable.
In this case, you would need to rename the file to .odbcinst.ini (to make it a hidden file) and move it to the user’s
$HOME directory.
The driver searches for the location of the odbcinst.ini file as follows:
1. The driver checks the ODBCINST variable
2. The driver checks $HOME for .odbcinst.ini
If the driver does not locate the odbcinst.ini file, it returns an error.
DD_INSTALLDIR
This variable provides the driver with the location of the product installation directory so that it can access
support files. DD_INSTALLDIR must be set to point to the fully qualified path name of the installation directory.
For example, to point to the location of the directory for an installation on /opt/odbc in the C shell, you would
set this variable as follows:
setenv DD_INSTALLDIR /opt/odbc
The driver searches for the location of the installation directory as follows:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 113
Chapter 5: Configuring the Product on UNIX/Linux
ivtestlib /opt/odbc/lib/ivoraxx.so
Note: On Solaris, AIX, and Linux, the full path to the driver does not have to be specified for the tool. The
HP-UX version, however, requires the full path.
If the load is successful, the tool returns a success message along with the version string of the driver. If the
driver cannot be loaded, the tool returns an error message explaining why.
See Version String Information on page 70 for details about version strings.
The next step is to configure a data source through the system information file.
Note: The Linux ODBC Administrator is currently supported only on Linux for x86 and x64 processors with
Motif 2.0.3 and higher. It is not supported on Linux for Itanium II or other UNIX platforms.
114 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
Data Source Configuration
On Linux, you can determine if you are using Motif through the following command:
rpm –qa |grep motif
If you are not using a GUI, you can use any text editor to create or modify data source definitions directly in
the odbc.ini file. See Configuration Through the System Information (odbc.ini) File on page 117 for details.
The following drivers can be configured with the Linux ODBC Administrator:
• DB2 Wire Protocol
• dBASE
• Greenplum Wire Protocol
• Informix Wire Protocol
• Oracle
• Oracle Wire Protocol
• PostgreSQL Wire Protocol
• SQL Server Legacy Wire Protocol
• Sybase Wire Protocol
• The Driver for Teradata
• Text
Note that all of the drivers included in your odbc.ini file are shown in the User Data Sources list box, even
though some of them cannot be used with the Linux ODBC Administrator.
To configure a data source:
1. To start the Linux ODBC Administrator, change to the install_dir/tools directory, where install_dir
is the path to the product installation directory. At a command prompt, enter:
./odbcadmin
The Administrator dialog box appears.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 115
Chapter 5: Configuring the Product on UNIX/Linux
2. Click either the User DSN or File DSN tab to display a list of data sources.
• User DSN: If you are configuring an existing user data source, select the appropriate data source name
and click Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the
appropriate driver and click Finish to display the driver Setup dialog box.
• File DSN: If you are configuring an existing file data source, select the appropriate data source file and
click Configure to display the driver Setup dialog box.
To configure a new file data source, click Add to display a list of installed drivers. Select the appropriate
driver and click Advanced to specify attributes; otherwise, click Next to proceed. Specify a name for the
data source and click Next. Verify the data source information; then, click Finish to display the driver Setup
dialog box.
Note: If you want to set a default directory for File DSNs, select the directory from the Directories list; then,
click Set Directory. The next time that you open the Administrator, it displays data source files from this
directory.
The General tab of the driver Setup dialog box appears by default.
See the individual driver chapters for specific information about the driver Setup dialog. See Quick Start Connect
on page 33 for an explanation of different types of data sources.
Drivers
The Drivers tab shows a list of all installed ODBC drivers.
116 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
Data Source Configuration
Tracing
The Tracing tab allows you to trace calls to ODBC drivers and create a log of the traces for troubleshooting
purposes.
To specify the path and name of the trace log file, type the path and name in the Trace File field or click Browse
to select a log file. If no location is specified, the trace log resides in the working directory of the application
you are using.
DataDirect ships an enhanced library to perform tracing. This library appears by default in the Trace Library
field. If you want to use a custom library instead, type the path and name of the library in the Trace Library field
or click Browse to select a library.
To enable tracing, select the Enable Tracing check box on the Trace tab of the Administrator. Clear the check
box to disable tracing. Tracing continues until you disable it. Be sure to turn off tracing when you are finished
reproducing the issue because tracing decreases the performance of your ODBC application.
After making changes on the Trace tab, click Apply for them to take effect.
When you are finished with the Linux ODBC Administrator, click OK or Cancel. If you click OK, any changes
you have made to the Trace tab are accepted and the Administrator closes. If you click Cancel, the Administrator
closes without saving any changes.
For a complete discussion of tracing, refer to "ODBC trace" in the Progress DataDirect for ODBC Drivers
Reference.
The driver uses this section to match a data source to the appropriate installed driver.
The [ODBC Data Sources] section also includes data source definitions. The default odbc.ini contains a
data source definition for each driver. Each data source definition begins with a data source name in square
brackets, for example, [Oracle Wire Protocol 2]. The data source definitions contain connection string
attribute=value pairs with default values. You can modify these values as appropriate for your system.
Descriptions of these attributes are in each individual driver chapter. See Sample Default odbc.ini File on page
118 for sample data sources.
The second section of the file is named [ODBC File DSN] and includes one keyword:
This keyword defines the path of the default location for file data sources (see File Data Sources on page 136).
Note: This section is not included in the default odbc.ini file that is installed by the product installer. You can
add this section manually or, if you are using the Linux ODBC Administrator, it will be added automatically
when you click Set Directory on the File DSN tab (see Configuration Through the Administrator on page 115
under Configuration Through the Administrator on page 115).
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 117
Chapter 5: Configuring the Product on UNIX/Linux
The third section of the file is named [ODBC] and includes several keywords, for example:
[ODBC]
IANAAppCodePage=4
InstallDir=/opt/odbc
Trace=0
TraceFile=odbctrace.out
TraceDll=/opt/odbc/lib/ivtrc27.so
ODBCTraceMaxFileSize=102400
ODBCTraceMaxNumFiles=10
The IANAAppCodePage keyword defines the default value that all UNIX/Linux drivers use if individual data
sources have not specified a different value. The default value is 4.
See the individual driver chapters, and refer to "Code page values" in the Progress DataDirect for ODBC Drivers
Reference for details.
The InstallDir keyword must be included in this section. The value of this keyword is the path to the installation
directory under which the /lib and /locale directories are contained. The installation process automatically writes
your installation directory to the default odbc.ini file.
For example, if you choose an installation location of /opt/odbc, then the following line is written to the [ODBC]
section of the default odbc.ini:
InstallDir=/opt/odbc
Note: If you are using only DSN-less connections through an odbcinst.ini file and do not have an odbc.ini file,
then you must provide [ODBC] section information in the [ODBC] section of the odbcinst.ini file. The drivers
and Driver Manager always check first in the [ODBC] section of an odbc.ini file. If no odbc.ini file exists or if
the odbc.ini file does not contain an [ODBC] section, they check for an [ODBC] section in the odbcinst.ini file.
See DSN-less Connections on page 132 for details.
ODBC tracing allows you to trace calls to ODBC drivers and create a log of the traces for troubleshooting
purposes. The following keywords all control tracing: Trace, TraceFile, TraceDLL, ODBCTraceMaxFileSize,
and ODBCTraceMaxNumFiles.
For a complete discussion of tracing, refer to "ODBC trace" in the Progress DataDirect for ODBC Drivers
Reference.
118 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
Data Source Configuration
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 119
Chapter 5: Configuring the Product on UNIX/Linux
ConnectionReset=0
ConnectionRetryCount=0
ConnectionRetryDelay=3
CryptoLibName=
CryptoProtocolVersion=TLSv1.2, TLSv1.1, TLSv1,SSLv3
CurrentFunctionPath=
#Database applies to DB2 UDB only
Database=<database_name>
DefaultIsolationLevel=1
DynamicSections=1000
EnableBulkLoad=0
EncryptionMethod=0
FailoverGranularity=0
FailoverMode=0
FailoverPreconnect=0
FetchTSWTZasTimestamp=0
GrantAuthid=PUBLIC
GrantExecute=1
GSSClient=native
HostNameInCertificate=
IpAddress=<DB2_server_host>
KeepAlive=0
KeyPassword=
KeyStore=
KeyStorePassword=
LoadBalanceTimeout=0
LoadBalancing=0
#Location applies to DB2 for z/OS and DB2 for i series only
Location=<location_name>
LoginTimeout=15
LogonID=
MaxPoolSize=100
MinLongVarcharSize=
MinPoolSize=0
Password=
PackageCollection=NULLID
PackageNamePrefix=DD
PackageOwner=
Pooling=0
ProgramID=
QueryTimeout=0
ReportCodePageConversionErrors=0
SSLLibName=
TcpPort=50000
TrustStore=
TrustStorePassword=
UseCurrentSchema=1
ValidateServerCertificate=1
VarcharThreshold=
WithHold=1
XMLDescribeType=-10
[dBASE]
Driver=ODBCHOME/lib/ivdbf27.so
Description=DataDirect 7.1 dBASEFile(*.dbf)
ApplicationUsingThreads=1
CacheSize=4
CreateType=dBASE5
Database=ODBCHOME/demo
DataFileExtension=DBF
ExtensionCase=UPPER
FileOpenCache=0
IntlSort=0
LockCompatibility=dBASE
Locking=RECORD
UseLongNames=0
UseLongQualifiers=0
[FoxPro3]
120 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
Data Source Configuration
Driver=ODBCHOME/lib/ivdbf27.so
Description=DataDirect 7.1 dBASEFile(*.dbf)
ApplicationUsingThreads=1
CacheSize=4
CreateType=FoxPro30
Database=ODBCHOME/demo
DataFileExtension=DBF
ExtensionCase=UPPER
FileOpenCache=0
IntlSort=0
LockCompatibility=Fox
Locking=RECORD
UseLongNames=0
UseLongQualifiers=0
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 121
Chapter 5: Configuring the Product on UNIX/Linux
ValidateServerCertificate=1
XMLDescribeType=-10
122 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
Data Source Configuration
EnableDescribeParam=0
EncryptionMethod=0
FailoverGranularity=0
FailoverMode=0
FailoverPreconnect=0
HostName=<MySQL_host>
HostNameInCertificate=
InteractiveClient=0
KeepAlive=0
KeyPassword=
Keystore=
KeystorePassword=
LoadBalanceTimeout=0
LoadBalancing=0
LoginTimeout=15
LogonID=
Password=
MaxPoolSize=100
MinPoolSize=0
Pooling=0
PortNumber=<MySQL_server_port>
QueryTimeout=0
ReportCodepageConversionErrors=0
SSLLibName=
TreatBinaryAsChar=0
TrustStore=
TrustStorePassword=
ValidateServerCertificate=1
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 123
Chapter 5: Configuring the Product on UNIX/Linux
EnableTimestampWithTimeZone=0
EncryptionLevel=0
EncryptionMethod=0
EncryptionTypes=
FailoverGranularity=0
FailoverMode=0
FailoverPreconnect=0
FetchTSWTZasTimestamp=0
GSSClient=native
HostName=<Oracle_server>
HostNameInCertificate=
InitializationString=
KeepAlive=0
KeyPassword=
KeyStore=
KeyStorePassword
LoadBalanceTimeout=0
LoadBalancing=0
LocalTimeZoneOffset=
LockTimeOut=-1
LoginTimeout=15
LogonID=
MaxPoolSize=100
MinPoolSize=0
Module=0
Password=
Pooling=0
PortNumber=<Oracle_server_port>
ProcedureRetResults=0
ProgramID=
PRNGSeedFile=/dev/random
PRNGSeedSource=0
QueryTimeout=0
ReportCodePageConversionErrors=0
ReportRecycleBin=0
ServerName=<server_name_in_tnsnames.ora>
ServerType=0
ServiceName=
SID=<Oracle_System_Identifier>
SSLLibName=
TimestampEscapeMapping=0
TNSNamesFile=<tnsnames.ora_filename>
TrustStore=
TrustStorePassword=
UseCurrentSchema=1
ValidateServerCertificate=1
WireProtocolMode=1
124 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
Data Source Configuration
FetchTSWTZasTimestamp=0
FetchTWFSasTime=0
GSSClient=native
HostName=<PostgreSQL_host>
HostNameInCertificate=
InitializationString=
KeepAlive=0
KeyPassword=
KeysetCursorOptions=0
Keysetstore=
KeystorePassword=
LoadBalanceTimeout=0
LoadBalancing=0
LoginTimeout=15
LogonID=
MaxLongVarcharSize=
MaxPoolSize=100
MaxVarcharSize=
MinPoolSize=0
Password=
Pooling=0
PortNumber=<PostgreSQL_server_port>
QueryTimeout=0
ReportCodepageConversionErrors=0
ServicePrincipalName=
SSLLibName=
TransactionErrorBehavior=1
TrustStore=
TrustStorePassword=
UnboundedNumericPrecision=1000
UnboundedNumericScale=6
ValidateServerCertificate=1
XMLDescribeType=-10
[Salesforce]
Driver=ODBCHOME/lib/ivsfrc27.so
Description=DataDirect 7.1 Salesforce
ApplicationUsingThreads=1
BulkLoadAsync=0
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 125
Chapter 5: Configuring the Product on UNIX/Linux
BulkLoadBatchSize=1024
BulkLoadConcurrencyMode=1
BulkLoadPollInterval=10
BulkLoadProtocol=0
BulkLoadThreshold=4000
BulkLoadTimeout=0
ConnectionReset=0
ConfigOptions=
CreateDB=2
EnableBulkLoad=False
Database=
ExtendedOptions=
FetchSize=100
HostName=
InitializationString=
IANAAppCodePage=
JVMArgs=-Xmx256m
JVMClasspath=
LoadBalanceTimeout=0
LogConfigFile=
LoginTimeout=15
LogonDomain=
LogonID=
MaxPoolSize=100
MinPoolSize=0
Password=
Pooling=0
ProxyHost=
ProxyPassword=
ProxyPort=
ProxyUser=
QueryTimeout=0
ReportCodepageConversionErrors=0
ReadOnly=0
RefreshCurrentSchema=0
RefreshDirtyCache=0
SecurityToken=
StmtCallLimit=20
StmtCallLimitBehavior=2
TransactionMode=0
WSFetchSize=0
WSRetryCount=0
WSTimeout=120
126 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
Data Source Configuration
EnableQuotedIdentifiers=0
EncryptionMethod=0
FailoverGranularity=0
FailoverMode=0
FailoverPreconnect=0
FetchTSWTZasTimestamp=0
FetchTWFSasTime=1
GSSClient=native
HostName=<SQL_Server_host>
HostNameInCertificate=
InitializationString=
KeepAlive=0
Language=
LoadBalanceTimeout=0
LoadBalancing=0
LoginTimeout=15
LogonID=
MaxPoolSize=100
MinPoolSize=0
MultiSubnetFailover=0
PacketSize=-1
Password=
Pooling=0
PortNumber=<SQL_Server_server_port>
PRNGSeedFile=/dev/random
PRNGSeedSource=0
QueryTimeout=0
ReportCodePageConversionErrors=0
SnapshotSerializable=0
SSLLibName=
TrustStore=
TrustStorePassword=
ValidateServerCertificate=1
WorkStationID=
XMLDescribeType=-10
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 127
Chapter 5: Configuring the Product on UNIX/Linux
HostNameInCertificate=
InitializationString=
InterfacesFileServerName=
Language=
LoadBalanceTimeout=0
LoadBalancing=0
LoginTimeout=15
LogonID=
KeepAlive=0
MaxPoolSize=100
MinPoolSize=0
NetworkAddress=<Sybase_host,Sybase_server_port>
OptimizePrepare=1
PacketSize=0
Password=
Pooling=0
PRNGSeedFile=/dev/random
PRNGSeedSource=0
QueryTimeout=0
RaiseErrorPositionBehavior=0
ReportCodePageConversionErrors=0
SelectMethod=0
ServicePrincipalName=
SSLLibName=
TightlyCoupledDistributedTransactions=
TruncateTimeTypeFractions=0
TrustStore=
TrustStorePassword=
ValidateServerCertificate=1
WorkStationID=
XAOpenStringParameters=
128 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
Data Source Configuration
PacketSize=0
Password=
Pooling=0
QueryTimeout=0
RaiseErrorPositionBehavior=0
ReportCodePageConversionErrors=0
SelectMethod=0
ServicePrincipalName=
TightlyCoupledDistributedTransactions=
TruncateTimeTypeFractions=0
ValidateServerCertificate=1
WorkStationID=
XAOpenStringParameters=
[Teradata]
Driver=ODBCHOME/lib/ivtera27.so
Description=DataDirect 7.1 Teradata
AccountString=
AuthenticationDomain=
AuthenticationPassword=
AuthenticationUserid=
CharacterSet=ASCII
Database=
DBCName=<Teradata_server>
EnableDataEncryption=0
EnableExtendedStmtInfo=0
EnableLOBs=1
EnableReconnect=0
IntegratedSecurity=0
LoginTimeout=20
LogonID=
MapCallEscapeToExec=0
MaxRespSize=8192
Password=
PortNumber=1025
PrintOption=N
ProcedureWithSplSource=Y
ReportCodePageConversionErrors=0
SecurityMechanism=
SecurityParameter=
ShowSelectableTables=1
TDProfile=
TDRole=
TDUserName=
[Text]
Driver=ODBCHOME/lib/ivtxt27.so
Description=DataDirect 7.1 TextFile(*.*)
AllowUpdateAndDelete=0
ApplicationUsingThreads=1
CacheSize=4
CenturyBoundary=20
Database=ODBCHOME/demo
DataFileExtension=TXT
DecimalSymbol=.
Delimiter=,
FileOpenCache=0
FirstLineNames=0
IntlSort=0
ScanRows=25
TableType=Comma
UndefinedTable=GUESS
[Informix]
Driver=ODBCHOME/lib/ivinf27.so
Description=DataDirect 7.1 Informix
ApplicationUsingThreads=1
CancelDetectInterval=0
CursorBehavior=0
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 129
Chapter 5: Configuring the Product on UNIX/Linux
Database=<database_name>
EnableInsertCursors=0
GetDBListFromInformix=1
HostName=<Informix_host>
LogonID=
Password=
Protocol=onsoctcp
ServerName=<Informix_server>
Service=<Informix_service_name>
TrimBlankFromIndexName=1
[Oracle]
Driver=ODBCHOME/lib/ivor827.so
Description=DataDirect 7.1 Oracle
AlternateServers=
ApplicationUsingThreads=1
ArraySize=60000
CatalogIncludesSynonyms=1
CatalogOptions=0
ClientVersion=9iR2
ConnectionReset=0
ConnectionRetryCount=0
ConnectionRetryDelay=3
DefaultLongDataBuffLen=1024
DescribeAtPrepare=0
EnableDescribeParam=0
EnableNcharSupport=0
EnableScrollableCursors=1
EnableStaticCursorsForLongData=0
EnableTimestampWithTimeZone=0
LoadBalanceTimeout=0
LoadBalancing=0
LocalTimeZoneOffset=
LockTimeOut=-1
LogonID=
MaxPoolSize=100
MinPoolSize=0
OptimizeLongPerformance=0
Password=
Pooling=0
ProcedureRetResults=0
ReportCodePageConversionErrors=0
ReportRecycleBin=0
ServerName=<Oracle_server>
TimestampEscapeMapping=0
UseCurrentSchema=1
[ODBC]
IANAAppCodePage=4
InstallDir=ODBCHOME
Trace=0
130 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
Data Source Configuration
TraceFile=odbctrace.out
TraceDll=ODBCHOME/lib/ivtrc27.so
ODBCTraceMaxFileSize=102400
ODBCTraceMaxNumFiles=10
To modify or create data sources in the odbc.ini file, use the following procedures.
c) After making all modifications, save the odbc.ini file and close the text editor.
Important: The "Connection Option Descriptions" section of each driver chapter lists both the long and
short names of the attribute. When entering attribute names into odbc.ini, you must use the long name
of the attribute. The short name is not valid in the odbc.ini file.
e) In the [ODBC] section at the beginning of the file, add a new data_source_name=installed-driver pair
containing the new data source name and the appropriate installed driver name.
f) After making all modifications, save the odbc.ini file and close the text editor.
Important: The "Connection String Attributes" table of each driver chapter lists both the long and short
name of the attribute. When entering attribute names into odbc.ini, you must use the long name of the
attribute. The short name is not valid in the odbc.ini file.
Translators
Progress DataDirect provides a sample translator named "OEM to ANSI" that provides a framework for coding
a translation library. Refer to the readme.trn file in the /samples/src/trn subdirectory in the product
installation directory for details.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 131
Chapter 5: Configuring the Product on UNIX/Linux
To perform a translation with a particular driver, you must include the TranslationSharedLibrary keyword in that
driver’s data source definition in the odbc.ini file. The TranslationSharedLibrary keyword represents the full
path to the translation library.
For example, the 32-bit DB2 driver would be:
[DB2]
Driver=ODBCHOME/lib/ivdb227.so
Description=DataDirect 7.1 DB2 Wire Protocol
TranslationSharedLibrary=ODBCHOME/lib/ivtrn27.so
The TranslationOption keyword is the ASCII representation of the 32-bit integer translation option. Use of the
TranslationOption keyword is optional.
For example:
demoodbc -uid johndoe -pwd secret DataSource3
The demoodbc application is coded to execute a Select statement from a table named emp. If you have an
emp table in your database, the results are returned. If you do not have an emp table, you receive the message:
Invalid object name ’EMP’. This message confirms a successful connection to the database.
Refer to the demoodbc.txt file in the demo subdirectory for an explanation of how to build and use this application.
DSN-less Connections
Connections to a data source can be made via a connection string without referring to a data source name
(DSN-less connections). This is done by specifying the "DRIVER=" keyword instead of the "DSN=" keyword
in a connection string, as outlined in the ODBC specification. A file named odbcinst.ini must exist when the
driver encounters DRIVER= in a connection string.
132 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
DSN-less Connections
Setup installs a default version of this file in the product installation directory (see ODBCINST on page 113 for
details about relocating and renaming this file). This is a plain text file that contains default DSN-less connection
information. You should not normally need to edit this file. The content of this file is divided into several sections.
At the beginning of the file is a section named [ODBC Drivers] that lists installed drivers, for example,
Note: The odbcinst.ini file and the odbc.ini file include an [ODBC] section. If the information in these two
sections is not the same, the values in the odbc.ini [ODBC] section override those of the odbcinst.ini [ODBC]
section.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 133
Chapter 5: Configuring the Product on UNIX/Linux
APILevel=0
ConnectFunctions=YYY
DriverODBCVer=3.52
FileUsage=0
HelpRootDirectory=ODBCHOME/help
Setup=ODBCHOME/lib/ivdb27.so
SQLLevel=0
134 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
DSN-less Connections
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 135
Chapter 5: Configuring the Product on UNIX/Linux
FileExtns=*.*
FileUsage=1
HelpRootDirectory=ODBCHOME/help
Setup=ODBCHOME/lib/ivtxt27.so
SQLLevel=0
[Administrator]
HelpRootDirectory=ODBCHOME/adminhelp
[ODBC]
#This section must contain values for DSN-less connections
#if no odbc.ini file exists. If an odbc.ini file exists,
#the values from that [ODBC] section are used.
IANAAppCodePage=4
InstallDir=ODBCHOME
Trace=0
TraceFile=odbctrace.out
TraceDll=ODBCHOME/lib/odbctrc27.so
ODBCTraceMaxFileSize=102400
ODBCTraceMaxNumFiles=10
136 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
UTF-16 Applications on UNIX and Linux
For example, a file data source for the Oracle Wire Protocol driver would be similar to the following:
[ODBC]
Driver=DataDirect Oracle Wire Protocol
Port=1522
HostName=ORA2
LogonID=JOHN
Servicename=SALES.US.ACME.COM
CatalogOptions=1
It must contain all basic connection information plus any optional attributes. Because it uses the "DRIVER="
keyword, an odbcinst.ini file containing the driver location must exist (see DSN-less Connections on page 132).
The file data source is accessed by specifying the "FILEDSN=" instead of the "DSN=" keyword in a connection
string, as outlined in the ODBC specification. The complete path to the file data source can be specified in the
syntax that is normal for the machine on which the file is located. For example, on Windows:
FILEDSN=C:\Program Files\Common Files\ODBC\DataSources\Oraclewp.dsn
If no path is specified for the file data source, the Driver Manager uses the DefaultDSNDir property, which is
defined in the [ODBC File DSN] setting in the odbc.ini file to locate file data sources (see Configuration
Through the System Information (odbc.ini) File on page 117 for details). If the [ODBC File DSN] setting is
not defined, the Driver Manager uses the InstallDir setting in the [ODBC] section of the odbc.ini file. The Driver
Manager does not support the SQLReadFileDSN and SQLWriteFileDSN functions.
As with any connection string, you can specify attributes to override the default values in the data source:
FILEDSN=/home/users/john/filedsn/Oraclewp2.dsn;UID=james;PWD=test01
• The definition of SQLWCHAR in the ODBC header files must be switched from "char *" to "short *." To do
this, the application uses #define SQLWCHARSHORT.
• The application must set the encoding for the environment or connection using one of the following attributes.
If your application passes UTF-8 encoded strings to some connections and UTF-16 encoded strings to other
connections in the same environment, encoding should be set for the connection only; otherwise, either
method can be used.
• To configure the encoding for the environment, set the ODBC environment attribute
SQL_ATTR_APP_UNICODE_TYPE to a value of SQL_DD_CP_UTF16, for example:
rc = SQLSetEnvAttr(*henv,
SQL_ATTR_APP_UNICODE_TYPE,(SQLPOINTER)SQL_DD_CP_UTF16, SQL_IS_INTEGER);
• To configure the encoding for the connection only, set the ODBC connection attribute
SQL_ATTR_APP_UNICODE_TYPE to a value of SQL_DD_CP_UTF16. For example:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 137
Chapter 5: Configuring the Product on UNIX/Linux
138 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
6
Drivers for 32-Bit and 64-Bit Platforms
The following sections describe the drivers that are available in both 32- and 64-bit versions. See Drivers Only
Available for 32-Bit Platforms on page 717 and The Connect XE Drivers on page 827 for information on additional
Connect Series drivers.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 139
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
• Db2 for i
• Db2 for Linux, UNIX, and Windows
• Db2 for z/OS
• Db2 Hosted
• Db2 Warehouse on Cloud (formerly dashDB)
For the latest support information, visit the Progress DataDirect Supported Configurations page:
https://www.progress.com/supported-configurations/datadirect.
The DB2 Wire Protocol driver is supportedin the Windows, UNIX, and Linux environments. See
Environment-Specific Information on page 58 for detailed information about the environments supported by
this driver.
Refer to the readme file shipped with your DataDirect Connect product for the file name of the DB2 Wire Protocol
driver.
Driver Requirements
The server requirement for all platforms is the same. The DB2 database can be installed as the Server Version
or the Personal Edition.
The driver has no client requirements.
Binding
The driver does not work properly unless bind packages exist on every server to which you intend to connect.
IMPORTANT: You must have the appropriate privileges for the driver to create and bind packages with your
user ID. These privileges are:
• BINDADD for binding packages
• CREATEIN on the collection specified by the Package Collection option
• GRANT EXECUTE on the PUBLIC group for executing the packages
These are typically the permissions of a Database Administrator (DBA). If you do not have these privileges,
someone who has a user ID with DBA privileges needs to create packages by connecting with the driver.
When connecting for the first time, the driver determines whether bind packages exist on the server. If packages
do not exist, the driver creates them automatically using driver data source default values.
Note: The initial driver connection to a particular server may take a few minutes because of the number and
size of the packages that must be created on the server. Subsequent connections do not incur this delay.
140 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
If you change default values in a data source before connecting with the driver for the first time, the new defaults
are used when creating the packages. If you want to change these values after the packages have been
created, you can create or modify packages from the Modify Bindings tab of the Setup dialog. See Modify
Bindings tab under Configuring and Connecting to Data Sources on page 142 for details.
On UNIX and Linux, you can also create or modify packages through a special bind utility. Depending on the
platform of the DB2 server, the attribute values that must be set in the data source to bind packages are:
Linux/UNIX/Windows DB2 Servers: IpAddress, Database, TcpPort
DB2 for z/OS and DB2 for i Servers: IpAddress, Location, TcpPort
Other attribute values also affect binding. See the note for Modify Bindings tab under Configuring and Connecting
to Data Sources on page 142 for details. See Connection Option Descriptions for DB2 on page 160 for a description
of these connection string attributes and their values. You must use the default values or specify new ones for
these attributes in the DB2 data source section of the odbc.ini file before binding. See Configuring the Product
on UNIX/Linux on page 111 for details on creating the DB2 data source.
The bind utility is located in installation_directory/bin. After specifying the appropriate connection string attribute
values in the odbc.ini file, create or modify packages by entering the command:
bindxxdsn
where xx is the driver level number in the driver file name and dsn is the ODBC data source name in the
odbc.ini file. For example:
bind27 DB2 Wire Protocol
You are prompted for a user ID and password if they are not stored in the data source. If packages are created
and bound successfully, a message indicating success appears. If there are problems connecting or creating
the packages, an appropriate error message appears.
1. Copy the appropriate list (*.lst) file and bind (*.bnd) files located in the /bind directory to a directory on the
database server.
2. From the database server directory where you placed the list and bind files, start the DB2 command-line
utility. Use the utility to connect to the database where you want to bind the packages. Connect using the
following command:
connect to database_name user authorization_name using password
where:
database_name is the name of the database to which you are connecting.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 141
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
authorization_name is the name of the user you are authenticating to the server.
password is the user’s password.
142 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
On Windows, data sources are stored in the Windows Registry. You can configure and modify data sources
through the ODBC Administrator using a driver Setup dialog box, as described in this section.
On UNIX and Linux, data sources are stored in the odbc.ini file. On Linux, you can configure and
modify data sources through the Linux ODBC Administrator using a driver Setup dialog box, as described in
this section.
Note: This book shows dialog box images that are specific to Windows. If you are using the drivers in the
Linux environment, the dialog box that you see may differ slightly from the Windows version. Windows-only
and UNIX-only connection options are specifically noted by icons in the Setup dialog box descriptions.
When the driver is first installed, the values of its connection options are set by default. These values appear
on the driver Setup dialog box tabs when you create a new data source. You can change these default values
by modifying the data source. In the following procedure, the description of each tab is followed by a table that
lists the connection options for that tab and their initial default values. This table links you to a complete
description of the options and their connection string attribute equivalents. The connection string attributes are
used to override the default values of the data source if you want to change these values at connection time.
To configure a DB2 data source:
• On Windows, start the ODBC Administrator by selecting its icon from the Progress DataDirect
program group.
2. Select a tab:
• User DSN: If you are configuring an existing user data source, select the data source name and click
Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the
driver and click Finish to display the driver Setup dialog box.
• System DSN: If you are configuring an existing system data source, select the data source name
and click Configure to display the driver Setup dialog box.
If you are configuring a new system data source, click Add to display a list of installed drivers. Select
the driver and click Finish to display the driver Setup dialog box.
• File DSN: If you are configuring an existing file data source, select the data source file and click Configure
to display the driver Setup dialog box.
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select
a driver. Click Advanced if you want to specify attributes; otherwise, click Next to proceed. Specify a
name for the data source and click Next. Verify the data source information; then, click Finish to display
the driver Setup dialog box.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 143
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Note: The General tab displays only fields that are required for creating a data source. The fields on all
other tabs are optional, unless noted otherwise.
3. On this tab, provide values for the options in the following table; then, click Apply. The table provides links
to descriptions of the connection options.
144 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
4. Optionally, click the Advanced tab to specify additional data source settings.
Figure 2: Advanced tab
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 145
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Fetch Time Stamp With Time Zone as Timestamp on page 187 Disabled
Extended Options: Type a semi-colon separated list of connection options and their values. Use this
configuration option to set the value of undocumented connection options that are provided by Progress
DataDirect customer support. You can include any valid connection option in the Extended Options string,
for example:
DefaultIsolationLevel=1;UndocumentedOption1=value[;UndocumentedOption2=value;]
If the Extended Options string contains option values that are also set in the setup dialog or data source,
the values of the options specified in the Extended Options string take precedence. However, connection
options that are specified on a connection string override any option value specified in the Extended Options
string.
Note: Do not specify the Extended Options configuration option in a connection string, or the driver will
return an error. Instead, applications should specify the individual undocumented connection options in the
connection string.
146 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
Translate: Click Translate to display the Select Translator dialog box, which lists the translators
specified in the ODBC Translators section of the Registry. Progress DataDirect provides a translator named
OEM to ANSI that translates your data from the IBM PC character set to the ANSI character set.
Select a translator; then, click OK to close this dialog box.
5. Optionally, click the Security tab to specify security data source settings.
Figure 3: Security tab
See Using Security on page 89 for a general description of authentication and encryption and their
configuration requirements.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 147
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
6. Optionally, click the Modify Bindings tab to configure options for creating or modifying bind packages.
Figure 4: Modify Bindings tab
148 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
The Modify Bindings tab allows you to create or modify bind packages on the server accessed by the driver.
If you connect with the driver before explicitly creating bind packages, the driver creates packages on the
server automatically using the current values from the Setup dialog box. Alternatively, you can create a bind
package before testing the connection. You can also modify bind packages after their creation from the
Modify Bindings tab. You must also provide appropriate values for the options on the General tab.
Note: If you change any of the values on this tab after having initially created bind packages, you must
rebind the packages. The changes are reflected only on new connections after rebinding.
On this tab, provide values for any of the options in the following table; then, click Apply. Optionally, click
Modify Bindings to create a bind package before connection or modify an existing one. If you do not click
Modify Bindings, the driver uses the provided settings the next time it establishes a connection. The table
provides links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 149
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
7. Optionally, click the Failover tab to specify failover data source settings.
Figure 5: Failover tab
See Using Failover on page 78 for a general description of failover and its related connection options.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
150 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
8. Optionally, click the Pooling tab to specify connection pooling data source settings.
Figure 6: Pooling tab
See Using DataDirect Connection Pooling on page 97 for a general description of connection pooling.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 151
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
9. Optionally, click the Bulk tab to specify DataDirect Bulk Load data source settings.
Figure 7: Bulk tab
See Using DataDirect Bulk Load on page 101 for a general description of DataDirect Bulk Load.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
152 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
If your application is already coded to use parameter array batch functionality, you can leverage DataDirect
Bulk Load features through the Enable Bulk Load connection option. Enabling this option automatically
converts the parameter array batch operation to use the database bulk load protocol.
If you are not using parameter array batch functionality, you can export data to a bulk load data file, verify
the metadata of the bulk load configuration file against the structure of the target table, and bulk load data
to a table. Use the following steps to accomplish these tasks.
a) To export data from a table to a bulk load data file, click Export Tablefrom the Bulk tab. The Export
Table dialog box appears.
Figure 8: Export Table dialog box
Both a bulk data file and a bulk configuration file are produced by exporting a table. The configuration
file has the same name as the data file, but with an XML extension. See Using DataDirect Bulk Load on
page 101 for details about these files.
The bulk export operation can create a log file and can also export to external files. See External Overflow
Files on page 108 for more information. The export operation can be configured such that if any errors
or warnings occur:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 153
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Table Name: A string that specifies the name of the target database table into which the data is to be
loaded.
Configuration Filename: A string that specifies the path (relative or absolute) and file name of the bulk
configuration file. The file name must be the fully qualified path to the configuration file.
Click Verify to verify table structure or click Cancel.
b) To bulk load data from the bulk data file to a database table, click Load Tablefrom the Bulk tab. The
Load File dialog box appears.
154 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
The load operation can create a log file and can also create a discard file that contains rows rejected
during the load. The discard file is in the same format as the bulk load data file. After fixing reported
issues in the discard file, the bulk load can be reissued using the discard file as the bulk load data file.
Figure 10: Load table dialog box
The export operation can be configured such that if any errors or warnings occur:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 155
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
156 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
10. Optionally, click the Client Monitoring tab to specify additional data source settings.
Figure 11: Client Monitoring tab
See Using Client Information on page 87 for additional information about client monitoring.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
11. At any point during the configuration process, you can click Test Connect to attempt to connect to the data
source using the connection options specified in the driver Setup dialog box. A logon dialog box appears
(see Using a Logon Dialog Box (DB2) on page 159 for details). Note that the information you enter in the
logon dialog box during a test connect is not saved.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 157
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
• If the driver can connect, it releases the connection and displays a Connection Established message.
Click OK.
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message. Click OK.
Important: If you have not already created bind packages by clicking the Modify Bindings button on the
Modify Bindings tab, the initial connection through the Test Connect button may take a few minutes because
of the number and size of the packages that must be created on the server. Subsequent connections occur
without this delay.
Note: If you are configuring alternate servers for use with the connection failover feature, be aware that
the Test Connect button tests only the primary server, not the alternate servers.
12. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
DSN=data_source_name[;attribute=value[;attribute=value]...]
FILEDSN=filename.dsn[;attribute=value[;attribute=value]...]
The DSN-less connection string specifies a driver instead of a data source. All connection information must be
entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
Connection Option Descriptions for DB2 on page 160 lists the long and short names for each attribute, as well
as the initial default value when the driver is first installed. You can specify either long or short names in the
connection string.
An example of a DSN connection string with overriding attribute values for DB2 for Linux/UNIX/Windows is:
DSN=DB2ACCOUNT;DB=DB2DATA;UID=JOHN;PWD=XYZZY
158 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
1. In the Ip Address field, type the IP (Internet Protocol) address of the machine where the catalog tables are
stored. Specify the address using the machine's numeric address (for example, 123.456.78.90) or specify
its host name. If you enter a host name, the driver must find this name (with the correct address assignment)
in the HOSTS file on the workstation or in a DNS server. The default is localhost.
The IP address can be specified in either IPv4 or IPv6 format, or a combination of the two. See Using IP
Addresses on page 67 for details concerning these formats.
2. In the Tcp Port field, type the port number that is assigned to the DB2 server on the machine where the
catalog tables are stored. Specify either this port's numeric address or its service name (50000 is the default
port address). If you specify a service name, the driver must find this name (with the correct port assignment)
in the SERVICES file on the workstation.
3. If you are running DB2 for z/OS or DB2 for i, perform Steps 3a and 3b. Otherwise, skip to Step 4.
a) In the Location field, type the DB2 location name. Use the name defined during the local DB2 installation.
b) By default, the User ID is used for the value of Collection. The User ID must always be used on DB2 for
z/OS.
On DB2 for i, you can type the name of the schema that is to be the default qualifier for unqualified object
names. If you want to access a table outside of this schema, you need to specify the appropriate two-part
name, for example, SELECT * FROM Schema.Tablename. On DB2 for i only, Collection is also the
current library.
Skip to Step 5.
4. If you are running DB2 for Linux/UNIX/Windows, type the name of the database to which you want to connect
in the Database field.
5. If required, type your logon ID in the User Name field.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 159
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
BulkBinaryThreshold (BBT) 32
BulkCharacterThreshold (BCT) -1
CharsetFor65535 (CF6) 0
160 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
ConnectionRetryCount (CRC) 0
ConnectionRetryDelay (CRD) 3
FetchTSWTZasTimestamp 0 (Disabled)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 161
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
LoadBalanceTimeout (LBT) 0
LoginTimeout (LT) 15
MinPoolSize (MNPS) 0
PackageNamePrefix (PNP) DD
QueryTimeout (QT) 0
162 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
Accounting Info
Attribute
AccountingInfo (AI)
Purpose
Specifies accounting information to be stored in the database. This value sets the CURRENT CLIENT_ACCTNG
register (DB2 for Linux/UNIX/Windows) or the CLIENT ACCTNG register (DB2 for z/OS) in the database. This
value is used by the DB2 Workload Manager.
Valid Values
string
where:
string
Default
None
GUI Tab
Client Monitoring tab
See also
Performance Considerations on page 212
Attribute
AddStringToCreateTable (ASCT)
Purpose
Specifies a string that is automatically added to all Create Table statements. This option is for users who need
to add an In Database clause to Create Table statements.
Valid Values
string
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 163
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
string
Default
None
GUI Tab
Advanced tab
AllowedOpenSSLVersions
Attribute
AllowedOpenSSLVersions (AOV)
Purpose
Important: Version 1.0.2 of the OpenSSL library has reached the end of its product life cycle and is no longer
receiving security updates. Best security practices dictate that you use the latest version of the library.
Determines which version of the OpenSSL library file the driver uses for data encryption. Although the latest
version of the OpenSSL library is the most secure, some characteristics of the library can cause connections
to certain databases to fail. This option allows you to continue using older versions of the OpenSSL library
while you transition your environment to support the latest version.
Valid Values
latest | openssl_version_number[[,openssl_version_number]...]
where:
openssl_version_number
is the version number for the OpenSSL library file to be loaded by the driver, for example, 1.0.2.
When more than one version is specified, the driver will first attempt to load the first version listed.
If the driver is unable to locate and load this file, it will attempt to load the next version in the value.
The driver currently supports versions 1.1.1 and 1.0.2. Refer to the installed readme for latest
supported versions.
Behavior
If set to latest, the driver loads the latest installed version of the OpenSSL library file provided by Progress.
If set to openssl_version_number, the driver loads the specified version of the OpenSSL library file. This
value is used to specify a version other than the latest.
164 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
Notes
• This option is ignored if OpenSSL library files are specified using the CryptoLibName and SSLLibName
options.
• This option works only with OpenSSL library files provided by Progress and user supplied OpenSSL library
files that match Progress's naming convention and installation location.
• This option works only for installations using the default directory structure.
• Consult your database administrator concerning the security settings of your server.
Default
1.1.1,1.0.2
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
AllowedOpenSSLVersions=1.0.2
See also
Advanced tab
Alternate ID
Attribute
AlternateID (AID)
Purpose
Specifies the name of the default schema that is used to qualify unqualified database objects in dynamically
prepared SQL statements. If the attempt to change the current schema fails, the connection fails and you
receive the message Invalid value for Alternate ID. Refer to IBM for i documentation for permission
requirements imposed by the database.
Valid Values
string
where:
string
Default
None
GUI Tab
Advanced tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 165
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Alternate Servers
Attribute
AlternateServers (ASRV)
Purpose
A list of alternate database servers to which the driver tries to connect if the primary database server is
unavailable. Specifying a value for this option enables connection failover for the driver. The value you specify
must be in the form of a string that defines the physical location of each alternate server. All of the other required
connection information for each alternate server is the same as what is defined for the primary server connection.
Valid Values
(IPAddress=ipvalue:TcpPort=portvalue:{Database | Location}=
databasevalue [, . . .])
You must specify the IP address, port number, and database name (Linux/UNIX/Windows) or location (DB2
for z/OS and DB2 for i) of each alternate server.
Example
The following Alternate Servers values define two alternate database servers for connection failover:
AlternateServers=(IpAddress=123.456.78.90:TcpPort=5177:Database=DB2DAT,
IpAddress=223.456.78.90:TcpPort=5178:Database=DB2DAT3)
or
AlternateServers=(IpAddress=123.456.78.90:
TcpPort=5177:Location=DB2DAT, IpAddress=223.456.78.90:TcpPort=5178:
Location=DB2DAT3)
Notes
• An alternate server address in IPv6 format must be enclosed in double quotation marks.
Default
None
GUI Tab
Failover tab
Application Name
Attribute
ApplicationName (AN)
166 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
Purpose
Specifies the name of the application to be stored in the database. This value sets the CURRENT
CLIENT_APPLNAME register (DB2 for Linux/UNIX/Windows) or CLIENT APPLNAME register (DB2 for z/OS)
in the database. For DB2 V9.1 and higher for Linux/UNIX/Windows, this value also sets the APPL_NAME value
of the SYSIBMADM.APPLICATIONS table. This value is used by the DB2 Workload Manager.
Valid Values
string
where:
string
Notes
• This connection option can affect performance.
Default
None
GUI Tab
Client Monitoring tab
See also
Performance Considerations on page 212
Attribute
ApplicationUsingThreads (AUT)
Purpose
Determines whether the driver works with applications using multiple ODBC threads.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver works with single-threaded and multi-threaded applications.
If set to 0 (Disabled), the driver does not work with multi-threaded applications. If using the driver with
single-threaded applications, this value avoids additional processing required for ODBC thread-safety standards.
Default
1 (Enabled)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 167
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
GUI Tab
Advanced tab
See also
Performance Considerations on page 212
Authentication Method
Attribute
AuthenticationMethod (AM)
Purpose
Specifies the method the driver uses to authenticate the user to the server when a connection is established.
If the specified authentication method is not supported by the database server, the connection fails and the
driver generates an error.
Valid Values
0|1|2|3|4|7|8
Behavior
If set to 0 (No Encryption), the driver sends the user ID and password in clear text to the server for authentication.
If set to 1 (Encrypt Password), the driver sends the user ID in clear text and an encrypted password to the
server for authentication.
If set to 2 (Encrypt UID and Password), the driver sends an encrypted user ID and password to the server for
authentication.
If set to 3 (Client Authentication), the driver uses client authentication when establishing a connection. The
database server relies on the client to authenticate the user and does not provide additional authentication.
If set to 4 (Kerberos Authentication), the driver uses Kerberos authentication. This method supports both
Windows Active Directory Kerberos and MIT Kerberos environments.
If set to 7 (Encrypted Password AES), the driver encrypts the password with 256-bit AES encryption in the
connection request. (DB2 V9.7 and higher only.)
If set to 8 (Encrypted UID and Password AES), the driver encrypts the user id and password with 256-bit AES
encryption in the connection request. (DB2 V9.7 and higher only.)
Notes
• The use of AES encryption (values 7 and 8) requires that the DataDirect OpenSSL library be installed.
Default
0 (No Encryption)
GUI Tab
Security tab
168 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
Batch Size
Attribute
BulkLoadBatchSize (BLBS)
Purpose
The number of rows that the driver sends to the database at a time during bulk operations. This value applies
to all methods of bulk loading.
Valid Values
0|x
where:
Default
1024
GUI Tab
Bulk tab
Attribute
BulkBinaryThreshold (BBT)
Purpose
The maximum size, in KB, of binary data that is exported to the bulk data file.
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, all binary data, regardless of size, is written to the bulk data file, not to an external file.
If set to 0, all binary data, regardless of size, is written to an external file, not the bulk data file. A reference to
the external file is written to the bulk data file.
If set to x, any binary data exceeding this specified number of KB is written to an external file, not the bulk data
file. A reference to the external file is written to the bulk data file.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 169
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Default
32
GUI Tab
Bulk tab
Attribute
BulkCharacterThreshold (BCT)
Purpose
The maximum size, in KB, of character data that is exported to the bulk data file.
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, all character data, regardless of size, is written to the bulk data file, not to an external file.
If set to 0, all character data regardless of size, is written to an external file, not the bulk data file. A reference
to the external file is written to the bulk data file.
If set to x, any character data exceeding this specified number of KB is written to an external file, not the bulk
data file. A reference to the external file is written to the bulk data file.
Default
-1
GUI Tab
Bulk tab
Catalog Schema
Attribute
CatalogSchema (CS)
Purpose
Specifies the DB2 schema to use for Catalog functions. Specifying a schema allows you to use copies or views
of the system catalog tables for catalog functions.
170 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
Valid Values
schema_name
where:
schema_name
is the name of a valid DB2 schema. If you do not specify a value for this attribute, the driver uses
SYSIBM when connected to DB2 for z/OS, QSYS2 when connected to DB for ii, and SYSCAT when
connected to Linux/UNIX/Windows.
Example
Create a view DB2ADMIN.TABLES from SYSCAT.TABLES.
CREATE VIEW DB2ADMIN.TABLES AS SELECT * FROM SYSCAT.TABLES WHERE OWNER LIKE 'ODBC%'
The results come from the DB2ADMIN.TABLES view. Three rows are fetched from five columns.
<Null>, "DB2ADMIN", "BUG", "TABLE", <Null>
<Null>, "DB2ADMIN", "DATETEST", "TABLE", <Null>
<Null>, "DB2ADMIN", "TESTCP", "TABLE", <Null>
Default
None
GUI Tab
Advanced tab
Attribute
CharsetFor65535 (CF6)
Purpose
Specifies the IANA code page to be used by the driver to convert character data stored as bit data in character
columns (Char, Varchar, Longvarchar, Clob, Char for Bit Data, Varchar for Bit Data, Longvarchar for Bit Data)
defined with CCSID 65535.
Valid Values
0 | IANA_code_page
where:
IANA_code_page
is a valid IANA code page. Refer to "IBM to IANA code page values" in the Progress DataDirect for
ODBC Drivers Reference for a list of the most commonly used IBM code pages and their IANA code
page equivalents.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 171
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Behavior
If unspecified or set to 0, the driver returns these columns as binary columns (SQL_BINARY, SQL_VARBINARY,
SQL_LONGVARBINARY) and does no conversion of the data.
If an IANA code page is specified, the driver returns these columns as character columns in the character set
specified. The driver does no conversion of data supplied in bound parameters.
Default
0
GUI Tab
Advanced tab
Attribute
ClientHostName (CHN)
Purpose
Specifies the host name of the client machine to be stored in the database. This value sets the CURRENT
CLIENT_WRKSTNNAME register (DB2 for Linux/UNIX/Windows) or CLIENT WRKSTNNAME register (DB2
for z/OS) in the database. This value is used by the DB2 Workload Manager.
Valid Values
string
where:
string
Notes
• This connection option can affect performance.
Default
None
GUI Tab
Client Monitoring tab
See also
Performance Considerations on page 212
172 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
Client User
Attribute
ClientUser (CU)
Purpose
The user ID to be stored in the database. This option sets the CURRENT CLIENT_USERID register (DB2 for
Linux/UNIX/Windows) and CLIENT USERID register (DB2 for z/OS) in the database. This value is used by the
DB2 Workload Manager.
Valid Values
-1 | client_userid
where:
client_userid
Behavior
When set to -1, the driver uses the userid of the user that is currently logged onto the client.
Default
None
GUI Tab
Client Monitoring tab
See also
Performance Considerations on page 212
Notes
• This connection option can affect performance.
Collection
Attribute
Collection (COL)
Purpose
The current collection or library. Valid only on DB2 for z/OS and DB2 for i.
For DB2 for z/OS, this value is the user ID. If an attempt to change the current schema fails, the connection
fails and you receive the message Invalid value for Alternate ID.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 173
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
For DB2 for i, this value is the name of the schema to be used as the default qualifier for unqualified object
names. If you want to access a table outside of this schema, you must specify the schema name and the table
name. For example:
Valid Values
user_ID (DB2 for z/OS) | schema_name (DB2 for i)
where:
user_ID
is a valid user ID. DB2 permissions on the user ID must be set to SYSADM.
schema_name
Notes
• This option is mutually exclusive with the Database Name option.
Default
None
GUI Tab
General tab
Attribute
ConcurrentAccessResolution (CAR)
Purpose
Specifies whether a read-only query can access the currently committed value of rows that are locked by a
transaction that is updating the rows. The driver must be connected to DB2 V9.7 for LUW or higher and the
application isolation level must be either read committed or repeatable read.
Valid Values
0|1|2
Behavior
If set to 0 (Automatic), the driver persists the server behavior, as specified by the cur_commit server parameter.
If cur_commit is set to "Available" or "Disable," then the current behavior, pending until the row lock is released,
is used. When cur_commit is set to "On," the driver returns the last committed value of the row, regardless of
whether the row is locked.
174 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
If set to 1 (Wait For Outcome), the driver always waits for the transaction to be completed before returning a
row of data that has been locked by another transaction, regardless of how the cur_commit parameter is
configured on the server.
If set to 2 (Use Currently Committed), the driver returns the value that was committed during the last transaction
if the cur_commit parameter is configured to "On" or "Available," even though the row is locked.
Notes
• This option is ignored when connecting to a DB2 server version earlier than DB2 V9.7 for LUW.
• DB2 V10 for z/OS and DB2 for i 7.1 using DRDA do not currently support reading committed data while
performing UPDATE statements. In this scenario, transactions always wait for a commit or rollback operation
if they encounter data that is being updated or deleted.
Default
0 (Automatic)
GUI Tab
Advanced tab
Connection Pooling
Attribute
Pooling (POOL)
Purpose
Specifies whether to use the driver’s connection pooling.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses connection pooling.
If set to 0 (Disabled), the driver does not use connection pooling.
Notes
• The application must be thread-enabled to use connection pooling.
Default
0 (Disabled)
GUI Tab
Pooling tab
See also
Performance Considerations on page 212
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 175
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Connection Reset
Attribute
ConnectionReset (CR)
Purpose
Determines whether the state of connections that are removed from the connection pool for reuse by the
application is reset to the initial configuration of the connection.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the state of connections removed from the connection pool for reuse by an application is
reset to the initial configuration of the connection. Resetting the state can negatively impact performance
because additional commands must be sent over the network to the server to reset the state of the connection.
If set to 0 (Disabled), the state of connections is not reset.
Notes
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Pooling tab
See also
Performance Considerations on page 212
Attribute
ConnectionRetryCount (CRC)
Purpose
The number of times the driver retries connection attempts to the primary database server, and if specified,
alternate servers until a successful connection is established.
This option and the Connection Retry Delay connection option, which specifies the wait interval between
attempts, can be used in conjunction with failover.
Valid Values
0|x
where:
176 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
Behavior
If set to 0, the driver does not try to connect after the initial unsuccessful attempt.
If set to x, the driver retries connection attempts the specified number of times. If a connection is not established
during the retry attempts, the driver returns an error that is generated by the last server to which it tried to
connect.
Default
0
GUI Tab
Failover tab
Attribute
ConnectionRetryDelay (CRD)
Purpose
The number of seconds the driver waits between connection retry attempts when Connection Retry Count is
set to a positive integer.
This option and the Connection Retry Count connection option can be used in conjunction with failover.
Valid Values
0|x
where:
Behavior
If set to 0, there is no delay between retries.
If set to x, the driver waits the specified number of seconds between connection retry attempts.
Default
3
GUI Tab
Failover tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 177
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Attribute
CryptoProtocolVersion (CPV)
Purpose
Specifies a comma-separated list of the cryptographic protocols to use when SSL is enabled using the Encryption
Method connection option (EncryptionMethod=1). When multiple protocols are specified, the driver uses the
highest version supported by the server. If none of the specified protocols are supported by the database
server, the connection fails and the driver returns an error.
Valid Values
cryptographic_protocol [[, cryptographic_protocol ]...]
where:
cryptographic_protocol
Caution: Good security practices recommend using TLSv1 or higher, due to known vulnerabilities in the SSLv2
and SSLv3 protocols.
Example
If your security environment is configured to use TLSv1.2 and TLSv1.1, specify the following values:
CryptoProtocolVersion=TLSv1.2, TLSv1.1
Notes
• This option is ignored if Encryption Method is set to 0 (No Encryption) or 2 (Database Encryption).
• Consult your database administrator concerning the data encryption settings of your server.
Default
TLSv1.2,TLSv1.1,TLSv1
GUI Tab
Security tab
CryptoLibName
Attribute
CryptoLibName (CLN)
178 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
Purpose
The absolute path for the OpenSSL library file containing the cryptographic library to be used by the data source
or connection when TLS/SSL is enabled. The cryptograpic library contains the implementations of cryptographic
algorithms the driver uses for data encryption.
This option allows you to designate a different cryptographic library if you encounter issues with the default
version or want to use a library that you provide. Common issues that require designating a different library
include security vulnerabilities with specific libraries or compatibility issues with your server or application.
Valid Values
absolute_path\openssl_filename
where:
absolute_path
openssl_filename
is the name of the OpenSSL library file containing the cryptographic library to be used by your data
source or connection.
Example
C:\Program Files\Progress\DataDirect\Connect64_for_ODBC_71\
Drivers\OpenSSL\1.0.0r\ddssl27.dll; (64-bit Windows)
Notes
• The OpenSSL library files provided by Progress combine the cryptographic and TLS/SSL libraries into a
single file; therefore, when your drivers are using a Progress library file, the values specified for the
CryptoLibName and SSLLibName options should be the same. For non-Progress library files, the libraries
may use separate files, which would require unique values to be specified.
• This option can be used to designate OpenSSL libraries not installed by the product; however, the drivers
are only certified against libraries provided by Progress.
Default
For UNIX/Linux:
Empty string
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
CryptoLibName=C:\Program Files\Progress\DataDirect\
Connect64_for_ODBC_71\drivers\OpenSSL\1.0.0r\ddssl27.dll;
See Advanced tab for details.
See also
SSLLibName on page 204
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 179
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Attribute
CurrentFunctionPath (CFP)
Purpose
Specifies a comma-separated list of DB2 schema names used to resolve unqualified function names and data
type references in dynamically prepared SQL statements. This value also is used to resolve unqualified stored
procedure names specified in CALL statements.
Valid Values
schema_name[,...]
where:
schema_name
Default
None
GUI Tab
Advanced tab
Attribute
DataSourceName (DSN)
Purpose
The name of a data source in your Windows Registry or odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
180 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
Database Name
Attribute
Database (DB)
Purpose
The name of the database to which you want to connect.
Valid only for DB2 for Linux/UNIX/Windows.
This option is mutually exclusive with the Location Name and Collection options.
Valid Values
ext
where:
ext
This value is used for all Create Table statements. Sending a Create Table using an extension other than the
value specified for this option causes an error.
In other SQL statements, such as Select or Insert, users can specify an extension other than the one specified
for this connection option. The Data File Extension value is used when no extension is specified.
Default
None
GUI Tab
General tab
Attribute
DefaultIsolationLevel (DIL)
Purpose
Specifies the method by which locks on data in the database are acquired and released.
The following table shows how ODBC isolation levels map to DB2 isolation levels.
ODBC DB2
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 181
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
ODBC DB2
Refer to "Locking and isolation levels" in the Progress DataDirect for ODBC Drivers Reference for details.
Valid Values
0|1|2|3|4
Behavior
If set to 0 (READ_UNCOMMITTED), other processes can be read from the database. Only modified data is
locked and is not released until the transaction ends.
If set to 1 (READ_COMMITTED) other processes can change a row that your application has read if the cursor
is not on the row you want to change. This level prevents other processes from changing records that your
application has changed until your application commits them or ends the transaction.
It also prevents your application from reading a modified record that has not been committed by another process,
unless the Concurrent Access Resolution connection option is set to:
• Automatic (0) and the cur_commit server parameter is set to On
• Use Currently Committed (2) and the cur_commit server parameter is set to On or Available
In either of these cases, the application can read the last committed value. See the connection option Concurrent
Access Resolution on page 174 for further details.
See Cursor Stability Isolation Level on page 216 for information about enhancements to the Read Committed
(Cursor Stability) isolation level.
If set to 2 (REPEATABLE_READ), other processes are prevented from accessing data that your application
has read or modified. All read or modified data is locked until transaction ends.
If set to 3 (SERIALIZABLE), other processes are prevented from changing records that are read or changed
by your application (including phantom records) until your program commits them or ends the transaction. This
level prevents the application from reading modified records that have not been committed by another process.
If your application opens the same query during a single unit of work under this isolation level, the results table
will be identical to the previous table; however, it can contain updates made by your application.
If set to 4 (NONE), your application can read modified records even if they have not been committed by another
application. This level can only be set in the data source, not from the application. (This level is valid only on
DB2 for i, and is the only isolation level that works for collections that have journaling disabled.)
Default
1 (READ_COMMITTED)
GUI Tab
Advanced tab
182 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
Description
Attribute
Description (n/a)
Purpose
An optional long description of a data source. This description is not used as a runtime connection attribute,
but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Dynamic Sections
Attribute
DynamicSections (DS)
Purpose
Specifies the maximum number of prepared statements that the driver can have open at any time.
A dynamic section is associated with a prepared statement. The driver only keeps open the number of prepared
statements specified by the dynamic sections value. If the driver detects that the number of dynamic sections
available in the bound DB2 packages is less than the number of dynamic sections requested in the connection
string or data source, it generates the following message:
The current number of dynamic sections available for use is different than the number
of dynamic sections currently specified in the connection string or data source.
Valid Values
x
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 183
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Default
1000
GUI Tab
Modify Bindings tab
Encryption Method
Attribute
EncryptionMethod (EM)
Purpose
The method the driver uses to encrypt data sent between the driver and the database server. If the specified
encryption method is not supported by the database server, the connection fails and the driver returns an error.
Valid Values
0|1|2
Behavior
If set to 0 (No Encryption), data is not encrypted.
If set to 1 (SSL), data is encrypted using the SSL protocols specified in the Crypto Protocol Version connection
option.
If set to 2 (Database Encryption), data is encrypted using the DB2 encryption protocol (supported only on DB2
for Linux/UNIX/Windows and DB2 for z/OS).
This option can only be set to 1 or 2 when Authentication Method is set to 0, 1, or 2.
Notes
• This connection option can affect performance.
Default
0 (No Encryption)
GUI Tab
Security tab
See also
Crypto Protocol Version on page 178
Performance Considerations on page 212
Failover Granularity
Attribute
FailoverGranularity (FG)
184 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
Purpose
Determines whether the driver fails the entire failover process or continues with the process if errors occur
while trying to reestablish a lost connection.
This option applies only when Failover Mode is set to 1 (Extended Connection) or 2 (Select).
Valid Values
0|1|2|3
Behavior
If set to 0 (Non-Atomic), the driver continues with the failover process and posts any errors on the statement
on which they occur.
If set to 1 (Atomic) the driver fails the entire failover process if an error is generated as the result of anything
other than executing and repositioning a Select statement. If an error is generated as a result of repositioning
a result set to the last row position, the driver continues with the failover process, but generates a warning that
the Select statement must be reissued.
If set to 2 (Atomic Including Repositioning), the driver fails the entire failover process if any error is generated
as the result of restoring the state of the connection or the state of work in progress.
If set to 3 (Disable Integrity Check), the driver does not verify that the rows that were restored during the failover
process match the original rows. This value applies only when Failover Mode is set to 2 (Select).
Default
0 (Non-Atomic)
GUI Tab
Failover tab
Failover Mode
Attribute
FailoverMode (FM)
Purpose
Specifies the type of failover method the driver uses.
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
Valid Values
0|1|2
Behavior
If set to 0 (Connection), the driver provides failover protection for new connections only.
If set to 1 (Extended Connection), the driver provides failover protection for new and lost connections, but not
any work in progress.
If set to 2 (Select), the driver provides failover protection for new and lost connections. In addition, it preserves
the state of work performed by the last Select statement executed.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 185
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Notes
• This connection option can affect performance.
Default
0 (Connection)
GUI Tab
Failover tab
See also
Performance Considerations on page 212
Failover Preconnect
Attribute
FailoverPreconnect (FP)
Purpose
Specifies whether the driver tries to connect to the primary and an alternate server at the same time.
This attribute applies only when Failover Mode is set to 1 (Extended Connection) or 2 (Select) and at least one
alternate server is specified.
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
Valid Values
0|1
Behavior
If set to 0 (Disabled), the driver tries to connect to an alternate server only when failover is caused by an
unsuccessful connection attempt or a lost connection. This value provides the best performance, but your
application typically experiences a short wait while the failover connection is attempted.
If set to 1 (Enabled), the driver tries to connect to the primary and an alternate server at the same time. This
can be useful if your application is time-sensitive and cannot absorb the wait for the failover connection to
succeed.
Default
0 (Disabled)
GUI Tab
Failover tab
186 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
Attribute
FetchTSWTZasTimestamp
Purpose
Determines whether the driver returns Timestamp with Time Zone columns as an ODBC
SQL_TYPE_TIMESTAMP or as a SQL_VARCHAR data type.
Valid only for DB2 for z/OS, version 10 or higher.
Valid Values
0|1
Behavior
If set to 0 (Disabled), Timestamp with Time Zone columns are mapped to SQL_VARCHAR. Use this setting if
your application needs to retrieve the information as a string.
If set to 1 (Enabled), the driver maps Timestamp with Time Zone columns to the ODBC SQL_TYPE_TIMESTAMP
data type. The time zone information is truncated from the results.
Default
0 (Disabled)
GUI Tab
Advanced tab
Field Delimiter
Attribute
BulkLoadFieldDelimiter (BLFD)
Purpose
Specifies the character that the driver will use to delimit the field entries in a bulk load data file.
Valid Values
x
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 187
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Notes
• The Bulk Load Field Delimiter character must be different from the Bulk Load Record Delimiter.
Default
None
GUI Tab
Bulk tab
Attribute
GrantExecute (GE)
Purpose
Determines how EXECUTE privileges are granted on DB2 packages.
Valid Values
0|1
Behavior
If set to 1 (Enabled), EXECUTE privileges are granted on DB2 packages that you are creating. By default, the
schema to which privileges are granted is PUBLIC.
If set to 0 (Disabled), EXECUTE privileges are granted to the schema that created the DB2 packages.
Default
1 (Enabled)
GUI Tab
Modify Bindings tab
Attribute
GrantAuthid (GA)
Purpose
Determines which DB2 schema is granted EXECUTE privileges for DB2 packages.
Valid Values
schema_name
where:
188 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
schema_name
Default
PUBLIC
GUI Tab
Modify Bindings tab
Attribute
GSSClient (GSSC)
Purpose
The name of the GSS client library that the driver uses to communicate with the Key Distribution Center (KDC).
The driver uses the path defined by the PATH environment variable for loading the specified client library.
Valid Values
native | client_library
where:
client_library
Behavior
If set to client_library, the driver uses the specified GSS client library.
If set to native, the driver uses the GSS client shipped with the operating system.
Default
native
GUI Tab
Security tab
Attribute
HostNameInCertificate (HNIC)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 189
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
A host name for certificate validation when SSL encryption is enabled (Encryption Method=1) and validation
is enabled (Validate Server Certificate=1). This option provides additional security against man-in-the-middle
(MITM) attacks by ensuring that the server the driver is connecting to is the server that was requested.
Valid Values
host_name | #SERVERNAME#
where:
host_name
is the host name specified in the certificate. Consult your SSL administrator for the correct value.
Behavior
If host_name is specified, the driver examines the subjectAltName values included in the certificate. If a
dnsName value is present in the subjectAltName values, then the driver compares the value specified for Host
Name In Certificate with the dnsName value. The connection succeeds if the values match. The connection
fails if the Host Name In Certificate value does not match the dnsName value.
If no subjectAltName values exist or a dnsName value is not in the list of subjectAltName values, then the
driver compares the value specified for Host Name In Certificate with the commonName part of the Subject
name in the certificate. The commonName typically contains the host name of the machine for which the
certificate was created. The connection succeeds if the values match. The connection fails if the Host Name
In Certificate value does not match the commonName. If multiple commonName parts exist in the Subject
name of the certificate, the connection succeeds if the Host Name In Certificate value matches any of the
commonName parts.
If #SERVERNAME# is specified, the driver compares the host server name specified as part of a data source or
connection string to the dnsName or the commonName value.
Default
None
GUI Tab
Security tab
IANAAppCodePage
Attribute
IANAAppCodePage (IACP)
Purpose
An Internet Assigned Numbers Authority (IANA) value. You must specify a value for this option if your application
is not Unicode-enabled or if your database character set is not Unicode.
The driver uses the specified IANA code page to convert "W" (wide) functions to ANSI.
The driver and Driver Manager both check for the value of IANAAppCodePage in the following order:
• In the connection string
• In the Data Source section of the system information file (odbc.ini)
190 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
Valid Values
IANA_code_page
where:
IANA_code_page
is one of the valid values listed in "IANAAppCodePage values" in the Progress DataDirect for ODBC
Drivers Reference. The value must match the database character encoding and the system locale.
Notes
Refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers Reference
for details.
Default
4 (ISO 8559-1 Latin-1)
GUI Tab
Advanced tab
Ip Address
Attribute
IpAddress (IP)
Purpose
Identifies the machine where catalog tables are stored.
Valid Values
host_name | IP_address
where:
host_name
is the host name of the machine where catalog tables are stored. The driver must be able to find this
name (with the correct address assignment) in the HOSTS file on the workstation or in a DNS server.
IP_address
is the IP address of the machine where catalog tables are stored. The IP address can be specified
in either IPv4 or IPv6 format, or a combination of the two. See Using IP Addresses on page 67 for
details about these formats.
Default
localhost
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 191
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
GUI Tab
General tab
Key Password
Attribute
KeyPassword (KP)
Purpose
Specifies the password used to access the individual keys in the keystore file when SSL is enabled (Encryption
Method=1) and SSL client authentication is enabled on the database server. Keys stored in a keystore can be
individually password-protected. To extract the key from the keystore, the driver must have the password of
the key.
Valid Values
key_password
where:
key_password
Default
None
GUI Tab
Security tab
Keystore
Attribute
Keystore (KS)
Purpose
The name of the directory containing the keystore file to be used when SSL is enabled (Encryption Method=1)
and SSL client authentication is enabled on the database server. The keystore file contains the certificates that
the client sends to the server in response to the server’s certificate request. If you do not specify a directory,
the current directory is used.
Valid Values
keystore_directory
where:
keystore_directory
192 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
Notes
• The keystore and truststore files can be the same file.
Default
None
GUI Tab
Security tab
Keystore Password
Attribute
KeystorePassword (KSP)
Purpose
The password used to access the keystore file when SSL is enabled (Encryption Method=1) and SSL client
authentication is enabled on the database server. The keystore file contains the certificates that the client sends
to the server in response to the server’s certificate request.
Valid Values
keystore_password
where:
keystore_password
Notes
• The keystore and truststore files may be the same file; therefore, they may have the same password.
Default
None
GUI Tab
Security tab
Attribute
LoadBalanceTimeout (LBT)
Purpose
Specifies the number of seconds to keep inactive connections open in a connection pool. An inactive connection
is a database session that is not associated with an ODBC connection handle, that is, a connection in the pool
that is not in use by an application.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 193
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Valid Values
0|x
where:
Behavior
If set to 0, inactive connections are kept open.
If set to x, inactive connections are closed after the specified number of seconds passes.
Notes
• The Min Pool Size option may cause some connections to ignore this value.
Default
0
GUI Tab
Pooling tab
See also
Performance Considerations on page 212
Load Balancing
Attribute
LoadBalancing (LB)
Purpose
Determines whether the driver uses client load balancing in its attempts to connect to the database servers
(primary and alternate). You can specify one or multiple alternate servers by setting the Alternate Servers
option.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses client load balancing and attempts to connect to the database servers
(primary and alternate servers) in random order.
If set to 0 (Disabled), the driver does not use client load balancing and connects to each server based on their
sequential order (primary server first, then, alternate servers in the order they are specified).
Notes
• This option has no effect unless alternate servers are defined for the Alternate Servers connection option.
194 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
Default
0 (Disabled)
GUI Tab
Failover tab
Location Name
Attribute
Location (LOC)
Purpose
Specifies the name of the DB2 location that you want to access.
For DB2 for z/OS, your system administrator can determine the name of your DB2 location using the following
command:
DISPLAY DDF
For DB2 for i, your system administrator can determine the name of your DB2 location using the following
command. The name of the database that is listed as *LOCAL" is the value that you should use for this attribute.
WRKRDBDIRE
Valid Values
location_name
where:
location_name
Notes
• Valid only for DB2 for z/OS and i.
Default
None
GUI Tab
General tab
Login Timeout
Attribute
LoginTimeout (LT)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 195
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
The number of seconds the driver waits for a connection to be established before returning control to the
application and generating a timeout error. To override the value that is set by this connection option for an
individual connection, set a different value in the SQL_ATTR_LOGIN_TIMEOUT connection attribute using
the SQLSetConnectAttr() function.
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, the connection request does not time out. The driver silently ignores the
SQL_ATTR_LOGIN_TIMEOUT attribute.
If set to 0, the connection request does not time out, but the driver responds to the SQL_ATTR_LOGIN_TIMEOUT
attribute.
If set to x, the connection request times out after the specified number of seconds unless the application
overrides this setting with the SQL_ATTR_LOGIN_TIMEOUT attribute.
Default
15
GUI Tab
Advanced tab
Attribute
MinLongVarcharSize (MINLVS)
Purpose
Specifies the minimum count of characters the driver reports for columns mapped as SQL_LONGVARCHAR.
If the size of a SQL_LONGVARCHAR column is less than the value specified, the driver will increase the
reported size of the column to this value when calling SQLDescribeCol and SQLColumns. This allows you to
fetch SQL_LONGVARCHAR columns whose size is smaller than the minimum imposed by some third-party
applications.
Valid Values
x
where:
is the minimum size in characters the driver will report for columns mapped to the
SQL_LONGVARCHAR type.
196 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
Notes
• Configuring the VarcharThreshold and MinLongVarcharSize options allows you to fetch SQL_VARCHAR
and SQL_LONGVARCHAR columns with sizes that fall between the data-type ranges used by some
applications.
Default
None. If no value is specified, the driver will not change the column size reported for SQL_LONGVARCHAR
columns.
GUI Tab
Advanced tab
See also
Varchar Threshold on page 209
Attribute
MaxPoolSize (MXPS)
Purpose
The maximum number of connections allowed within a single connection pool. When the maximum number of
connections is reached, no additional connections can be created in the connection pool.
Valid Values
An integer from 1 to 65535
Notes
• This connection option can affect performance.
Example
If set to 20, the maximum number of connections allowed in the pool is 20.
Default
100
GUI Tab
Pooling tab
See also
Performance Considerations on page 212
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 197
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Attribute
MinPoolSize (MNPS)
Purpose
The minimum number of connections that are opened and placed in a connection pool, in addition to the active
connection, when the pool is created. The connection pool retains this number of connections, even when
some connections exceed their Load Balance Timeout value.
Valid Values
0|x
where:
Behavior
If set to 0, no connections are opened in addition to the current existing connection.
Example
If set to 5, the start-up number of connections in the pool is 5 in addition to the current existing connection.
Default
0
GUI Tab
Pooling tab
See also
Performance Considerations on page 212
Package Collection
Attribute
PackageCollection (PC)
Purpose
Specifies the name of the DB2 collection or location where the driver creates bind packages and, when required,
searches for them.
Valid Values
collection_name
198 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
where:
collection_name
Default
NULLID
GUI Tab
Modify Bindings tab
Attribute
PackageNamePrefix (PNP)
Purpose
Specifies a two-character prefix used for package names when the driver executes dynamic SQL. The default
package name uses the following syntax:
DDOiVRMx
where:
DD
is the Version Release Modification, for example, you can specify 520 to represent version 5.2.0.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 199
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
For example, the package name DDOC520A would represent a package using the Committed Read
isolation level, at version 5.20, and using cursor queries/updates.
Valid Values
xx
where:
xx
is a two-character prefix.
Default
DD
GUI Tab
Advanced tab
Package Owner
Attribute
PackageOwner (PO)
Purpose
Specifies the AuthID assigned to the package.
Valid Values
authid
where:
authid
is a valid DB2 AuthID that has permissions to execute all the SQL in the package.
Default
None
GUI Tab
Modify Bindings Tab
Password
Attribute
Password (PWD)
200 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
Purpose
Specifies the password that the application uses to connect to your database. The Password option cannot be
specified through the driver Setup dialog box and should not be stored in a data source. It is specified through
the Logon dialog box or a connection string.
Valid Values
pwd
where:
pwd
is a valid password.
Default
None
GUI Tab
n/a
Program ID
Attribute
ProgramID (PID)
Purpose
Specifies the product and version information of the driver on the client to be stored in the database. This value
sets the CLIENT_PRDID value in the database. For DB2 V9.1 and higher for Linux/UNIX/Windows, this value
is located in the SYSIBMADM.APPLICATIONS table. This value is used by the DB2 Workload Manager.
Valid Values
DDTVVRRM
where:
DDT
VV
identifies a 2-digit version number (with high-order 0 in the case of a 1-digit version).
RR
identifies a 2-digit release number (with high-order 0 in the case of a 1-digit release).
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 201
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Notes
• This connection option can affect performance.
Example
DDT06010
Default
None
GUI Tab
Client Monitoring tab
See also
Performance Considerations on page 212
Query Timeout
Attribute
QueryTimeout (QT)
Purpose
Specifies the number of seconds for the default query timeout for all statements that are created by a connection.
To override the value set by this connection option for an individual statement, set a different value in the
SQL_ATTR_QUERY_TIMEOUT statement attribute on the SQLSetStmtAttr() function.
Query timeout is supported on DB2 for Linux/UNIX/Windows 8.1 and higher and on DB2 for z/OS 8.1 and
higher
Valid Values
-1 | 0 | x
where:
is a number of seconds.
Behavior
If set to -1, the query does not time out. The driver silently ignores the SQL_ATTR_QUERY_TIMEOUT attribute.
If set to 0, the query does not time out, but the driver responds to the SQL_ATTR_QUERY_TIMEOUT attribute.
If set to x, all queries time out after the specified number of seconds unless the application overrides this value
by setting the SQL_ATTR_QUERY_TIMEOUT attribute.
Default
0
202 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
GUI Tab
Advanced tab
Record Delimiter
Attribute
BulkLoadRecordDelimiter (BLRD)
Purpose
Specifies the character that the driver will use to delimit the record entries in a bulk load data file.
Valid Values
x
where:
For simplicity, avoid using a value that can be in the data, including all alphanumeric characters, the dash(-),
the colon(:), the period (.), the forward slash (/), the space character, the single quote (') and the double quote
("). You can use some of these characters as delimiters if all of the data in the file is contained within double
quotes.
Notes
• The Bulk Load Record Delimiter character must be different from the Bulk Load Field Delimiter.
Default
None
GUI Tab
Bulk tab
Attribute
ReportCodepageConversionErrors (RCCE)
Purpose
Specifies how the driver handles code page conversion errors that occur when a character cannot be converted
from one character set to another.
An error message or warning can occur if an ODBC call causes a conversion error, or if an error occurs during
code page conversions to and from the database or to and from the application. The error or warning generated
is Code page conversion error encountered. In the case of parameter data conversion errors, the
driver adds the following sentence: Error in parameter x, where x is the parameter number. The standard
rules for returning specific row and column errors for bulk operations apply.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 203
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Valid Values
0|1|2
Behavior
If set to 0 (Ignore Errors), the driver substitutes 0x1A for each character that cannot be converted and does
not return a warning or error.
If set to 1 (Return Error), the driver returns an error instead of substituting 0x1A for unconverted characters.
If set to 2 (Return Warning), the driver substitutes 0x1A for each character that cannot be converted and returns
a warning.
Default
0 (Ignore Errors)
GUI Tab
Advanced tab
SSLLibName
Attribute
SSLLibName (SLN)
Purpose
The absolute path for the OpenSSL library file containing the TLS/SSL library to be used by the data source
or connection when TLS/SSL is enabled. The SSL library contains the implementations of TLS/SSL protocols
the driver uses for data encryption.
This option allows you to designate a different SSL library if you encounter issues with the default version or
want to use a library that you provide. Common issues that require designating a different library include security
vulnerabilities with specific libraries or compatibility issues with your server or application.
Valid Values
absolute_path\openssl_filename
where:
absolute_path
openssl_filename
is the name of the OpenSSL library file containing the TLS/SSL Library to be used by your data
source or connection.
Example
C:\Program Files\Progress\DataDirect\Connect64_for_ODBC_71\
Drivers\OpenSSL\1.0.0r\ddssl27.dll;
204 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
Notes
• The OpenSSL library files provided by Progress combine the cryptographic and TLS/SSL libraries into a
single file; therefore, when your drivers are using a Progress library file, the values specified for the
CryptoLibName and SSLLibName options should be the same. For non-Progress library files, the libraries
may use separate files, which would require unique values to be specified.
• This option can be used to designate OpenSSL libraries not installed by the product; however, the drivers
are only certified against libraries provided by Progress.
Default
No default value
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
SSLLibName=C:\Program Files\Progress\DataDirect\
Connect64_for_ODBC_71\Drivers\OpenSSL\1.0.0r\ddssl27.dll;
See Advanced tab for details.
See also
CryptoLibName on page 178
Attribute
KeepAlive (KA)
Purpose
Specifies whether the driver enables TCPKeepAlive. TCPKeepAlive maintains idle TCP connections by
periodically passing packets between the client and server. If either the client or server does not respond to a
packet, the connection is considered inactive and is terminated. In addition, TCPKeepAlive prevents valid idle
connections from being disconnected by firewalls and proxies by maintaining network activity.
Valid Values
0|1
Behavior
If set to 0 (Disabled), the driver does not enable TCPKeepAlive.
If set to 1 (Enabled), the driver enables TCPKeepAlive.
Default
0 (Disabled)
GUI Tab
Advanced tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 205
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Tcp Port
Attribute
TcpPort (PORT)
Purpose
Specifies the port number that is assigned to the DB2 DRDA listener process on the server host machine.
On DB2 for i only, execute NETSTAT from a command line to determine the correct port number. Select option
3 to display a list of active ports on the DB2 for i machine. Find the entry for DRDA, and press F14 to toggle
and display the port number. If DRDA is not currently listening, the command CHGDDMTCPA AUTOSTART(*YES)
PWDRQD(*YES) starts the listener and ensures that it is active at IPL.
Valid Values
IP_address | service_name
where:
IP_address
service_name
is the port’s service name. The driver must be able to find this name (with the correct port assignment)
in the SERVICES file on the workstation.
Default
50000
GUI Tab
General tab
Truststore
Attribute
Truststore (TS)
Purpose
The directory that contains the truststore file and the truststore file name to be used when SSL is enabled
(Encryption Method=1) and server authentication is used. The truststore file contains a list of the valid Certificate
Authorities (CAs) that are trusted by the client machine for SSL server authentication. If you do not specify a
directory, the current directory is used.
Valid Values
truststore_directory\filename
where:
206 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
truststore_directory
filename
Notes
• The truststore and keystore files may be the same file.
Default
None
GUI Tab
Security tab
Truststore Password
Attribute
TruststorePassword (TSP)
Purpose
Specifies the password that is used to access the truststore file when SSL is enabled (Encryption Method=1)
and server authentication is used. The truststore file contains a list of the Certificate Authorities (CAs) that the
client trusts.
Valid Values
truststore_password
where:
truststore_password
Notes
• The truststore and keystore files may be the same file; therefore, they may have the same password.
Default
None
GUI Tab
Security tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 207
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Attribute
UseCurrentSchema (UCS)
Purpose
Specifies whether results are restricted to the tables and views in the current schema if a catalog function call
is made without specifying a schema or if the schema is specified as the wildcard character %. Restricting
results to the tables and views in the current schema improves performance of catalog calls that do not specify
a schema.
Valid Values
0|1
Behavior
If set to 1 (Enabled), results of catalog function calls are restricted to the tables and views in the current schema.
If set to 0 (Disabled), results of catalog function calls are not restricted.
Default
0 (Disabled)
GUI Tab
Advanced tab
User Name
Attribute
LogonID (UID)
Purpose
The default user ID that is used to connect to your database. Your ODBC application may override this value
or you may override it in the logon dialog box or connection string.
Valid Values
userid
where:
userid
Default
None
208 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
GUI Tab
Security tab
Attribute
ValidateServerCertificate (VSC)
Purpose
Determines whether the driver validates the certificate that is sent by the database server when SSL encryption
is enabled (Encryption Method=1). When using SSL server authentication, any certificate sent by the server
must be issued by a trusted Certificate Authority (CA). Allowing the driver to trust any certificate returned from
the server even if the issuer is not a trusted CA is useful in test environments because it eliminates the need
to specify truststore information on each client in the test environment.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver validates the certificate that is sent by the database server. Any certificate from
the server must be issued by a trusted CA in the truststore file. If the Host Name In Certificate option is specified,
the driver also validates the certificate using a host name. The Host Name In Certificate option provides
additional security against man-in-the-middle (MITM) attacks by ensuring that the server the driver is connecting
to is the server that was requested.
If set to 0 (Disabled), the driver does not validate the certificate that is sent by the database server. The driver
ignores any truststore information specified by the Trust Store and Trust Store Password options.
Notes
• Truststore information is specified using the TrustStore and TrustStorePassword options.
Default
1 (Enabled)
GUI Tab
Security tab
Varchar Threshold
Attribute
VarcharThreshold (VT)
Purpose
Specifies the threshold at which the driver describes columns of the data type SQL_VARCHAR as
SQL_LONGVARCHAR. If the size of the SQL_VARCHAR column exceeds the value specified, the driver will
describe the column as SQL_LONGVARCHAR when calling SQLDescribeCol and SQLColumns. This option
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 209
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
allows you to fetch columns that would otherwise exceed the upper limit of the SQL_VARCHAR type for some
third-party applications.
Valid Values
x
where:
is the maximum size in characters of columns the driver will describe as SQL_VARCHAR.
Notes
• Configuring the VarcharThreshold and MinLongVarcharSize options allows you to fetch SQL_VARCHAR
and SQL_LONGVARCHAR columns with sizes that fall between the data-type ranges used by some
applications.
Default
None. If no value is specified, the driver will not change the described type for SQL_VARCHAR columns.
GUI Tab
Advanced tab
See also
Min Long Varchar Size on page 196
Attribute
WithHold (WH)
Purpose
Determines whether the cursor stays open on a commit.
Valid Values
0|1
Behavior
If set to 1 (Enabled), cursor behavior is Preserve, which keeps cursors open after a commit or rollback
(SQLGetInfo( ) returns SQL_CB_PRESERVE for SQL_COMMIT_CURSOR_BEHAVIOR).
If set to 0 (Disabled), cursor behavior is Delete, which closes all cursors open after a commit or rollback
(SQLGetInfo( ) returns SQL_CB_DELETE).
Default
1 (Enabled)
210 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
GUI Tab
Advanced tab
Attribute
XMLDescribeType (XDT)
Purpose
The SQL data type that is returned by SQLGetTypeInfo for the XML data type.
See Using the XML Data Type on page 214 for further information about the XML data type.
Valid Values
-4 | -10
Behavior
If set to -4 (SQL_LONGVARBINARY), the driver uses the description SQL_LONGVARBINARY for columns
that are defined as the XML data type.
If set to -10 (SQL_WLONGVARCHAR), the driver uses the description SQL_WLONGVARCHAR for columns
that are defined as the XML data type.
Default
-10
GUI Tab
Advanced tab
Attribute
EnableBulkLoad (EBL)
Purpose
Specifies the bulk load method.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses the database bulk load protocol when an application executes an INSERT
with multiple rows of parameter data. If the protocol cannot be used, the driver returns a warning.
If set to 0 (Disabled), the driver uses standard parameter arrays.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 211
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Default
0 (Disabled)
GUI Tab
Bulk tab
Performance Considerations
The following connection options can enhance driver performance.
Application Using Threads (ApplicationUsingThreads): The driver coordinates concurrent database
operations (operations from different threads) by acquiring locks. Although locking prevents errors in the driver,
it also decreases performance. If your application does not make ODBC calls from different threads, the driver
has no reason to coordinate operations. In this case, the ApplicationUsingThreads attribute should be disabled
(set to 0).
Note: If you are using a multi-threaded application, you must enable the Application Using Threads option.
Connection Pooling (Pooling): If you enable the driver to use connection pooling, you can set additional
options that affect performance:
• Load Balance Timeout (LoadBalanceTimeout): You can define how long to keep connections in the pool.
The time that a connection was last used is compared to the current time and, if the timespan exceeds the
value of the Load Balance Timeout option, the connection is destroyed. The Min Pool Size option can cause
some connections to ignore this value.
• Connection Reset (ConnectionReset): Resetting a re-used connection to the initial configuration settings
impacts performance negatively because the connection must issue additional commands to the server.
• Max Pool Size (MaxPoolSize): Setting the maximum number of connections that the pool can contain too
low might cause delays while waiting for a connection to become available. Setting the number too high
wastes resources.
• Min Pool Size (MinPoolSize): A connection pool is created when the first connection with a unique
connection string connects to the database. The pool is populated with connections up to the minimum pool
size, if one has been specified. The connection pool retains this number of connections, even when some
connections exceed their Load Balance Timeout value.
Encryption Method (EncryptionMethod): Data encryption may adversely affect performance because of the
additional overhead (mainly CPU usage) that is required to encrypt and decrypt data.
Failover Mode (FailoverMode): Although high availability that replays queries after a failure provides increased
levels of protection, it can adversely affect performance because of increased overhead.
Use Current Schema for Catalog Functions (UseCurrentSchema): If your application needs to access
database objects owned only by the current user, then performance can be improved. In this case, the Use
Current Schema for Catalog Functions option must be enabled. When this option is enabled, the driver returns
only database objects owned by the current user when executing catalog functions. Calls to catalog functions
are optimized by grouping queries. Enabling this option is equivalent to passing the Logon ID used on the
connection as the SchemaName argument to the catalog functions.
212 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
Workload Manager: The Workload Manager (WLM) automatically adjusts server resources, such as CPU and
memory, based on the service class associated with a DB2 workload. Therefore, an application’s performance
is tied to the DB2 workload to which it is assigned and, ultimately, to the service class associated with that
workload. The DB2 Wire Protocol driver allows your application to set client information in the DB2 database
that can be used by the WLM to classify work. If you know that your database environment uses WLM, coordinate
with your database administrator to determine how setting the following options affects performance.
• Accounting Info (AccountingInfo): Sets the CURRENT CLIENT_ACCTNG register (DB2 for
Linux/UNIX/Windows) or the CLIENT ACCTNG register (DB2 for z/OS) on the server.
• Application Name (ApplicationName): Sets the CURRENT CLIENT_APPLNAME register (DB2 for
Linux/UNIX/Windows) or CLIENT APPLNAME register (DB2 for z/OS) on the server.
• Client Host Name (ClientHostName): Sets the CURRENT CLIENT_WRKSTNNAME register (DB2 for
Linux/UNIX/Windows) or CLIENT WRKSTNNAME register (DB2 for z/OS) on the server.
• Client User (ClientUser): Sets the CURRENT CLIENT_USERID register (DB2 for Linux/UNIX/Windows)
and CLIENT USERID register (DB2 for z/OS) on the server.
• Program ID (ProgramID): Sets the CLIENT_PRDID value on the server.
Data Types
The following table shows how the DB2 data types map to the standard ODBC data types. Unicode Support
on page 215 lists DB2 to Unicode data type mappings.
DB2 ODBC
5
Bigint SQL_BIGINT
6
Blob SQL_LONGVARBINARY
Char SQL_CHAR
Date SQL_TYPE_DATE
5
Supported on DB2 V8.x and higher for Linux/UNIX/Windows, DB2 V9 and higher for DB2 for z/OS, and DB2 V5R3 and higher
for DB2 for i.
6
Supported on DB2 V8.x and higher for Linux/UNIX/Windows; DB2 for z/OS; and DB2 V5R3 and higher for DB2 for i.
7
On DB2 for Linux/UNIX/Windows versions previous to V8.1 and DB2 V5R2 for DB2 for i, only the first 32 KB of the Clob data
are returned when fetching, and only 32 KB can be inserted and updated.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 213
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
DB2 ODBC
8
Decfloat SQL_DOUBLE
Decimal SQL_DECIMAL
Double SQL_DOUBLE
Float SQL_DOUBLE
Integer SQL_INTEGER
Numeric SQL_NUMERIC
Real SQL_REAL
Smallint SQL_SMALLINT
Time SQL_TYPE_TIME
9
Timestamp SQL_TYPE_TIMESTAMP
6, 10
Timestamp With Time Zone SQL_VARCHAR
Varchar SQL_VARCHAR
See Retrieving Data Type Information on page 72 for information about retrieving data types.
8
Supported only on DB2 V9 and higher for Linux/UNIX/Windows, DB2 V9 and higher for DB2 for z/OS, and DB2 i V6R1 for DB2
for i.
9
Timestamp values with a fractional seconds precision greater than 9 are described as the ODBC SQL_VARCHAR data type.
10
Timestamp with Time Zone mapping changes based on the setting of the FetchTSWTZasTimestamp option only on DB2 V10
and higher for DB2 for z/OS.
11
Supported only on DB2 V10 for z/OS.
214 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
Unicode Support
The DB2 Wire Protocol driver supports Unicode data types if the database was created with a multi-byte
character set.
The DB2 Wire Protocol driver maps the DB2 data types to Unicode data types as shown in the following table:
Graphic SQL_WCHAR
Vargraphic SQL_WVARCHAR
Advanced Features
The driver supports the following advanced features:
• Failover
• Client Information
• Security
• Connection Pooling
• DataDirect Bulk Load
Failover
The driver supports failover and its related connection options. Failover connection options are located on the
Failover tab of the driver Setup dialog box. See Using Failover on page 78 for a general description of failover
and its implementation.
Security
The driver supports authentication and encryption. Security connection options are located on the Security tab
of the driver Setup dialog box. See Using Security on page 89 for a general description of security and its
implementation. The following security information is specific to the DB2 Wire Protocol Driver.
Authentication
If you are using Kerberos, verify that your environment meets the requirements listed in the following table
before you configure the driver for Kerberos authentication.
12
Supported on DB2 V8.x and higher for Linux/UNIX/Windows, DB2 V9 and higher for DB2 for z/OS, and DB2 V5R3 and higher
for DB2 for i.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 215
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Table 19: Kerberos Authentication Requirements for the DB2 Wire Protocol Driver
Component Requirements
Database server The database server must be running one of the following database versions:
Kerberos server The Kerberos server is the machine where the user IDs for authentication are
administered. The Kerberos server is also the location of the Kerberos KDC.
Network authentication must be provided by one of the following methods:
Connection Pooling
The driver supports connection pooling and its related connection options. Connection pooling connection
options are located on the Pooling tab of the driver Setup dialog box. See Using DataDirect Connection Pooling
on page 97 for a general description of connection pooling and its implementation.
1 UPDATE T1 SET col1 = ? WHERE col2 UPDATE T2 SET col1 = ? WHERE col2 = ?
= ?
216 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
2 SELECT col1, col3, col4 FROM T2 SELECT col1, col5, FROM T1 WHERE col5
WHERE col2 >= ? = ? AND col2 = ?
3 Commit Commit
Without currently committed semantics, these applications running under the cursor stability isolation level
might create a deadlock, causing one of the applications to fail. This happens when each application needs to
read data that is being updated by the other application.
Under currently committed semantics, if the query in step 2 (for either application) happens to require the data
currently being updated by the other application, that application does not wait for the lock to be released,
making a deadlock impossible. The previously committed version of the data is located and used instead.
XQuery Expressions
The DB2 Wire Protocol driver supports execution of XQuery expressions in DB2 V9.1 and higher for
Linux/UNIX/Windows. IBM provides a tutorial on this topic at the following URL:
http://www-01.ibm.com/support/knowledgecenter/SSEPGG_9.1.0/com.ibm.db2.xquery.doc/doc/xqbtutorial.htm
Unexpected Characters
Users are sometimes surprised when they insert a character into a database, only to have a different character
displayed when they fetch it from the database. There are many reasons this can happen, but it most often
involves code page issues, not driver errors.
Client and server machines in a database system each use code pages, which can be identified by a name or
a number, such as Shift_JIS (Japanese) or cp1252 (Windows English). A code page is a mapping that associates
a sequence of bits, called a code point, with a specific character. Code pages include the characters and
symbols of one or more languages. Regardless of geographical location, a machine can be configured to use
a specific code page. Most of the time, a client and database server would use similar, if not identical, code
pages. For example, a client and server might use two different Japanese code pages, such as Shift_JIS and
EUC_JP, but they would still share many Japanese characters in common. These characters might, however,
be represented by different code points in each code page. This introduces the need to convert between code
pages to maintain data integrity. In some cases, no one-to-one character correspondence exists between the
two code points. This causes a substitution character to be used, which can result in displaying an unexpected
character on a fetch.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 217
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
When the driver on the client machine opens a connection with the database server, the driver determines the
code pages being used on the client and the server. This is determined from the Active Code Page on a
Windows-based machine. If the client machine is UNIX-based, the driver checks the IANAAppCodePage
attribute (see IANAAppCodePage on page 190). If it does not find a specific setting for IACP, it defaults to a
value of ISO_8859_1 Latin_1.
If the client and server code pages are compatible, the driver transmits data in the code page of the client.
Even though the pages are compatible, a one-to-one correspondence for every character may not exist. If the
client and server code pages are completely dissimilar, for example, Russian and Japanese, then many
substitutions occur because very few, if any, of the characters are mapped between the two code pages.
The following is a specific example of an unexpected character:
218 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The DB2 Wire Protocol Driver
SQL Support
The driver supports the minimum SQL grammar.
• SQLProcedures
• SQLProcedureColumns
Refer to "ODBC API and scalar functions" in the Progress DataDirect for ODBC Drivers Reference for a list of
supported API functions.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 219
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Note: The Informix Wire Protocol driver does not require any Informix client software. Progress DataDirect
also provides an Informix client-based driver that can access earlier versions of Informix databases. See The
Informix Driver on page 762 for details.
Driver Requirements
The driver has no client requirements.
220 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Informix Wire Protocol Driver
Connection Option Descriptions on page 225 lists driver connection string attributes that must be used in the
odbc.ini file to set the value of the attributes. Note that only the long name of the attribute can be used in the
file. The default listed in the table is the initial default value when the driver is installed.
On Windows, data sources are stored in the Windows Registry. You can configure and modify data sources
through the ODBC Administrator using a driver Setup dialog box, as described in this section.
On UNIX and Linux, data sources are stored in the odbc.ini file. On Linux, you can configure and
modify data sources through the Linux ODBC Administrator using a driver Setup dialog box, as described in
this section.
Note: This book shows dialog box images that are specific to Windows. If you are using the drivers in the
Linux environment, the dialog box that you see may differ slightly from the Windows version. Windows-only
and UNIX-only connection options are specifically noted by icons in the Setup dialog box descriptions.
When the driver is first installed, the values of its connection options are set by default. These values appear
on the driver Setup dialog box tabs when you create a new data source. You can change these default values
by modifying the data source. In the following procedure, the description of each tab is followed by a table that
lists the connection options for that tab and their initial default values. This table links you to a complete
description of the options and their connection string attribute equivalents. The connection string attributes are
used to override the default values of the data source if you want to change these values at connection time.
To configure an Informix data source:
• On Windows, start the ODBC Administrator by selecting its icon from the Progress DataDirect
program group.
2. Select a tab:
• User DSN: If you are configuring an existing user data source, select the data source name and click
Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the driver
and click Finish to display the driver Setup dialog box.
• System DSN: If you are configuring an existing system data source, select the data source name
and click Configure to display the driver Setup dialog box.
If you are configuring a new system data source, click Add to display a list of installed drivers. Select
the driver and click Finish to display the driver Setup dialog box.
• File DSN: If you are configuring an existing file data source, select the data source file and click Configure
to display the driver Setup dialog box.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 221
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select
a driver. Click Advancedif you want to specify attributes; otherwise, click Next to proceed. Specify a
name for the data source and click Next. Verify the data source information; then, click Finish to display
the driver Setup dialog box.
Note: The General tab displays only fields that are required for creating a data source. The fields on all
other tabs are optional, unless noted otherwise.
3. On this tab, provide values for the options in the following table; then, click Apply. The table provides links
to descriptions of the connection options.
222 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Informix Wire Protocol Driver
4. Optionally, click the Advanced tab to specify additional data source settings.
Figure 13: Advanced tab
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
5. Optionally, click the Failover tab to specify failover data source settings.
Figure 14: Failover tab
See Using Failover on page 78 for a general description of failover and its related connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 223
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
6. At any point during the configuration process, you can click Test Connect to attempt to connect to the data
source using the connection options specified in the driver Setup dialog box. A logon dialog box appears
(see Using a Logon Dialog Box (Informix) on page 225 for details). Note that the information you enter in the
logon dialog box during a test connect is not saved.
• If the driver can connect, it releases the connection and displays a Connection Established message.
Click OK.
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message. Click OK.
Note: If you are configuring alternate servers for use with the connection failover feature, be aware that
the Test Connect button tests only the primary server, not the alternate servers.
7. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
DSN=data_source_name[;attribute=value[;attribute=value]...]
FILEDSN=filename.dsn[;attribute=value[;attribute=value]...]
The DSN-less connection string specifies a driver instead of a data source. All connection information must be
entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
224 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Informix Wire Protocol Driver
Connection Option Descriptions on page 225 lists the long and short names for each attribute, as well as the
initial default value when the driver is first installed. You can specify either long or short names in the connection
string.
An example of a DSN connection string with overriding attribute values for Informix is:
DSN=INFORMIX TABLES;DB=PAYROLL
1. In the Host Name field, type the name or IP address of the host machine on which the Informix server
resides.
The IP address can be specified in either IPv4 or IPv6 format, or a combination of the two. See Using IP
Addresses on page 67 for details concerning these formats.
2. In the Port Number field, type the port number of the server listener.
3. In the Server Name field, type the name of the Informix server.
4. In the Database Name field, type the name of the database to which you want to connect.
5. If required, type your user name as specified on the Informix server.
6. If required, type your password.
7. Click OK to complete the logon and to update these values in the Registry.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 225
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
In most cases, the GUI name and the attribute name are the same; however, some exceptions exist. If you
need to look up an option by its connection string attribute name, please refer to the alphabetical table of
connection string attribute names.
Also, a few connection string attributes, for example, Password, do not have equivalent options that appear
on the GUI. They are in the list of descriptions alphabetically by their attribute names.
The following table lists the connection string attributes supported by the Informix Wire Protocol driver.
ConnectionRetryCount (CRC) 0
ConnectionRetryDelay (CRD) 3
Alternate Servers
Attribute
AlternateServers (ASRV)
226 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Informix Wire Protocol Driver
Purpose
A list of alternate database servers to which the driver tries to connect if the primary database server is
unavailable. Specifying a value for this option enables connection failover for the driver. The value you specify
must be in the form of a string that defines the physical location of each alternate server. All of the other required
connection information for each alternate server is the same as what is defined for the primary server connection.
Valid Values
(Database=databasename:HostName=hostvalue:
PortNumber=portvalue:ServerName=servervalue[, . . .])
You must specify the database, host name, port number, and the server name.
Example
The following Alternate Servers value defines two alternate database servers for connection failover:
(Database=Infdb1:HostName=Informixhost1:PortNumber=5177:ServerName=accounting1,
Database=Infdb2:HostName=Informixhost2:PortNumber=5178:ServerName=accounting2)
Notes
• An alternate server address in IPv6 format must be enclosed in double quotation marks.
Default
None
GUI Tab
Failover tab
Attribute
ApplicationUsingThreads (AUT)
Purpose
Determines whether the driver works with applications using multiple ODBC threads.
This connection option can affect performance. See Performance Considerations on page 236 for details.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver works with single-threaded and multi-threaded applications.
If set to 0 (Disabled), the driver does not work with multi-threaded applications. If using the driver with
single-threaded applications, this value avoids additional processing required for ODBC thread-safety standards.
Default
1 (Enabled)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 227
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
GUI Tab
Advanced tab
See also
• Performance Considerations on page 236
Attribute
CancelDetectInterval (CDI)
Purpose
Determines whether long-running queries in threaded applications can be cancelled if the application issues
a SQLCancel.
This connection option can affect performance. See Performance Considerations on page 236 for details.
Valid Values
0|x
where:
is the number of seconds the driver waits before checking for SQLCancel calls.
Behavior
If set to 0 (None), the driver does not allow long-running queries in threaded applications to be canceled, even
if the application issues a SQLCancel.
If set to x (seconds), for every pending query, the driver checks for SQLCancel calls at the specified interval.
If the driver determines that a SQLCancel has been issued, the driver cancels the query.
Example
If you specify 5, for every pending query, the driver checks every five seconds to see whether the application
has issued a SQLCancel call. If it detects a SQLCancel call, the driver cancels the query.
Default
0 (None)
GUI Tab
Advanced tab
See also
• Performance Considerations on page 236
228 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Informix Wire Protocol Driver
Attribute
ConnectionRetryCount (CRC)
Purpose
The number of times the driver retries connection attempts to the primary database server, and if specified,
alternate servers until a successful connection is established.
This option and the Connection Retry Delay connection option, which specifies the wait interval between
attempts, can be used in conjunction with failover.
Valid Values
0|x
where:
Behavior
If set to 0, the driver does not try to connect after the initial unsuccessful attempt.
If set to x, the driver retries connection attempts the specified number of times. If a connection is not established
during the retry attempts, the driver returns an error that is generated by the last server to which it tried to
connect.
Default
0
GUI Tab
See Failover tab
Attribute
ConnectionRetryDelay (CRD)
Purpose
Specifies the number of seconds the driver waits between connection retry attempts when Connection Retry
Count is set to a positive integer.
This option and the Connection Retry Count connection option can be used in conjunction with failover.
Valid Values
0|x
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 229
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Behavior
If set to 0, there is no delay between retries.
If set to x, the driver waits the specified number of seconds between connection retry attempts.
Default
3
GUI Tab
See Failover tab
Database Name
Attribute
Database (DB)
Purpose
Specifies the name of the database to which you want to connect.
Valid Values
database_name
where:
database_name
Default
None
GUI Tab
General tab
Attribute
DataSourceName (DSN)
Purpose
Specifies the name of a data source in your Windows Registry or odbc.ini file.
230 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Informix Wire Protocol Driver
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Description
Attribute
Description (n/a)
Purpose
Specifies an optional long description of a data source. This description is not used as a runtime connection
attribute, but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Host Name
Attribute
HostName (HOST)
Purpose
The name or the IP address of the server to which you want to connect.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 231
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Valid Values
server_name | IP_address
where:
server_name
IP_address
The IP address can be specified in either IPv4 or IPv6 format. See Using IP Addresses on page 67 for details
about these formats.
Default
None
GUI Tab
General tab
IANAAppCodePage
Attribute
IANAAppCodePage (IACP)
Purpose
An Internet Assigned Numbers Authority (IANA) value. You must specify a value for this option if your application
is not Unicode-enabled or if your database character set is not Unicode. The value you specify must match
the database character encoding and the system locale.
The Driver Manager checks for the value of IANAAppCodePage in the following order:
• In the connection string
• In the Data Source section of the system information file (odbc.ini)
• In the ODBC section of the system information file (odbc.ini)
Valid Values
IANA_code_page
where:
IANA_code_page
is one of the valid values listed in "IANAAppCodePage values" in the Progress DataDirect for ODBC
Drivers Reference. The value must match the database character encoding and the system locale.
Notes
Refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers Reference
for details.
232 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Informix Wire Protocol Driver
Default
4 (ISO 8559-1 Latin-1)
GUI Tab
Advanced tab
Load Balancing
Attribute
LoadBalancing (LB)
Description
Determines whether the driver uses client load balancing in its attempts to connect to the database servers
(primary and alternate). You can specify one or multiple alternate servers by setting the Alternate Servers
option.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses client load balancing and attempts to connect to the database servers
(primary and alternate servers) in random order.
If set to 0 (Disabled), the driver does not use client load balancing and connects to each server based on their
sequential order (primary server first, then, alternate servers in the order they are specified).
Notes
• This option has no effect unless alternate servers are defined for the Alternate Servers connection option.
Default
0 (Disabled)
GUI Tab
Failover tab
Password
Attribute
Password (PWD)
Purpose
The password that the application uses to connect to your database. The Password option cannot be specified
through the driver Setup dialog box and should not be stored in a data source. It is specified through the Logon
dialog box or a connection string.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 233
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Valid Values
pwd
where:
pwd
is a valid password.
Default
None
GUI Tab
n/a
Port Number
Attribute
PortNumber (PORT)
Purpose
The port number of the server listener.
Valid Values
port_name
where:
port_name
is the port number of the server listener. Check with your database administrator for the correct
number.
Default
None
GUI Tab
General tab
Server Name
Attribute
ServerName (SRVR)
Purpose
The name of the Informix server.
234 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Informix Wire Protocol Driver
Valid Values
server_name
where:
server_name
Default
None
GUI Tab
General tab
Attribute
TrimBlankFromIndexName (TBFIN)
Purpose
Determines whether the driver trims leading spaces from system-generated index names. Some applications
cannot process a leading space in index names.
Valid Values
If set to 1 (Enabled), the driver trims leading spaces from system-generated index names.
If set to 0 (Disabled), the driver does not trim leading spaces from system-generated index names.
Default
1 (Enabled)
GUI Tab
Advanced tab
Attribute
UseDelimitedIdentifier (UDI)
Purpose
Determines whether the driver sets the Informix DELIMIDENT environment variable. The DELIMIDENT
environment variable specifies that strings enclosed between double quotation marks (") are delimited database
identifiers.
Valid Values
0|1
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 235
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Behavior
If set to 1 (enabled), the Informix server interprets strings enclosed in double quotation marks as identifiers,
not as string literals.
If set to 0 (disabled), the Informix server interprets strings enclosed in double quotation marks as string literals,
not as identifiers.
Default
0 (Disabled)
GUI Tab
Advanced tab
User Name
Attribute
LogonID (UID)
Purpose
The default user ID that is used to connect to your database. Your ODBC application may override this value
or you may override it in the logon dialog box or connection string.
Valid Values
userid
where:
userid
Default
None
GUI Tab
General tab
Performance Considerations
The following connection options can enhance driver performance.
Application Using Threads (ApplicationUsingThreads): The driver coordinates concurrent database
operations (operations from different threads) by acquiring locks. Although locking prevents errors in the driver,
it also decreases performance. If your application does not make ODBC calls from different threads, the driver
has no reason to coordinate operations. In this case, the ApplicationUsingThreads attribute should be disabled
(set to 0).
Note: If you are using a multi-threaded application, you must enable the Application Using Threads option.
236 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Informix Wire Protocol Driver
Cancel Detect Interval (CancelDetectInterval): If your application uses threads, it may allow canceling of
long running queries (may issue synchronous SQLCancel calls). If your application does not issue synchronous
SQLCancel calls, the driver can improve performance if the CancelDetectInterval attribute is disabled (set to
0). In this case, the driver does not incur the overhead of periodically checking for SQLCancel. In the case
where your application does issue synchronous SQLCancel calls, this attribute should be set to a value that
specifies how often the driver checks to see if a long running query has been canceled.
Data Types
The following table shows how the Informix data types map to the standard ODBC data types.
Informix ODBC
BLOB SQL_LONGVARBINARY
BOOLEAN SQL_BIT
BYTE SQL_LONGVARBINARY
CHAR SQL_CHAR
CLOB SQL_LONGVARCHAR
DATE SQL_TYPE_DATE
13
DATETIME YEAR TO FRACTION(f) SQL_TYPE_TIMESTAMP
DECIMAL SQL_DECIMAL
FLOAT SQL_DOUBLE
INT8 SQL_BIGINT
INTEGER SQL_INTEGER
13
(f) can have a value of 1, 2, 3, 4, or 5. The precision is type-dependent and the scale is 5.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 237
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Informix ODBC
MONEY SQL_DECIMAL
NCHAR SQL_CHAR
NVARCHAR SQL_VARCHAR
SERIAL SQL_INTEGER
SERIAL8 SQL_BIGINT
SMALLFLOAT SQL_REAL
SMALLINT SQL_SMALLINT
TEXT SQL_LONGVARCHAR
VARCHAR SQL_VARCHAR
See Retrieving Data Type Information on page 72 for information about retrieving data types.
14
Supported only on Informix 9.4 and higher servers.
238 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Informix Wire Protocol Driver
Advanced Features
The driver supports failover and its related connection options. Failover connection options are located on the
Failover tab of the driver Setup dialog box. See Using Failover on page 78 for a general description of failover
and its implementation.
MTS Support
On Windows, the driver can take advantage of Microsoft Transaction Server (MTS) capabilities, specifically,
the Distributed Transaction Coordinator (DTC) using the XA Protocol. For a general discussion of MTS and
DTC, refer to the help file of the Microsoft Transaction Server SDK.
Note: The DataDirect Connect for ODBC 32-bit drivers can operate in a 64-bit Windows environment; however,
they do not support DTC in this environment. Only the DataDirect Connect64 for ODBC 64-bit drivers support
DTC in a 64-bit Windows environment.
SQL Support
The driver supports the minimum SQL grammar.
• SQLColumnPrivileges
• SQLForeignKeys
• SQLTablePrivileges
Refer to "ODBC API and scalar functions" in the Progress DataDirect for ODBC Drivers Reference for a list of
supported API functions.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 239
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
• Storage engines
• InnoDB – Transactional
• MyISAM – Non-Transactional
• Memory (formerly HEAP) – Non-Transactional
For the latest support information, visit the Progress DataDirect Supported Configurations page:
https://www.progress.com/supported-configurations/datadirect.
Note: The DataDirect Connect Series for ODBC drivers for MySQL Enterprise were developed using the MySQL
Protocol Documentation whose copyright is owned by, and licensed by DataDirect from, MySQL AB. If any of
the DataDirect Connect Series for ODBC is licensed for the MySQL database the following shall apply: You must
purchase commercially licensed MySQL database software or a MySQL Enterprise subscription in order to
use the DataDirect Connect Series for ODBC drivers for MySQL Enterprise with MySQL software.
Note: The MySQL Wire Protocol driver is supported in the Windows, UNIX, and Linux environments. See
Environment-Specific Information on page 58 for detailed information about the environments supported by
this driver.
See the readme file shipped with your DataDirect Connect product for the file name of the MySQL Wire Protocol
driver.
Driver Requirements
The driver has no client requirements.
240 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The MySQL Wire Protocol Driver
If you choose to use a connection string, you must use specific connection string attributes. See Using a
Connection String on page 248 and Connection Options Descriptions on page 249 for an alphabetical list of driver
connection string attributes and their initial default values.
On Windows, data sources are stored in the Windows Registry. You can configure and modify data sources
through the ODBC Administrator using a driver Setup dialog box, as described in this section.
On UNIX and Linux, data sources are stored in the odbc.ini file. On Linux, you can configure and
modify data sources through the Linux ODBC Administrator using a driver Setup dialog box, as described in
this section.
Note: This book shows dialog box images that are specific to Windows. If you are using the drivers in the
Linux environment, the dialog box that you see may differ slightly from the Windows version. Windows-only
and UNIX-only connection options are specifically noted by icons in the Setup dialog box descriptions.
When the driver is first installed, the values of its connection options are set by default. These values appear
on the driver Setup dialog box tabs when you create a new data source. You can change these default values
by modifying the data source. In the following procedure, the description of each tab is followed by a table that
lists the connection options for that tab and their initial default values. This table links you to a complete
description of the options and their connection string attribute equivalents. The connection string attributes are
used to override the default values of the data source if you want to change these values at connection time.
To configure a MySQL data source on Windows:
• On Windows, start the ODBC Administrator by selecting its icon from the Progress DataDirect
program group.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 241
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
2. Select a tab:
• User DSN: If you are configuring an existing user data source, select the data source name and click
Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the
driver and click Finish to display the driver Setup dialog box.
• System DSN: If you are configuring an existing system data source, select the data source name
and click Configure to display the driver Setup dialog box.
If you are configuring a new system data source, click Add to display a list of installed drivers. Select
the driver and click Finish to display the driver Setup dialog box.
• File DSN: If you are configuring an existing file data source, select the data source file and click Configure
to display the driver Setup dialog box.
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select
a driver. Click Advancedif you want to specify attributes; otherwise, click Next to proceed. Specify a
name for the data source and click Next. Verify the data source information; then, click Finish to display
the driver Setup dialog box.
The General tab of the Setup dialog box appears by default.
Note: The General tab displays only fields that are required for creating a data source. The fields on all
other tabs are optional, unless noted otherwise.
3. On this tab, provide values for the options in the following table; then, click Apply. The table provides links
to descriptions of the connection options.
242 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The MySQL Wire Protocol Driver
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
Default Buffer Size for Long/LOB Columns (in Kb) on page 259 1024
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 243
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Extended Options: Type a semi-colon separated list of connection options and their values. Use this
configuration option to set the value of undocumented connection options that are provided by Progress
DataDirect customer support. You can include any valid connection option in the Extended Options string,
for example:
Database=Server1;UndocumentedOption1=value[;UndocumentedOption2=value;]
If the Extended Options string contains option values that are also set in the setup dialog or data source,
the values of the options specified in the Extended Options string take precedence. However, connection
options that are specified on a connection string override any option value specified in the Extended Options
string.
Note: Do not specify the Extended Options configuration option in a connection string, or the driver will
return an error. Instead, applications should specify the individual undocumented connection options in the
connection string.
Translate: Click Translate to display the Select Translator dialog box, which lists the translators
specified in the ODBC Translators section of the Registry. Progress DataDirect provides a translator named
OEM to ANSI that translates your data from the IBM PC character set to the ANSI character set.
Select a translator; then, click OK to close this dialog box.
244 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The MySQL Wire Protocol Driver
5. Optionally, click the Security tab to specify security data source settings.
Figure 15: Security tab
See Using Security on page 89 for a general description of authentication and encryption and their
configuration requirements.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 245
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
6. Optionally, click the Failover tab to specify failover data source settings.
Figure 16: Failover tab
See Using Failover on page 78 for a general description of failover and its related connection options.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
246 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The MySQL Wire Protocol Driver
7. Optionally, click the Pooling tab to specify connection pooling data source settings.
Figure 17: Pooling tab
See Using DataDirect Connection Pooling on page 97 for a general description of connection pooling.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
8. At any point during the configuration process, you can click Test Connect to attempt to connect to the data
source using the connection properties specified in the driver Setup dialog box. A logon dialog box appears;
see Using a Logon Dialog Box (MySQL) on page 248 for details. Note that the information you enter in the
logon dialog box during a test connect is not saved.
• If the driver can connect, it releases the connection and displays a Connection Established message.
Click OK.
• If the driver cannot connect because of an improper environment or incorrect connection value, it displays
an appropriate error message.
Click OK.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 247
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Note: If you are configuring alternate servers for use with the connection failover feature, be aware that
the Test Connect button tests only the primary server, not the alternate servers.
9. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
DSN=data_source_name[;attribute=value[;attribute=value]...]
FILEDSN=filename.dsn[;attribute=value[;attribute=value]...]
The DSN-less connection string specifies a driver instead of a data source. All connection information must be
entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
Connection Options Descriptions on page 249 lists the long and short names for each attribute, as well as the
initial default value when the driver is first installed. You can specify either long or short names in the connection
string.
An example of a DSN connection string with overriding attribute values for MySQL is:
DSN=MySQL TABLES;DB=PAYROLL
248 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The MySQL Wire Protocol Driver
1. In the Host Name field, type either the name or the IP address of the server to which you want to connect.
The IP address must be in IPv4 format.
2. In the Port Number field, type the port number of the server listener. The default is 3306.
3. In the Database Name field, type the name of the database to which you want to connect.
4. If required, type your user name as specified on the MySQL server.
5. If required, type your password.
6. Click OK to complete the logon and to update these values in the Registry.
ConnectionRetryCount 0
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 249
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
ConnectionRetryDelay 3
LoginTimeout (LT) 15
MinPoolSize (MNPS) 0
250 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The MySQL Wire Protocol Driver
QueryTimeout (QT) 0
AllowedOpenSSLVersions
Attribute
AllowedOpenSSLVersions (AOV)
Purpose
Important: Version 1.0.2 of the OpenSSL library has reached the end of its product life cycle and is no longer
receiving security updates. Best security practices dictate that you use the latest version of the library.
Determines which version of the OpenSSL library file the driver uses for data encryption. Although the latest
version of the OpenSSL library is the most secure, some characteristics of the library can cause connections
to certain databases to fail. This option allows you to continue using older versions of the OpenSSL library
while you transition your environment to support the latest version.
Valid Values
latest | openssl_version_number[[,openssl_version_number]...]
where:
openssl_version_number
is the version number for the OpenSSL library file to be loaded by the driver, for example, 1.0.2.
When more than one version is specified, the driver will first attempt to load the first version listed.
If the driver is unable to locate and load this file, it will attempt to load the next version in the value.
The driver currently supports versions 1.1.1 and 1.0.2. Refer to the installed readme for latest
supported versions.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 251
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Behavior
If set to latest, the driver loads the latest installed version of the OpenSSL library file provided by Progress.
If set to openssl_version_number, the driver loads the specified version of the OpenSSL library file. This
value is used to specify a version other than the latest.
Notes
• This option is ignored if OpenSSL library files are specified using the CryptoLibName and SSLLibName
options.
• This option works only with OpenSSL library files provided by Progress and user supplied OpenSSL library
files that match Progress's naming convention and installation location.
• This option works only for installations using the default directory structure.
• Consult your database administrator concerning the security settings of your server.
Default
1.1.1,1.0.2
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
AllowedOpenSSLVersions=1.0.2
See also
Advanced tab
Alternate Servers
Attribute
AlternateServers (ASRV)
Purpose
A list of alternate database servers to which the driver tries to connect if the primary database server is
unavailable. Specifying a value for this option enables connection failover for the driver. The value you specify
must be in the form of a string that defines the physical location of each alternate server. All of the other required
connection information for each alternate server is the same as what is defined for the primary server connection.
Valid Values
(Database=databasename:HostName=hostvalue:PortNumber=portvalue[, . . .])
You must specify the database name, host name, and port number. The string has the format:
Example
The following Alternate Servers value defines two alternate database servers for connection failover:
(Database=MySQLdb1:HostName=MySQLhost1:PortNumber=5177,
Database=MySQLdb2:HostName=MySQLhost2:PortNumber=5178)
252 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The MySQL Wire Protocol Driver
Default
None
GUI Tab
Failover tab
Attribute
ApplicationUsingThreads (AUT)
Purpose
Determines whether the driver works with applications using multiple ODBC threads.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver works with single-threaded and multi-threaded applications.
If set to 0 (Disabled), the driver does not work with multi-threaded applications. If using the driver with
single-threaded applications, this value avoids additional processing required for ODBC thread-safety standards.
Notes
• This connection option can affect performance.
Default
1 (Enabled)
GUI tab
Advanced tab
See also
See Performance Considerations
Connection Pooling
Attribute
Pooling (POOL)
Purpose
Specifies whether to use the driver’s connection pooling.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 253
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses connection pooling.
If set to 0 (Disabled), the driver does not use connection pooling.
Notes
• This connection option can affect performance.
Default
0 (Disabled)
GUI tab
Pooling tab
See also
• Performance Considerations on page 279
Connection Reset
Attribute
ConnectionReset (CR)
Purpose
Determines whether the state of connections that are removed from the connection pool for reuse by the
application is reset to the initial configuration of the connection.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the state of connections removed from the connection pool for reuse by an application is
reset to the initial configuration of the connection. Resetting the state can negatively impact performance
because additional commands must be sent over the network to the server to reset the state of the connection.
If set to 0 (Disabled), the state of connections is not reset.
Notes
• This connection option can affect performance.
Default
0 (Disabled)
254 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The MySQL Wire Protocol Driver
GUI tab
Pooling tab
See also
• Performance Considerations on page 279
Attribute
ConnectionRetryCount
Purpose
The number of times the driver retries connection attempts to the primary database server, and if specified,
alternate servers until a successful connection is established.
This option and the Connection Retry Delay connection option, which specifies the wait interval between
attempts, can be used in conjunction with failover.
Valid Values
0|x
where:
Behavior
If set to 0, the driver does not try to connect after the initial unsuccessful attempt.
If set to x, the driver retries connection attempts the specified number of times. If a connection is not established
during the retry attempts, the driver returns an error that is generated by the last server to which it tried to
connect.
Default
0
GUI Tab
Failover tab
Attribute
ConnectionRetryDelay
Purpose
Specifies the number of seconds the driver waits between connection retry attempts when Connection Retry
Count is set to a positive integer.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 255
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
This option and the Connection Retry Count connection option can be used in conjunction with failover.
Valid Values
0|x
where:
Behavior
If set to 0, there is no delay between retries.
If set to x, the driver waits the specified number of seconds between connection retry attempts.
Default
3
GUI Tab
Failover tab
Attribute
CryptoProtocolVersion (CPV)
Purpose
Specifies a comma-separated list of the cryptographic protocols to use when TLS/SSL is enabled using the
Encryption Method connection option. When multiple protocols are specified, the driver uses the highest version
supported by the server. If none of the specified protocols are supported by the database server, the connection
fails and the driver returns an error.
Valid Values
cryptographic_protocol [[, cryptographic_protocol ]...]
where:
cryptographic_protocol
Caution: Good security practices recommend using TLSv1 or higher, due to known vulnerabilities in the SSLv2
and SSLv3 protocols.
256 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The MySQL Wire Protocol Driver
Example
If your security environment is configured to use TLSv1.2 and TLSv1.1, specify the following values:
CryptoProtocolVersion=TLSv1.2, TLSv1.1
Default
TLSv1.2,TLSv1.1,TLSv1
GUI Tab
Security tab
CryptoLibName
Attribute
CryptoLibName (CLN)
Purpose
The absolute path for the OpenSSL library file containing the cryptographic library to be used by the data source
or connection when TLS/SSL is enabled. The cryptograpic library contains the implementations of cryptographic
algorithms the driver uses for data encryption.
This option allows you to designate a different cryptographic library if you encounter issues with the default
version or want to use a library that you provide. Common issues that require designating a different library
include security vulnerabilities with specific libraries or compatibility issues with your server or application.
Valid Values
absolute_path\openssl_filename
where:
absolute_path
openssl_filename
is the name of the OpenSSL library file containing the cryptographic library to be used by your data
source or connection.
Example
C:\Program Files\Progress\DataDirect\Connect64_for_ODBC_71\
Drivers\OpenSSL\1.0.0r\ddssl27.dll; (64-bit Windows)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 257
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Notes
• The OpenSSL library files provided by Progress combine the cryptographic and TLS/SSL libraries into a
single file; therefore, when your drivers are using a Progress library file, the values specified for the
CryptoLibName and SSLLibName options should be the same. For non-Progress library files, the libraries
may use separate files, which would require unique values to be specified.
• This option can be used to designate OpenSSL libraries not installed by the product; however, the drivers
are only certified against libraries provided by Progress.
Default
Empty string
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
CryptoLibName=C:\Program Files\Progress\DataDirect\
Connect64_for_ODBC_71\Drivers\OpenSSL\1.0.0r\ddssl27.dll;
See Advanced tab for details.
See also
SSLLibName on page 274
Attribute
DataSourceName (DSN)
Purpose
Specifies the name of a data source in your Windows Registry or odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
258 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The MySQL Wire Protocol Driver
Database Name
Attribute
Database (DB)
Purpose
Specifies the name of the database to which you want to connect.
Valid Values
database_name
where:
database_name
Default
None
GUI Tab
General tab
Attribute
DefaultLongDataBuffLen (DLDBL)
Purpose
The maximum length of data (in KB) the driver can fetch from long columns in a single round trip and the
maximum length of data that the driver can send using the SQL_DATA_AT_EXEC parameter.
Valid Values
An integer in multiples of 1024
The value must be in multiples of 1024 (for example, 1024, 2048). You need to increase the default value if
the total size of any Long data exceeds 1 MB. This value is multiplied by 1024 to determine the total maximum
length of fetched data. For example, if you enter a value of 2048, the maximum length of data would be 1024
x 2048, or 2097152 (2 MB).
Notes
• This connection option can affect performance.
Default
1024
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 259
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
GUI tab
Advanced tab
See also
• Performance Considerations on page 279
Description
Attribute
Description (n/a)
Purpose
Specifies an optional long description of a data source. This description is not used as a runtime connection
attribute, but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Enable SQLDescribeParam
Attribute
EnableDescribeParam (EDP)
Purpose
Determines whether the driver uses the SQLDescribeParam function, which describes parameters as a data
type of SQL_VARCHAR with a length of 255 for statements.
Valid Values
0|1
Behavior
If set to 1 (enabled), the SQLDescribeParam function describes parameters as a data type of SQL_VARCHAR
with a length of 255 for statements.
If set to 0 (disabled), the SQLDescribeParam function returns the standard ODBC error IM001.
260 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The MySQL Wire Protocol Driver
Default
0 (Disabled)
GUI tab
Advanced tab
Encryption Method
Attribute
EncryptionMethod (EM)
Purpose
The method the driver uses to encrypt data sent between the driver and the database server. If the specified
encryption method is not supported by the database server, the connection fails and the driver returns an error.
Valid Values
0|1
Behavior
If set to 0 (No Encryption), data is not encrypted.
If set to 1 (SSL), data is encrypted using the SSL protocols specified in the Crypto Protocol Version connection
option.
Notes
• This connection option can affect performance.
Default
0 (No Encryption)
GUI tab
Security tab
See also
• Crypto Protocol Version on page 256
• Performance Considerations on page 279
Failover Granularity
Attribute
FailoverGranularity (FG)
Purpose
Determines whether the driver fails the entire failover process or continues with the process if errors occur
while trying to reestablish a lost connection.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 261
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
This option applies only when Failover Mode is set to 1 (Extended Connection) or 2 (Select).
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
Valid Values
0|1|2|3
Behavior
If set to 0 (Non-Atomic), the driver continues with the failover process and posts any errors on the statement
on which they occur.
If set to 1 (Atomic) the driver fails the entire failover process if an error is generated as the result of anything
other than executing and repositioning a Select statement. If an error is generated as a result of repositioning
a result set to the last row position, the driver continues with the failover process, but generates a warning that
the Select statement must be reissued.
If set to 2 (Atomic Including Repositioning), the driver fails the entire failover process if any error is generated
as the result of restoring the state of the connection or the state of work in progress.
If set to 3 (Disable Integrity Check), the driver does not verify that the rows that were restored during the failover
process match the original rows. This value applies only when Failover Mode is set to 2 (Select).
Default
0 (Non-Atomic)
GUI Tab
Failover tab
Failover Mode
Attribute
FailoverMode (FM)
Purpose
Specifies the type of failover method the driver uses.
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
Valid Values
0|1|2
Behavior
If set to 0 (Connection), the driver provides failover protection for new connections only.
If set to 1 (Extended Connection), the driver provides failover protection for new and lost connections, but not
any work in progress.
If set to 2 (Select), the driver provides failover protection for new and lost connections. In addition, it preserves
the state of work performed by the last Select statement executed.
262 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The MySQL Wire Protocol Driver
Default
0 (Connection)
GUI Tab
Failover tab
Failover Preconnect
Attribute
FailoverPreconnect (FP)
Purpose
Specifies whether the driver tries to connect to the primary and an alternate server at the same time.
This attribute applies only when Failover Mode is set to 1 (Extended Connection) or 2 (Select) and at least one
alternate server is specified.
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
Valid Values
0|1
Behavior
If set to 0 (Disabled), the driver tries to connect to an alternate server only when failover is caused by an
unsuccessful connection attempt or a lost connection. This value provides the best performance, but your
application typically experiences a short wait while the failover connection is attempted.
If set to 1 (Enabled), the driver tries to connect to the primary and an alternate server at the same time. This
can be useful if your application is time-sensitive and cannot absorb the wait for the failover connection to
succeed.
Default
0 (Disabled)
GUI Tab
Failover tab
Host Name
Attribute
HostName (HOST)
Purpose
The name or the IP address of the server to which you want to connect.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 263
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Valid Values
server_name | IP_address
where:
server_name
IP_address
Notes
• The IP address must be in IPv4 format.
Default
None
GUI Tab
General tab
Attribute
HostNameInCertificate (HNIC)
Purpose
A host name for certificate validation when SSL encryption is enabled (Encryption Method=1) and validation
is enabled (Validate Server Certificate=1). This option provides additional security against man-in-the-middle
(MITM) attacks by ensuring that the server the driver is connecting to is the server that was requested.
Valid Values
host_name | #SERVERNAME#
where:
host_name
is the host name specified in the certificate. Consult your SSL administrator for the correct value.
Behavior
If set to a host name, the driver examines the subjectAltName values included in the certificate. If a dnsName
value is present in the subjectAltName values, then the driver compares the value specified for Host Name In
Certificate with the dnsName value. The connection succeeds if the values match. The connection fails if the
Host Name In Certificate value does not match the dnsName value.
264 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The MySQL Wire Protocol Driver
If no subjectAltName values exist or a dnsName value is not in the list of subjectAltName values, then the
driver compares the value specified for Host Name In Certificate with the commonName part of the Subject
name in the certificate. The commonName typically contains the host name of the machine for which the
certificate was created. The connection succeeds if the values match. The connection fails if the Host Name
In Certificate value does not match the commonName. If multiple commonName parts exist in the Subject
name of the certificate, the connection succeeds if the Host Name In Certificate value matches any of the
commonName parts.
If set to #SERVERNAME#, the driver compares the host server name specified as part of a data source or
connection string to the dnsName or the commonName value.
Default
None
GUI tab
Security tab
IANAAppCodePage
Attribute
IANAAppCodePage (IACP)
Purpose
An Internet Assigned Numbers Authority (IANA) value. You must specify a value for this option if your application
is not Unicode-enabled or if your database character set is not Unicode. The value you specify must match
the database character encoding and the system locale.
The driver uses the specified IANA code page to convert "W" (wide) functions to ANSI.
The driver and Driver Manager both check for the value of IANAAppCodePage in the following order:
• In the connection string
• In the Data Source section of the system information file (odbc.ini)
• In the ODBC section of the system information file (odbc.ini)
If the driver does not find an IANAAppCodePage value, the driver uses the default value of 4 (ISO 8859-1
Latin-1).
Valid Values
IANA_code_page
where:
IANA_code_page
is one of the valid values listed in "IANAAppCodePage values" in the Progress DataDirect for ODBC
Drivers Reference. The value must match the database character encoding and the system locale.
Notes
Refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers Reference
for details.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 265
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Default
4 (ISO 8559-1 Latin-1)
GUI tab
Advanced tab
Interactive Client
Attribute
InteractiveClient (IC)
Purpose
Determines how long a connection can be idle before the server disconnects it.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver initializes the wait_time session variable for the connection with the value of
the global interactive_timeout variable.
If set to 0 (Disabled), the driver initializes the wait_timeout session variable with the value of the global
wait_timeout variable.
Notes
• The wait_timeout variable controlled by the Interactive Client option is a session variable that can be modified
by the application after the connection has been established. The Interactive Client option controls only the
initial value of the wait_timeout session variable.
Default
0 (Disabled)
GUI tab
Advanced tab
Key Password
Attribute
KeyPassword (KP)
Purpose
The password used to access the individual keys in the keystore file when SSL is enabled (Encryption Method=1)
and SSL client authentication is enabled on the database server. Keys stored in a keystore can be individually
password-protected. To extract the key from the keystore, the driver must have the password of the key.
266 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The MySQL Wire Protocol Driver
Valid Values
key_password
where:
key_password
Default
None
GUI tab
Security tab
Keystore
Attribute
Keystore (KS)
Purpose
The name of the directory containing the keystore file to be used when SSL is enabled (Encryption Method=1)
and SSL client authentication is enabled on the database server. The keystore file contains the certificates that
the client sends to the server in response to the server’s certificate request. If you do not specify a directory,
the current directory is used.
Valid Values
keystore_directory
where:
keystore_directory
Notes
• The keystore and truststore files may be the same file.
Default
None
GUI tab
Security tab
Keystore Password
Attribute
KeystorePassword (KSP)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 267
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
The password used to access the keystore file when SSL is enabled (Encryption Method=1) and SSL client
authentication is enabled on the database server. The keystore file contains the certificates that the client sends
to the server in response to the server’s certificate request.
Valid Values
keystore_password
where:
keystore_password
Notes
• The keystore and truststore files may be the same file; therefore, they may have the same password.
Default
None
GUI tab
Security tab
Attribute
LoadBalanceTimeout (LBT)
Purpose
Specifies the number of seconds to keep inactive connections open in a connection pool. An inactive connection
is a database session that is not associated with an ODBC connection handle, that is, a connection in the pool
that is not in use by an application.
Valid Values
0|x
where:
Behavior
If set to 0, inactive connections are kept open.
If set to x, inactive connections are closed after the specified number of seconds passes.
Notes
• The Min Pool Size option may cause some connections to ignore this value.
268 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The MySQL Wire Protocol Driver
Default
0 (Disabled)
GUI tab
Pooling tab
See also
• Performance Considerations on page 279
Load Balancing
Attribute
LoadBalancing (LB)
Purpose
Determines whether the driver uses client load balancing in its attempts to connect to the database servers
(primary and alternate). You can specify one or multiple alternate servers by setting the Alternate Servers
option.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses client load balancing and attempts to connect to the database servers
(primary and alternate servers) in random order.
If set to 0 (Disabled), the driver does not use client load balancing and connects to each server based on their
sequential order (primary server first, then, alternate servers in the order they are specified).
Notes
• This option has no effect unless alternate servers are defined for the Alternate Servers connection option.
Default
0 (Disabled)
GUI Tab
Failover tab
Login Timeout
Attribute
LoginTimeout (LT)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 269
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
The number of seconds the driver waits for a connection to be established before returning control to the
application and generating a timeout error. To override the value that is set by this connection option for an
individual connection, set a different value in the SQL_ATTR_LOGIN_TIMEOUT connection attribute using
the SQLSetConnectAttr() function.
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, the connection request does not time out. The driver silently ignores the
SQL_ATTR_LOGIN_TIMEOUT attribute.
If set to 0, the connection request does not time out, but the driver responds to the SQL_ATTR_LOGIN_TIMEOUT
attribute.
If set to x, the connection request times out after the specified number of seconds unless the application
overrides this setting with the SQL_ATTR_LOGIN_TIMEOUT attribute.
Default
15
GUI tab
Advanced tab
Attribute
MaxPoolSize (MXPS)
Purpose
The maximum number of connections allowed within a single connection pool. When the maximum number of
connections is reached, no additional connections can be created in the connection pool.
Valid Values
An integer from 1 to 65535
For example, if set to 20, the maximum number of connections allowed in the pool is 20.
Default
100
GUI tab
Pooling tab
270 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The MySQL Wire Protocol Driver
See also
• Performance Considerations on page 279
Attribute
MinPoolSize (MNPS)
Purpose
The minimum number of connections that are opened and placed in a connection pool, in addition to the active
connection, when the pool is created. The connection pool retains this number of connections, even when
some connections exceed their Load Balance Timeout value.
Valid Values
0|x
where:
Behavior
If set to 0, no connections are opened in addition to the current existing connection.
Notes
• This connection option can affect performance.
Example
If set to 5, the start-up number of connections in the pool is 5 in addition to the current existing connection.
Default
0
GUI tab
Pooling tab
See also
• Performance Considerations on page 279
Password
Attribute
Password (PWD)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 271
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
The password that the application uses to connect to your database. The Password option cannot be specified
through the driver Setup dialog box and should not be stored in a data source. It is specified through the Logon
dialog box or a connection string.
Valid Values
pwd
where:
pwd
is a valid password.
Default
None
GUI Tab
n/a
Port Number
Attribute
PortNumber (PORT)
Purpose
The port number of the server listener.
Valid Values
port_name
where:
port_name
is the port number of the server listener. Check with your database administrator for the correct
number.
Notes
• This option is mutually exclusive with the Server Name and TNSNames File options.
Default
3306
GUI Tab
General tab
272 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The MySQL Wire Protocol Driver
Query Timeout
Attribute
QueryTimeout (QT)
Purpose
The number of seconds for the default query timeout for all statements that are created by a connection. To
override the value set by this connection option for an individual statement, set a different value in the
SQL_ATTR_QUERY_TIMEOUT statement attribute on the SQLSetStmtAttr() function.
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, the query does not time out. The driver silently ignores the SQL_ATTR_QUERY_TIMEOUT attribute.
If set to 0, the query does not time out, but the driver responds to the SQL_ATTR_QUERY_TIMEOUT attribute.
If set to x, all queries time out after the specified number of seconds unless the application overrides this value
by setting the SQL_ATTR_QUERY_TIMEOUT attribute.
Default
0
GUI tab
Advanced tab
Attribute
ReportCodepageConversionErrors (RCCE)
Purpose
Specifies how the driver handles code page conversion errors that occur when a character cannot be converted
from one character set to another.
An error message or warning can occur if an ODBC call causes a conversion error, or if an error occurs during
code page conversions to and from the database or to and from the application. The error or warning generated
is Code page conversion error encountered. In the case of parameter data conversion errors, the
driver adds the following sentence: Error in parameter x, where x is the parameter number. The standard
rules for returning specific row and column errors for bulk operations apply.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 273
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Valid Values
0|1|2
Behavior
If set to 0 (Ignore Errors), the driver substitutes 0x1A for each character that cannot be converted and does
not return a warning or error.
If set to 1 (Return Error), the driver returns an error instead of substituting 0x1A for unconverted characters.
If set to 2 (Return Warning), the driver substitutes 0x1A for each character that cannot be converted and returns
a warning.
Default
0 (Ignore Errors)
GUI tab
Advanced tab
SSLLibName
Attribute
SSLLibName (SLN)
Purpose
The absolute path for the OpenSSL library file containing the TLS/SSL library to be used by the data source
or connection when TLS/SSL is enabled. The SSL library contains the implementations of TLS/SSL protocols
the driver uses for data encryption.
This option allows you to designate a different SSL library if you encounter issues with the default version or
want to use a library that you provide. Common issues that require designating a different library include security
vulnerabilities with specific libraries or compatibility issues with your server or application.
Valid Values
absolute_path\openssl_filename
where:
absolute_path
openssl_filename
is the name of the OpenSSL library file containing the TLS/SSL Library to be used by your data
source or connection.
Example
C:\Program Files\Progress\DataDirect\Connect64_for_ODBC_71\
Drivers\OpenSSL\1.0.0r\ddssl27.dll;
274 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The MySQL Wire Protocol Driver
Notes
• The OpenSSL library files provided by Progress combine the cryptographic and TLS/SSL libraries into a
single file; therefore, when your drivers are using a Progress library file, the values specified for the
CryptoLibName and SSLLibName options should be the same. For non-Progress library files, the libraries
may use separate files, which would require unique values to be specified.
• This option can be used to designate OpenSSL libraries not installed by the product; however, the drivers
are only certified against libraries provided by Progress.
Default
No default value
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
SSLLibName=C:\Program Files\Progress\DataDirect\
Connect64_for_ODBC_71\Drivers\OpenSSL\1.0.0r\ddssl27.dll;
See Advanced tab for details.
See also
CryptoLibName on page 257
Attribute
KeepAlive (KA)
Purpose
Specifies whether the driver enables TCPKeepAlive. TCPKeepAlive maintains idle TCP connections by
periodically passing packets between the client and server. If either the client or server does not respond to a
packet, the connection is considered inactive and is terminated. In addition, TCPKeepAlive prevents valid idle
connections from being disconnected by firewalls and proxies by maintaining network activity.
Valid Values
0|1
Behavior
If set to 0 (Disabled), the driver does not enable TCPKeepAlive.
If set to 1 (Enabled), the driver enables TCPKeepAlive.
Default
0 (Disabled)
GUI Tab
Advanced tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 275
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Attribute
TreatBinaryAsChar (TBAC)
Purpose
Allows data that MySQL stores as BINARY or VARBINARY to be described and returned as CHAR or VARCHAR
values, respectively.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver describes and returns data that MySQL stores as BINARY or VARBINARY as
CHAR or VARCHAR values, respectively.
If set to 0 (Disabled), the driver describes and returns data that MySQL describes as BINARY or VARBINARY
as BINARY or VARBINARY values, respectively.
Example
Create the following MySQL table:
CREATE TABLE binTable (col1 binary(3))
Using this example, the driver would return the value of col1 as a CHAR value, "abc", instead of a BINARY
value "616263".
Default
0 (Disabled)
GUI tab
Advanced tab
Truststore
Attribute
Truststore (TS)
276 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The MySQL Wire Protocol Driver
Purpose
The directory that contains the truststore file and the truststore file name to be used when SSL is enabled
(Encryption Method=1) and server authentication is used. The truststore file contains a list of the valid Certificate
Authorities (CAs) that are trusted by the client machine for SSL server authentication. If you do not specify a
directory, the current directory is used.
Valid Values
truststore_directory\filename
where:
truststore_directory
filename
Notes
• The truststore and keystore files may be the same file.
Default
None
GUI tab
Security tab
Truststore Password
Attribute
TruststorePassword (TSP)
Purpose
The password that is used to access the truststore file when SSL is enabled (Encryption Method=1) and server
authentication is used. The truststore file contains a list of the Certificate Authorities (CAs) that the client trusts.
Valid Values
truststore_password
where:
truststore_password
Notes
• The truststore and keystore files may be the same file; therefore, they may have the same password.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 277
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Default
None
GUI tab
Security tab
User Name
Attribute
LogonID (UID)
Purpose
The default user ID that is used to connect to your database. Your ODBC application may override this value
or you may override it in the logon dialog box or connection string.
Valid Values
userid
where:
userid
Default
None
GUI tab
Security tab
Attribute
ValidateServerCertificate (VSC)
Purpose
Determines whether the driver validates the certificate that is sent by the database server when SSL encryption
is enabled (Encryption Method=1). When using SSL server authentication, any certificate sent by the server
must be issued by a trusted Certificate Authority (CA). Allowing the driver to trust any certificate returned from
the server even if the issuer is not a trusted CA is useful in test environments because it eliminates the need
to specify truststore information on each client in the test environment.
Truststore information is specified using the Trust Store and Trust Store Password options.
Valid Values
0|1
278 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The MySQL Wire Protocol Driver
Behavior
If set to 1 (Enabled), the driver validates the certificate that is sent by the database server. Any certificate from
the server must be issued by a trusted CA in the truststore file. If the Host Name In Certificate option is specified,
the driver also validates the certificate using a host name. The Host Name In Certificate option provides
additional security against man-in-the-middle (MITM) attacks by ensuring that the server the driver is connecting
to is the server that was requested.
If set to 0 (Disabled), the driver does not validate the certificate that is sent by the database server. The driver
ignores any truststore information specified by the Trust Store and Trust Store Password options.
Default
1 (Enabled)
GUI tab
Security tab
Performance Considerations
The following connection options can enhance driver performance.
The option names found on the tabs of the driver Setup dialog box are the same as the connection string
attribute names unless otherwise noted in parentheses. The connection string attribute name does not have
spaces between the words. For example, the option name Application Using Threads is equivalent to the
connection string attribute name ApplicationUsingThreads.
Application Using Threads (ApplicationUsingThreads): The driver coordinates concurrent database
operations (operations from different threads) by acquiring locks. Although locking prevents errors in the driver,
it also decreases performance. If your application does not make ODBC calls from different threads, the driver
has no reason to coordinate operations. In this case, the ApplicationUsingThreads attribute should be disabled
(set to 0).
Note: If you are using a multi-threaded application, you must enable the Application Using Threads option.
Default Buffer Size for Long/LOB Columns (DefaultLongDataBuffLen): To improve performance when
your application fetches images, pictures, or long text or binary data, a buffer size can be set to accommodate
the maximum size of the data. The buffer size should only be large enough to accommodate the maximum
amount of data retrieved; otherwise, performance is reduced by transferring large amounts of data into an
oversized buffer. If your application retrieves more than 1 MB of data, the buffer size should be increased
accordingly.
Connection Pooling (Pooling): If you enable the driver to use connection pooling, you can set additional
options that affect performance:
• Load Balance Timeout (LoadBalanceTimeout ): You can define how long to keep connections in the
pool. The time that a connection was last used is compared to the current time and, if the timespan exceeds
the value of the Load Balance Timeout option, the connection is destroyed. The Min Pool Size option can
cause some connections to ignore this value.
• Connection Reset (ConnectionReset): Resetting a re-used connection to the initial configuration settings
impacts performance negatively because the connection must issue additional commands to the server.
• Max Pool Size (MaxPoolSize ): Setting the maximum number of connections that the pool can contain too
low might cause delays while waiting for a connection to become available. Setting the number too high
wastes resources.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 279
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
• Min Pool Size (MinPoolSize): A connection pool is created when the first connection with a unique
connection string connects to the database. The pool is populated with connections up to the minimum pool
size, if one has been specified. The connection pool retains this number of connections, even when some
connections exceed their Load Balance Timeout value.
Encryption Method (EncryptionMethod): Data encryption may adversely affect performance because of the
additional overhead (mainly CPU usage) that is required to encrypt and decrypt data.
Failover Mode (FailoverMode): Although high availability that replays queries after a failure provides increased
levels of protection, it can adversely affect performance because of increased overhead.
Data Types
The following table shows how the MySQL data types map to the standard ODBC data types.
MySQL ODBC
BIGINT SQL_BIGINT
BINARY SQL_BINARY
BIT SQL_BINARY
BLOB SQL_LONGVARBINARY
CHAR SQL_CHAR
DATE SQL_TYPE_DATE
DATETIME SQL_TYPE_TIMESTAMP
DECIMAL SQL_DECIMAL
DOUBLE SQL_DOUBLE
FLOAT SQL_REAL
INTEGER SQL_INTEGER
LONGBLOB SQL_LONGVARBINARY
LONGTEXT SQL_LONGVARCHAR
280 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The MySQL Wire Protocol Driver
MySQL ODBC
MEDIUMBLOB SQL_LONGVARBINARY
MEDIUMINT SQL_INTEGER
MEDIUMTEXT SQL_LONGVARCHAR
SMALLINT SQL_SMALLINT
TEXT SQL_LONGVARCHAR
TIME SQL_TYPE_TIME
TIMESTAMP SQL_TYPE_TIMESTAMP
TINYBLOB SQL_LONGVARBINARY
TINYINT SQL_TINYINT
TINYTEXT SQL_LONGVARCHAR
VARBINARY SQL_VARBINARY
VARCHAR SQL_VARCHAR
YEAR SQL_SMALLINT
See Retrieving Data Type Information on page 72 for more information about data types.
Note: The Treat Binary Data as Character Data connection option affects how certain ODBC data types are
reported. See Treat Binary Data as Character Data on page 276 for details.
Unicode Support
When the character set of a character column is Unicode, then the MySQL Wire Protocol driver maps the
MySQL data type to Unicode data type as follows:
CHAR SQL_WCHAR
LONGTEXT SQL_WLONGVARCHAR
MEDIUMTEXT SQL_WLONGVARCHAR
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 281
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
TEXT SQL_WLONGVARCHAR
TINYTEXT SQL_WLONGVARCHAR
VARCHAR SQL_WVARCHAR
Advanced Features
The driver supports the following advanced features:
• Failover
• Security
• Connection Pooling
Failover
The driver supports failover and its related connection options. Failover connection options are located on the
Failover tab of the driver Setup dialog box. See Using Failover on page 78 for a general description of failover
and its implementation.
Security
The driver supports authentication and encryption. Security connection options are located on the Security tab
of the driver Setup dialog box. See Using Security on page 89 for a general description of security and its
implementation.
Connection Pooling
The driver supports connection pooling and its related connection options. Connection pooling connection
options are located on the Pooling tab of the driver Setup dialog box. See Using DataDirect Connection Pooling
on page 97 for a general description of connection pooling and its implementation.
282 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
SQL Support
The driver supports the minimum SQL grammar.
• SQLColumnPrivileges
• SQLForeignKeys
• SQLTablePrivileges
Refer to "ODBC API and scalar functions" in the Progress DataDirect for ODBC Drivers Reference for a list of
supported API functions.
The DataDirect Connect for ODBC and DataDirect Connect64 for ODBC Oracle Wire Protocol driver (the Oracle
Wire Protocol driver) each support Oracle database servers.
For the latest support information, visit the Progress DataDirect Supported Configurations page:
https://www.progress.com/supported-configurations/datadirect.
The Oracle Wire Protocol driver is supported in the Windows, UNIX, and Linux environments. See
Environment-Specific Information on page 58 for detailed information about the Windows, UNIX, and Linux
environments supported by this driver.
Refer to the readme file shipped with your DataDirect Connect product for the file name of the Oracle Wire
Protocol driver.
Note: The Oracle Wire Protocol driver does not require any Oracle client software. Progress DataDirect also
provides an Oracle client-based driver; see The Oracle Driver on page 617 for details.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 283
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Driver Requirements
The driver has no client requirements.
On Windows, data sources are stored in the Windows Registry. You can configure and modify data sources
through the ODBC Administrator using a driver Setup dialog box, as described in this section.
On UNIX and Linux, data sources are stored in the odbc.ini file. On Linux, you can configure and
modify data sources through the Linux ODBC Administrator using a driver Setup dialog box, as described in
this section.
Note: This book shows dialog box images that are specific to Windows. If you are using the drivers in the
Linux environment, the dialog box that you see may differ slightly from the Windows version. Windows-only
and UNIX-only connection options are specifically noted by icons in the Setup dialog box descriptions.
284 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
When the driver is first installed, the values of its connection options are set by default. These values appear
on the driver Setup dialog box tabs when you create a new data source. You can change these default values
by modifying the data source. In the following procedure, the description of each tab is followed by a table that
lists the connection options for that tab and their initial default values. This table links you to a complete
description of the options and their connection string attribute equivalents. The connection string attributes are
used to override the default values of the data source if you want to change these values at connection time.
To configure an Oracle data source:
• On Windows, start the ODBC Administrator by selecting its icon from the DataDirect Connect
program group.
2. Select a tab:
• User DSN: If you are configuring an existing user data source, select the data source name and click
Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the driver
and click Finish to display the driver Setup dialog box.
• System DSN: If you are configuring an existing system data source, select the data source name
and click Configure to display the driver Setup dialog box.
If you are configuring a new system data source, click Add to display a list of installed drivers. Select
the driver and click Finish to display the driver Setup dialog box.
• File DSN: If you are configuring an existing file data source, select the data source file and click Configure
to display the driver Setup dialog box.
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select
a driver. Click Advanced if you want to specify attributes; otherwise, click Next to proceed. Specify a
name for the data source and click Next. Verify the data source information; then, click Finish to display
the driver Setup dialog box.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 285
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Note: The General tab displays only fields that are required for creating a data source. The fields on all
other tabs are optional, unless noted otherwise.
3. On this tab, provide values for the options in the following table; then, click Apply. The table provides links
to descriptions of the connection options.
286 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
4. Optionally, click the Advanced tab to specify additional data source settings.
Figure 19: Advanced tab
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
Default Buffer Size for Long/LOB Columns (in Kb) on page 327 1024
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 287
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Extended Options: Type a semi-colon separated list of connection options and their values. Use this
configuration option to set the value of undocumented connection options that are provided by Progress
DataDirect customer support. You can include any valid connection option in the Extended Options string,
for example:
Database=Server1;UndocumentedOption1=value[;UndocumentedOption2=value;]
If the Extended Options string contains option values that are also set in the setup dialog or data source,
the values of the options specified in the Extended Options string take precedence. However, connection
options that are specified on a connection string override any option value specified in the Extended Options
string.
Note: Do not specify the Extended Options configuration option in a connection string, or the driver will
return an error. Instead, applications should specify the individual undocumented connection options in the
connection string.
288 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Translate: Click Translate to display the Select Translator dialog box, which lists the translators
specified in the ODBC Translators section of the Registry. Progress DataDirect provides a translator named
OEM to ANSI that translates your data from the IBM PC character set to the ANSI character set.
Select a translator; then, click OK to close this dialog box.
5. Optionally, click the Security tab to specify security data source settings.
Figure 20: Security tab
See Using Security on page 89 for a general description of authentication and encryption and their
configuration requirements.
See OS Authentication on page 376 for a discussion of Oracle and SSL encryption.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 289
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
6. Optionally, click the Performance tab to specify performance data source settings.
Figure 21: Performance tab
290 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 291
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
7. Optionally, click the Failover tab to specify failover data source settings.
Figure 22: Failover tab
See Using Failover on page 78 for a general description of failover and its related connection options.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
292 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
8. Optionally, click the Pooling tab to specify connection pooling data source settings.
Figure 23: Pooling tab
See Using DataDirect Connection Pooling on page 97 for a general description of connection pooling.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 293
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
9. Optionally, click the Bulk tab to specify DataDirect Bulk Load data source settings.
Figure 24: Bulk tab
See Using DataDirect Bulk Load on page 101 for a general description of DataDirect Bulk Load.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
Bulk Options on page 315 (No Index Errors is described under the
No Index Errors: disabled
Bulk Options description.)
294 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
If your application is already coded to use parameter array batch functionality, you can leverage DataDirect
Bulk Load features through the Enable Bulk Load connection option. Enabling this option automatically
converts the parameter array batch operation to use the database bulk load protocol.
If you are not using parameter array batch functionality, you can export data to a bulk load data file, verify
the metadata of the bulk load configuration file against the structure of the target table, and bulk load data
to a table. Use the following steps to accomplish these tasks.
a) To export data from a table to a bulk load data file, click Export Table from the Bulk tab. The Export
Table dialog box appears.
Figure 25: Export Table dialog box
Both a bulk data file and a bulk configuration file are produced by exporting a table. The configuration
file has the same name as the data file, but with an XML extension. See Using DataDirect Bulk Load on
page 101 for details about these files.
The bulk export operation can create a log file and can also export to external files. See External Overflow
Files on page 108 for more information. The export operation can be configured such that if any errors
or warnings occur:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 295
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
b) To verify the metadata of the bulk load configuration file against the structure of the target database
table, click Verify from the Bulk tab. See Verification of the Bulk Load Configuration File on page 106 for
details. The ODBC Oracle Wire Protocol Verify Driver Setup dialog box appears.
Figure 26: ODBC Oracle Wire Protocol Verify Driver Setup dialog box
Table Name: A string that specifies the name of the target database table into which the data is to be
loaded.
Configuration Filename: A string that specifies the path (relative or absolute) and file name of the bulk
configuration file. The file name must be the fully qualified path to the configuration file.
296 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
c) To bulk load data from the bulk data file to a database table, click Load Table from the Bulk tab. The
Load File dialog box appears.
Figure 27: Load File dialog box
The load operation can create a log file and can also create a discard file that contains rows rejected
during the load. The discard file is in the same format as the bulk load data file. After fixing reported
issues in the discard file, the bulk load can be reissued using the discard file as the bulk load data file.
The export operation can be configured such that if any errors or warnings occur:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 297
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
298 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
10. Optionally, click the Client Monitoring tab to specify additional data source settings.
Figure 28: Client Monitoring tab
See Using Client Information on page 87 for additional information about client monitoring.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 299
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
11. Optionally, click the Advanced Security tab to specify settings for Oracle Advanced Security (OAS).
Figure 29: Advanced Security tab
See Oracle Advanced Security on page 375 for a general description of encryption configuration.
Refer to your Oracle documentation for a discussion of Oracle Advanced Security.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
Encryption Types on page 335 All listed encryption algorithms are selected
300 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Data Integrity Types on page 325 SHA1 and MD5 are selected
12. At any point during the configuration process, you can click Test Connect to attempt to connect to the data
source using the connection options specified in the driver Setup dialog box. A logon dialog box appears
(see Using a Logon Dialog Box (Oracle) on page 302 for details). Note that the information you enter in the
logon dialog box during a test connect is not saved.
• If the driver can connect, it releases the connection and displays a Connection Established message.
Click OK.
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message. Click OK.
Note: If you are configuring alternate servers for use with the connection failover feature, be aware that
the Test Connect button tests only the primary server, not the alternate servers.
13. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
The DSN-less connection string specifies a driver instead of a data source. All connection information must be
entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
Connection Option Descriptions for Oracle Wire Protocol on page 303 lists the long and short names for each
attribute, as well as the initial default value when the driver is first installed. You can specify either long or short
names in the connection string.
An example of a DSN connection string with overriding attribute values for Oracle Wire Protocol is:
DSN=Accounting;ID=JOHN;PWD=XYZZY
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 301
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Note: To configure a standard connection, complete the first four fields and skip to Step 6 on page 303
1. In the Host field, type either the name or the IP address of the server to which you want to connect.
The IP address can be specified in either IPv4 or IPv6 format, or a combination of the two. See Using IP
Addresses on page 67 for details concerning these formats.
If you enter a value for this field, the Server Name field is not available.
This field is not available if you enter a value for the Server Name field.
2. In the Port Number field, type the number of your Oracle listener. Check with your database administrator
for the correct number.
If you enter a value for this field, the Server Name field is not available.
This field is not available if you enter a value for the Server Name field.
3. In the SID field, type the Oracle System Identifier that refers to the instance of Oracle running on the server.
If you enter a value for this field, the Server Name and Service Name fields are not available.
This field is not available if you enter a value for the Service Name or Server Name fields.
4. In the Service Name field, type the Oracle service name that specifies the database used for the connection.
See Service Name under Step 3 on page 286 in Data Source Configuration through a GUI (Oracle) on page
284 for details.
302 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
If you enter a value for this field, the Server Name and SID fields are not available.
This field is not available if you enter a value for the SID or Server Name field.
Note: If you want to configure a TNSNames connection, complete only the following two fields.
5. In the Server Name field, type a net service name that exists in the TNSNAMES.ORA file. The corresponding
entry in the TNSNAMES.ORA file is used to obtain Host, Port Number, and SID information.
If you enter a value for this field, the Host, Port Number, SID, and Service Name fields are not available.
If you enter a value for either the Host, Port Number, SID, or Service Name fields, this field is not available.
Note: You can also use OS Authentication to connect to an Oracle database. See OS Authentication on page
376 for details.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 303
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
BulkBinaryThreshold (BBT) 32
BulkCharacterThreshold (BCT) -1
BulkLoadOptions (BLO) 0
CachedCursorLimit (CCL) 32
CachedDescriptionLimit (CDL) 0
ConnectionRetryCount (CRC) 0
ConnectionRetryDelay (CRD) 3
304 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
LoadBalanceTimeout (LBT) 0
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 305
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
LockTimeout (LTO) -1
LoginTimeout (LT) 15
MinPoolSize (MNPS) 0
QueryTimeout (QT) 0
306 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
WireProtocolMode (WPM) 2
Accounting Info
Attribute
AccountingInfo (AI)
Purpose
Accounting information to be stored in the database. This value sets the CLIENT_INFO value of the V$SESSION
table on the server. This value is used by the client information feature.
Valid Values
string
where:
string
Notes
• This connection option can affect performance.
Default
None
GUI Tab
Client Monitoring tab
See also
Performance Considerations on page 367
Action
Attribute
Action (ACT)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 307
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
The current action (Select, Insert, Update, or Delete, for example) within the current module. This value sets
the ACTION column of the V$SESSION table on the server. This value is used by the client information feature.
This option only applies to connections to Oracle 10g R2 and higher database servers.
Valid Values
string
where:
string
Notes
• You can also specify this information using the Oracle DBMS_APPLICATION_INFO.SET_ACTION procedure
or the DBMS_APPLICATION_INFO.SET_MODULE procedure.
• This connection option can affect performance.
Default
None
GUI Tab
Client Monitoring tab
See also
Performance Considerations on page 367
AllowedOpenSSLVersions
Attribute
AllowedOpenSSLVersions (AOV)
Purpose
Important: Version 1.0.2 of the OpenSSL library has reached the end of its product life cycle and is no longer
receiving security updates. Best security practices dictate that you use the latest version of the library.
Determines which version of the OpenSSL library file the driver uses for data encryption. Although the latest
version of the OpenSSL library is the most secure, some characteristics of the library can cause connections
to certain databases to fail. This option allows you to continue using older versions of the OpenSSL library
while you transition your environment to support the latest version.
308 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Valid Values
latest | openssl_version_number[[,openssl_version_number]...]
where:
openssl_version_number
is the version number for the OpenSSL library file to be loaded by the driver, for example, 1.0.2.
When more than one version is specified, the driver will first attempt to load the first version listed.
If the driver is unable to locate and load this file, it will attempt to load the next version in the value.
The driver currently supports versions 1.1.1 and 1.0.2. Refer to the installed readme for latest
supported versions.
Behavior
If set to latest, the driver loads the latest installed version of the OpenSSL library file provided by Progress.
If set to openssl_version_number, the driver loads the specified version of the OpenSSL library file. This
value is used to specify a version other than the latest.
Notes
• This option is ignored if OpenSSL library files are specified using the CryptoLibName and SSLLibName
options.
• This option works only with OpenSSL library files provided by Progress and user supplied OpenSSL library
files that match Progress's naming convention and installation location.
• This option works only for installations using the default directory structure.
• Consult your database administrator concerning the security settings of your server.
Default
1.1.1,1.0.2
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
AllowedOpenSSLVersions=1.0.2
See also
Advanced tab
Alternate Servers
Attribute
AlternateServers (ASRV)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 309
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
A list of alternate database servers to which the driver tries to connect if the primary database server is
unavailable. Specifying a value for this option enables connection failover for the driver. The value you specify
must be in the form of a string that defines the physical location of each alternate server. All of the other required
connection information for each alternate server is the same as what is defined for the primary server connection.
Valid Values
(HostName=hostvalue:PortNumber=portvalue:{SID=sidvalue | ServiceName=servicevalue}[,
. . .])
You must specify the host name, port number, and either the SID or service name of each alternate server.
Example
The following Alternate Servers value defines two alternate database servers for connection failover:
(HostName=AccountingOracleServer:PortNumber=1521:
SID=Accounting,HostName=255.201.11.24:PortNumber=1522:
ServiceName=ABackup.NA.MyCompany)
Default
None
GUI tab
Failover tab
Application Name
Attribute
ApplicationName (AN)
Purpose
The name of the application to be stored in the database. This value sets the dbms_session value in the
database and the PROGRAM value of the V$SESSION table on the server. This value is used by the client
information feature.
Valid Values
string
where:
string
Notes
• This connection option can affect performance.
310 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Default
None
GUI Tab
Client Monitoring tab
See also
Performance Considerations on page 367
Attribute
ApplicationUsingThreads (AUT)
Purpose
Determines whether the driver works with applications using multiple ODBC threads.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver works with single-threaded and multi-threaded applications.
If set to 0 (Disabled), the driver does not work with multi-threaded applications. If using the driver with
single-threaded applications, this value avoids additional processing required for ODBC thread-safety standards.
Notes
• This connection option can affect performance.
Default
1 (Enabled)
GUI tab
Advanced tab
See also
Performance Considerations on page 367
Array Size
Attribute
ArraySize (AS)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 311
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
The number of bytes the driver can fetch in a single network round trip. Larger values increase throughput by
reducing the number of times the driver fetches data across the network. Smaller values increase response
time, as there is less of a delay waiting for the server to transmit data.
Valid Values
An integer from 1 to 4,294,967,296 (4 GB)
The value 1 does not define the number of bytes but, instead, causes the driver to allocate space for exactly
one row of data.
Notes
• This connection option can affect performance.
Default
60000
GUI Tab
Performance tab
See also
Performance Considerations on page 367
Authentication Method
Attribute
AuthenticationMethod (AM)
Purpose
Specifies the method the driver uses to authenticate the user to the server when a connection is established.
If the specified authentication method is not supported by the database server, the connection fails and the
driver generates an error.
Valid Values
1|3|4|5|6
Behavior
If set to 1 (Encrypt Password), the driver sends the user ID in clear text and an encrypted password to the
server for authentication.
If set to 3 (Client Authentication), the driver uses client authentication when establishing a connection. The
database server relies on the client to authenticate the user and does not provide additional authentication.
If set to 4 (Kerberos Authentication), the driver uses Kerberos authentication. This method supports both
Windows Active Directory Kerberos and MIT Kerberos environments.
312 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
When set to 5 (Kerberos with UID & PWD), the driver uses both Kerberos authentication and user ID and
password authentication. The driver first authenticates the user using Kerberos. If a user ID and password are
specified, the driver reauthenticates using the user name and password supplied. An error is generated if a
user ID and password are not specified.
If set to 6 (NTLM), the driver uses NTLMv1 authentication for Windows clients.
Default
1 (Encrypt Password)
GUI tab
Security tab
Batch Size
Attribute
BulkLoadBatchSize (BLBS)
Purpose
The number of rows that the driver sends to the database at a time during bulk operations. This value applies
to all methods of bulk loading.
Valid Values
0|x
where
Default
1024
GUI Tab
Bulk tab
Attribute
BulkBinaryThreshold (BBT)
Purpose
The maximum size, in KB, of binary data that is exported to the bulk data file.
Valid Values
-1 | 0 | x
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 313
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
where
Behavior
If set to -1, all binary data, regardless of size, is written to the bulk data file, not to an external file.
If set to 0, all binary data, regardless of size, is written to an external file, not the bulk data file. A reference to
the external file is written to the bulk data file.
If set to x, any binary data exceeding this specified number of KB is written to an external file, not the bulk data
file. A reference to the external file is written to the bulk data file.
Default
32
GUI Tab
Bulk tab
Attribute
BulkCharacterThreshold (BCT)
Purpose
The maximum size, in KB, of character data that is exported to the bulk data file.
Valid Values
-1 | 0 | x
where
Behavior
If set to -1, all character data, regardless of size, is written to the bulk data file, not to an external file.
If set to 0, all character data regardless of size, is written to an external file, not the bulk data file. A reference
to the external file is written to the bulk data file.
If set to x, any character data exceeding this specified number of KB is written to an external file, not the bulk
data file. A reference to the external file is written to the bulk data file.
Default
-1
314 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
GUI Tab
Bulk tab
Bulk Options
Attribute
BulkLoadOptions (BLO)
Purpose
Toggles options for the bulk load process.
This option only applies to connections to Oracle 11g R2 and higher database servers.
Valid Values
0|x
where:
is a positive integer representing the cumulative total of the Bulk Options values.
Behavior
If set to 0, none of the options for bulk load are enabled.
If set to x, the values represented by x are enabled.
Currently, the only bulk load option available is:
No Index Errors - The driver stops a bulk load operation when a value that would cause an index to be invalidated
is loaded. For example, if a value is loaded that violates a unique or non-null constraint, the driver stops the
bulk load operation and discards all data being loaded, including any data that was loaded prior to the problem
value. If not enabled, the bulk load operation continues even if a value that would cause an index to be invalidated
is loaded. Value=128.
Notes
• The cumulative value of the options is only used in a connection string with the connection string attribute,
BulkLoadOptions. On the Bulk tab of the driver Setup dialog, the individual options are enabled by selecting
the appropriate check box.
Default
0
GUI Tab
Bulk tab
Attribute
CachedCursorLimit (CCL)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 315
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
Specifies the number of Oracle Cursor Identifiers that the driver stores in cache. A Cursor Identifier is needed
for each concurrent open Select statement. When a Select statement is closed, the driver stores the identifier
in its cache, up to the limit specified, rather than closing the Cursor Identifier. When a new Cursor Identifier is
needed, the driver takes one from its cache, if one is available. Cached Cursor Identifiers are closed when the
connection is closed.
Valid Values
An integer from 0 to 65535
Default
32
GUI Tab
Performance tab
See also
Performance Considerations on page 367
Attribute
CachedDescriptionLimit (CDL)
Purpose
Specifies the number of descriptions that the driver saves for Select statements. These descriptions include
the number of columns, data type, length, and scale for each column. The matching is done by an exact-text
match through the FROM clause.
Valid Values
An integer from 0 to 65535
Notes
• If the Select statement contains a Union or a nested Select, the description is not cached.
Default
0
GUI Tab
Performance tab
See also
Performance Considerations on page 367
316 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Attribute
CatalogIncludesSynonyms (CIS)
Purpose
Determines whether synonyms are included in calls to SQLProcedures, SQLStatistics, and
SQLProcedureColumns.
Valid Values
0|1
Behavior
If set to 1 (Enabled), synonyms are included in calls to SQLProcedures, SQLStatistics, and
SQLProcedureColumns.
If set to 0 (Disabled), synonyms are excluded (a non-standard behavior) and performance is thereby improved.
Notes
• This connection option can affect performance.
Default
1 (Enabled)
GUI Tab
Performance tab
See also
Performance Considerations on page 367
Catalog Options
Attribute
CatalogOptions (CO)
Purpose
Determines whether SQL_NULL_DATA is returned for the result columns REMARKS and COLUMN_DEF.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the result column REMARKS (for the catalog functions SQLTables and SQLColumns)
and the result column COLUMN_DEF (for the catalog function SQLColumns) return actual values. Enabling
this option reduces the performance of your catalog (SQLColumns and SQLTables) queries.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 317
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
If set to 0 (Disabled), SQL_NULL_DATA is returned for the result columns REMARKS and COLUMN_DEF.
Notes
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Advanced tab
See also
Performance Considerations on page 367
Attribute
ClientHostName (CHN)
Purpose
The host name of the client machine to be stored in the database. This value sets the MACHINE value in the
V$SESSION table on the server. This value is used by the client information feature.
Valid Values
string
where:
string
If a value for this option is not specified, the driver uses the current machine name and IP address in the
following format:
machine_name/IP_address
Notes
• This connection option can affect performance.
Default
None
GUI Tab
Client Monitoring tab
See also
Performance Considerations on page 367
318 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Client ID
Attribute
ClientID (CID)
Purpose
Additional information about the client to be stored in the database. This value sets the CLIENT_IDENTIFIER
value in the V$SESSION table on the server. This value is used by the client information feature.
This option only applies to connections to Oracle 10g R2 and higher database servers.
Valid Values
string
where:
string
Notes
• You can also specify this information using the Oracle DBMS_SESSION.SETIDENTIFIER procedure or the
DBMS_APPLICATION_INFO.SET_CLIENT_INFO procedure.
• This connection option can affect performance.
Default
None
GUI Tab
Client Monitoring tab
See also
Performance Considerations on page 367
Client User
Attribute
ClientUser (CU)
Purpose
The user ID to be stored in the database. This value sets the OSUSER value in the V$SESSION table on the
server. This value is used by the client information feature.
Valid Values
-1 | string
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 319
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
string
Behavior
When set to -1, the driver uses the userid of the user that is currently logged onto the client.
If a value for this option is not specified, the driver uses name of the user that is currently logged into the OS.
Notes
• This connection option can affect performance.
Default
None
GUI Tab
Client Monitoring tab
See also
Performance Considerations on page 367
Connection Pooling
Attribute
Pooling (POOL)
Purpose
Specifies whether to use the driver’s connection pooling.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses connection pooling.
If set to 0 (Disabled), the driver does not use connection pooling.
Notes
• The application must be thread-enabled to use connection pooling.
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Pooling tab
320 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
See also
Performance Considerations on page 367
Connection Reset
Attribute
ConnectionReset (CR)
Purpose
Determines whether the state of connections that are removed from the connection pool for reuse by the
application is reset to the initial configuration of the connection.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the state of connections removed from the connection pool for reuse by an application is
reset to the initial configuration of the connection. Resetting the state can negatively impact performance
because additional commands must be sent over the network to the server to reset the state of the connection.
If set to 0 (Disabled), the state of connections is not reset.
Notes
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Pooling tab
See also
Performance Considerations on page 367
Attribute
ConnectionRetryCount (CRC)
Purpose
The number of times the driver retries connection attempts to the primary database server, and if specified,
alternate servers until a successful connection is established.
This option and the Connection Retry Delay connection option, which specifies the wait interval between
attempts, can be used in conjunction with failover.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 321
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Valid Values
0|x
where:
Behavior
If set to 0, the driver does not try to connect after the initial unsuccessful attempt.
If set to x, the driver retries connection attempts the specified number of times. If a connection is not established
during the retry attempts, the driver returns an error that is generated by the last server to which it tried to
connect.
Default
0
GUI Tab
Failover tab
Attribute
ConnectionRetryDelay (CRD)
Purpose
Specifies the number of seconds the driver waits between connection retry attempts when Connection Retry
Count is set to a positive integer.
This option and the Connection Retry Count connection option can be used in conjunction with failover.
Valid Values
0|x
where
Behavior
If set to 0, there is no delay between retries.
If set to x, the driver waits the specified number of seconds between connection retry attempts.
Default
3
322 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
GUI Tab
Failover tab
Attribute
CryptoProtocolVersion (CPV)
Purpose
Specifies a comma-separated list of the cryptographic protocols to use when SSL is enabled using the Encryption
Method connection option (EncryptionMethod=1). When multiple protocols are specified, the driver uses the
highest version supported by the server. If none of the specified protocols are supported by the database
server, the connection fails and the driver returns an error.
Valid Values
cryptographic_protocol [[, cryptographic_protocol ]...]
where:
cryptographic_protocol
Caution: Good security practices recommend using TLSv1 or higher, due to known vulnerabilities in the SSLv2
and SSLv3 protocols.
Example
If your security environment is configured to use TLSv1.2 and TLSv1.1, specify the following values:
CryptoProtocolVersion=TLSv1.2, TLSv1.1
Default
TLSv1.2,TLSv1.1,TLSv1
GUI Tab
Security tab
CryptoLibName
Attribute
CryptoLibName (CLN)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 323
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
The absolute path for the OpenSSL library file containing the cryptographic library to be used by the data source
or connection when TLS/SSL is enabled. The cryptograpic library contains the implementations of cryptographic
algorithms the driver uses for data encryption.
This option allows you to designate a different cryptographic library if you encounter issues with the default
version or want to use a library that you provide. Common issues that require designating a different library
include security vulnerabilities with specific libraries or compatibility issues with your server or application.
Valid Values
absolute_path\openssl_filename
where:
absolute_path
openssl_filename
is the name of the OpenSSL library file containing the cryptographic library to be used by your data
source or connection.
Example
C:\Program Files\Progress\DataDirect\Connect64_for_ODBC_71\
Drivers\OpenSSL\1.0.0r\ddssl27.dll;
Notes
• The OpenSSL library files provided by Progress combine the cryptographic and TLS/SSL libraries into a
single file; therefore, when your drivers are using a Progress library file, the values specified for the
CryptoLibName and SSLLibName options should be the same. For non-Progress library files, the libraries
may use separate files, which would require unique values to be specified.
• This option can be used to designate OpenSSL libraries not installed by the product; however, the drivers
are only certified against libraries provided by Progress.
Default
Empty string
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
CryptoLibName=C:\Program Files\Progress\DataDirect\
Connect64_for_ODBC_71\Drivers\OpenSSL\1.0.0r\ddssl27.dll;
See Advanced tab for details.
See also
SSLLibName on page 360
324 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Attribute
DataIntegrityLevel (DIL)
Purpose
Specifies a preference for the data integrity to be used on data sent between the driver and the database
server. The connection fails if the database server does not have a compatible integrity algorithm. See Oracle
Advanced Security on page 375 for more information.
Valid Values
Rejected | Accepted | Requested | Required
Behavior
If set to 0 - Rejected, a data integrity check on data sent between the driver and the database server is refused.
The connection fails if the database server specifies REQUIRED.
If set to 1 - Accepted, a data integrity check can be made on data sent between the driver and the database
server. Data integrity is used if the database server requests or requires it.
If set to 2 - Requested, the driver enables a data integrity check on data sent between the driver and the
database server if the database server permits it.
If set to 3 - Required, a data integrity check must be performed on data sent between the driver and the database
server. The connection fails if the database server specifies REJECTED.
Notes
• Consult your database administrator concerning the data integrity settings of your Oracle server.
• This connection option can affect performance.
Default
0 - Rejected
GUI Tab
Advanced Security tab
See also
Performance Considerations on page 367
Attribute
DataIntegrityTypes (DIT)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 325
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
Determines the method the driver uses to protect against attacks that intercept and modify data being transmitted
between the client and server. You can enable data integrity protection without enabling encryption. See Oracle
Advanced Security on page 375 for more information.
Valid Values
MD5 | SHA1 | SHA1,MD5
If set to MD5, the driver uses the Message Digest 5 (MD5) algorithm.
If set to SHA1, the driver uses the Secure Hash Algorithm (SHA-1).
If multiple values are specified and Oracle Advanced Security data integrity is enabled using the Data Integrity
Level option, the database server determines which algorithm is used based on how it is configured.
Notes
• This option has no effect if Data Integrity Level on page 325 is set to 0 - Rejected.
• Consult your database administrator concerning the data integrity settings of your Oracle server.
• This connection option can affect performance.
Default
SHA1,MD5
GUI Tab
Advanced Security tab
See also
Performance Considerations on page 367
Attribute
DataSourceName (DSN)
Description
Specifies the name of a data source in your Windows Registry or odbc.ini file.
Valid Values
string
where:
string
Default
None
326 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
GUI Tab
General tab
Attribute
DefaultLongDataBuffLen (DLDBL)
Purpose
The maximum length of data (in KB) the driver can fetch from long columns in a single round trip and the
maximum length of data that the driver can send using the SQL_DATA_AT_EXEC parameter.
Valid Values
An integer in multiples of 1024
The value must be in multiples of 1024 (for example, 1024, 2048). You need to increase the default value if
the total size of any Long data exceeds 1 MB. This value is multiplied by 1024 to determine the total maximum
length of fetched data. For example, if you enter a value of 2048, the maximum length of data would be 1024
x 2048, or 2097152 (2 MB).
Notes
• This connection option can affect performance.
Default
1024
GUI Tab
Advanced tab
See also
Performance Considerations on page 367
Describe at Prepare
Attribute
DescribeAtPrepare (DAP)
Purpose
Determines whether the driver describes the SQL statement at prepare time.
This connection option can affect performance.
Valid Values
0|1
If set to 1 (Enabled), the driver describes the SQL statement at prepare time.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 327
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
If set to 0 (Disabled), the driver does not describe the SQL statement at prepare time.
Notes
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Advanced tab
See also
Performance Considerations on page 367
Description
Attribute
Description (n/a)
Purpose
Specifies an optional long description of a data source. This description is not used as a runtime connection
attribute, but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Edition Name
Attribute
EditionName (EN)
328 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Purpose
The name of the Oracle edition the driver uses when establishing a connection. Oracle 11g R2 and higher
allows your database administrator to create multiple editions of schema objects so that your application can
still use those objects while the database is being upgraded. This option is only valid for Oracle 11g R2 and
higher databases and tells the driver which edition of the schema objects to use.
The driver uses the default edition in the following cases:
• When the specified edition is not a valid edition. The driver generates a warning indicating that it was unable
to set the current edition to the specified edition.
• When the value for this option is not specified or is set to an empty string.
If failover is enabled using the Failover Mode connection option and a connection fails over to another database
server, the driver connects to the alternate server using the same edition that was used for the failed connection.
The driver does not track changes to the current edition made using the ALTER SESSION SQL statement.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Attribute
EnableBulkLoad (EBL)
Purpose
Specifies the bulk load method.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses the database bulk load protocol when an application executes an INSERT
with multiple rows of parameter data. If the protocol cannot be used, the driver returns a warning.
If set to 0 (Disabled), the driver uses standard parameter arrays.
Default
0 (Disabled)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 329
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
GUI Tab
Bulk Tab
See Also
DataDirect Bulk Load on page 376
Attribute
EnableNcharSupport (ENS)
Purpose
Determines whether the driver provides support for the N-types NCHAR, NVARCHAR2, and NCLOB. These
types are described as SQL_WCHAR, SQL_WVARCHAR, and SQL_WLONGVARCHAR, and are returned
as supported by SQLGetTypeInfo. In addition, the "normal" char types (char, varchar2, long, clob) are described
as SQL_CHAR, SQL_VARCHAR, and SQL_LONGVARCHAR regardless of the character set on the Oracle
server.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver provides support for the N-types NCHAR, NVARCHAR2, and NCLOB.
If set to 0 (Disabled), the driver does not provide support for the N-types NCHAR, NVARCHAR2, and NCLOB.
Notes
• Valid only on Oracle 9i and higher.
Default
0 (Disabled)
See also
See Unicode Support on page 373 for details.
GUI Tab
Advanced tab
Attribute
EnableScrollableCursors (ESC)
Purpose
Determines whether scrollable cursors, both Keyset and Static, are enabled for the data source.
330 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Valid Values
0|1
Behavior
If set to 1 (Enabled), scrollable cursors are enabled for the data source.
If set to 0 (Disabled), scrollable cursors are not enabled.
Notes
• This connection option can affect performance.
Default
1 (Enabled)
GUI Tab
Performance tab
See also
Performance Considerations on page 367
Attribute
EnableServerResultCache (ESRC)
Purpose
Determines whether the driver sets the RESULT_CACHE_MODE session parameter to FORCE.
This option only applies to connections to Oracle 11g or higher database servers that support server-side result
set caching.
This connection option can affect performance.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver sets the RESULT_CACHE_MODE session parameter to FORCE.
If set to 0 (Disabled), the driver does not sets the RESULT_CACHE_MODE session parameter.
Notes
• This connection option can affect performance.
Default
0 (Disabled)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 331
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
GUI Tab
Advanced tab
See also
Performance Considerations on page 367
Enable SQLDescribeParam
Attribute
EnableDescribeParam (EDP)
Purpose
Determines whether the driver supports the SQLDescribeParam function, which allows an application to describe
parameters in SQL statements and in stored procedure calls.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver supports SQLDescribeParam. If using Microsoft Remote Data Objects (RDO)
to access data, you must use this value.
If set to 0 (Disabled), the driver does not support SQLDescribeParam and returns the error: unimplemented
function.
Default
0 (Disabled)
GUI Tab
Advanced tab
Attribute
EnableStaticCursorsForLongData (ESCLD)
Purpose
Determines whether the driver supports Long columns when using a static cursor. Enabling this option causes
a performance penalty at the time of execution when reading Long data.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver supports Long columns when using a static cursor.
If set to 0 (Disabled), the driver does not support Long columns when using a static cursor.
332 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Notes
• You must enable this option if you want to persist a result set that contains Long data into an XML data file.
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Performance tab
See also
Performance Considerations on page 367
Attribute
EnableTimestampwithTimezone (ETWT)
Purpose
Determines whether the driver exposes timestamps with timezones to the application.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver exposes timestamps with timezones to the application. The driver issues an
ALTER SESSION at connection time to modify NLS_TIMESTAMP_TZ_FORMAT.
NLS_TIMESTAMP_TZ_FORMAT is changed to the ODBC definition of a timestamp literal with the addition of
the timezone literal: 'YYYY-MM-DD HH24:MI:SSXFF TZR'.
If set to 0 (Disabled), timestamps with timezones are not exposed to the application.
Default
0 (Disabled)
GUI Tab
Advanced tab
Encryption Level
Attribute
EncryptionLevel (EL)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 333
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
Specifies a preference on whether to use encryption on data being sent between the driver and the database
server.
Valid Values
Rejected | Accepted | Requested | Required
Behavior
If set to 0 - Rejected, or if no match is found between the driver and server encryption types, data sent between
the driver and the database server is not encrypted or decrypted. The connection fails if the database server
specifies REQUIRED.
If set to 1 - Accepted, encryption is used on data sent between the driver and the database server if the database
server requests or requires it.
If set to 2 - Requested, data sent between the driver and the database server is encrypted and decrypted if
the database server permits it.
If set to 3 - Required, data sent between the driver and the database server must be encrypted and decrypted.
The connection fails if the database server specifies REJECTED.
Notes
• Consult your database administrator concerning the data encryption settings of your Oracle server.
• This connection option can affect performance.
Default
0 - Rejected
GUI Tab
Advanced Security tab
See also
Performance Considerations on page 367
Encryption Method
Attribute
EncryptionMethod (EM)
Purpose
The method the driver uses to encrypt data sent between the driver and the database server. If the specified
encryption method is not supported by the database server, the connection fails and the driver returns an error.
Valid Values
0|1|3|4|5
Behavior
If set to 0 (No Encryption), data is not encrypted.
334 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
If set to 1 (SSL), data is encrypted using the SSL protocols specified in the Crypto Protocol Version connection
option.
If set to 3 (SSL3), the driver uses SSL3 data encryption.
If set to 4 (SSL2), the driver uses SSL2 data encryption.
If set to 5 (TLS1), the driver uses TLS1 data encryption.
Notes
• Consult your database administrator concerning the SSL settings of your Oracle server.
• This connection option can affect performance.
Default
0 (No Encryption)
GUI Tab
Security tab
See also
Crypto Protocol Version on page 323
Performance Considerations on page 367
Encryption Types
Attribute
EncryptionTypes (ET)
Purpose
Specifies a comma-separated list of the encryption algorithms to use if Oracle Advanced Security encryption
is enabled using the Encryption Level connection property.
Valid Values
encryption_algorithm [[, encryption_algorithm ]...]
where:
encryption_algorithm
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 335
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Example
Your security environments specifies that you can use RC4 with a 256-bit key size, AES with a 192-bit key
size, or two-key Triple-DES with an effective key size of 112-bit. Use the following values:
EncryptionTypes=RC4_256,AES192,3DES112
Notes
• This option is ignored if Encryption Level is set to 0 - Rejected.
• Consult your database administrator concerning the data encryption settings of your Oracle server.
• This connection option can affect performance.
Default
On the GUI tab: all check boxes are selected.
In the connection string: no encryption methods are specified. The driver sends a list of all of the encryption
methods to the Oracle server.
GUI Tab
Advanced Security tab
See also
Performance Considerations on page 367
Failover Granularity
Attribute
FailoverGranularity (FG)
Purpose
Determines whether the driver fails the entire failover process or continues with the process if errors occur
while trying to reestablish a lost connection.
336 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
This option applies only when Failover Mode is set to 1 (Extended Connection) or 2 (Select).
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
Valid Values
0|1|2|3
Behavior
If set to 0 (Non-Atomic), the driver continues with the failover process and posts any errors on the statement
on which they occur.
If set to 1 (Atomic) the driver fails the entire failover process if an error is generated as the result of anything
other than executing and repositioning a Select statement. If an error is generated as a result of repositioning
a result set to the last row position, the driver continues with the failover process, but generates a warning that
the Select statement must be reissued.
If set to 2 (Atomic Including Repositioning), the driver fails the entire failover process if any error is generated
as the result of restoring the state of the connection or the state of work in progress.
If set to 3 (Disable Integrity Check), the driver does not verify that the rows that were restored during the failover
process match the original rows. This value applies only when Failover Mode is set to 2 (Select).
Default
0 (Non-Atomic)
GUI Tab
Failover tab
Failover Mode
Attribute
FailoverMode (FM)
Purpose
Specifies the type of failover method the driver uses.
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
Valid Values
0|1|2
Behavior
If set to 0 (Connection), the driver provides failover protection for new connections only.
If set to 1 (Extended Connection), the driver provides failover protection for new and lost connections, but not
any work in progress.
If set to 2 (Select), the driver provides failover protection for new and lost connections. In addition, it preserves
the state of work performed by the last Select statement executed.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 337
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Default
0 (Connection)
GUI Tab
Failover tab
Failover Preconnect
Attribute
FailoverPreconnect (FP)
Description
Specifies whether the driver tries to connect to the primary and an alternate server at the same time.
This attribute applies only when Failover Mode is set to 1 (Extended Connection) or 2 (Select) and at least one
alternate server is specified.
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
Valid Values
0|1
Behavior
If set to 0 (Disabled), the driver tries to connect to an alternate server only when failover is caused by an
unsuccessful connection attempt or a lost connection. This value provides the best performance, but your
application typically experiences a short wait while the failover connection is attempted.
If set to 1 (Enabled), the driver tries to connect to the primary and an alternate server at the same time. This
can be useful if your application is time-sensitive and cannot absorb the wait for the failover connection to
succeed.
Default
0 (Disabled)
GUI Tab
Failover tab
Attribute
FetchTSWTZasTimestamp (FTSWTZAT)
Purpose
Determines whether the driver returns column values with the timestamp with time zone data type as the ODBC
data type SQL_TYPE_TIMESTAMP or SQL_VARCHAR.
Valid on Oracle 10g R2 or higher.
338 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver returns column values with the timestamp with time zone data type as the ODBC
type SQL_TYPE_TIMESTAMP. The time zone information in the fetched value is truncated. Use this value if
your application needs to process values the same way as TIMESTAMP columns.
If set to 0 (Disabled), the driver returns column values with the timestamp with time zone data type as the
ODBC data type SQL_VARCHAR. Use this value if your application requires the time zone information in the
fetched value.
Default
0 (Disabled)
GUI Tab
Advanced tab
Field Delimiter
Attribute
BulkLoadFieldDelimiter (BLFD)
Purpose
Specifies the character that the driver will use to delimit the field entries in a bulk load data file.
Valid Values
x
where:
For simplicity, avoid using a value that can be in the data, including all alphanumeric characters, the dash(-),
the colon(:), the period (.), the forward slash (/), the space character, the single quote (') and the double quote
("). You can use some of these characters as delimiters if all of the data in the file is contained within double
quotes.
Notes
• The Bulk Load Field Delimiter character must be different from the Bulk Load Record Delimiter.
Default
None
GUI Tab
Bulk tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 339
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Attribute
GSSClient (GSSC)
Purpose
The name of the GSS client library that the driver uses to communicate with the Key Distribution Center (KDC).
The driver uses the path defined by the PATH environment variable for loading the specified client library.
Valid Values
native | client_library
where:
client_library is a GSS client library installed on the client.
Behavior
If set to client_library, the driver uses the specified GSS client library.
If set to native, the driver uses the GSS client shipped with the operating system.
Default
native
GUI Tab
Security tab
Host
Attribute
HostName (HOST)
Purpose
The name or the IP address of the server to which you want to connect.
Valid Values
server_name | IP_address
where:
server_name
IP_address
340 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
The IP address can be specified in either IPv4 or IPv6 format, or a combination of the two. See Using IP
Addresses on page 67 for details about these formats.
Notes
• This option is mutually exclusive with the Server Name and TNSNames File options.
Default
None
GUI Tab
General tab
Attribute
HostNameInCertificate (HNIC)
Purpose
A host name for certificate validation when SSL encryption is enabled (Encryption Method=1) and validation
is enabled (Validate Server Certificate=1). This option provides additional security against man-in-the-middle
(MITM) attacks by ensuring that the server the driver is connecting to is the server that was requested.
Valid Values
host_name | #SERVERNAME#
where
host_name
is the host name specified in the certificate. Consult your SSL administrator for the correct value.
Behavior
If set to a host name, the driver examines the subjectAltName values included in the certificate. If a dnsName
value is present in the subjectAltName values, then the driver compares the value specified for Host Name In
Certificate with the dnsName value. The connection succeeds if the values match. The connection fails if the
Host Name In Certificate value does not match the dnsName value.
If no subjectAltName values exist or a dnsName value is not in the list of subjectAltName values, then the
driver compares the value specified for Host Name In Certificate with the commonName part of the Subject
name in the certificate. The commonName typically contains the host name of the machine for which the
certificate was created. The connection succeeds if the values match. The connection fails if the Host Name
In Certificate value does not match the commonName. If multiple commonName parts exist in the Subject
name of the certificate, the connection succeeds if the Host Name In Certificate value matches any of the
commonName parts.
If set to #SERVERNAME#, the driver compares the host server name specified as part of a data source or
connection string to the dnsName or the commonName value.
Default
None
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 341
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
GUI Tab
Security tab
IANAAppCodePage
Attribute
IANAAppCodePage (IACP)
Purpose
An Internet Assigned Numbers Authority (IANA) value. You must specify a value for this option if your application
is not Unicode-enabled or if your database character set is not Unicode. The value you specify must match
the database character encoding and the system locale.
The driver uses the specified IANA code page to convert "W" (wide) functions to ANSI.
The driver and Driver Manager both check for the value of IANAAppCodePage in the following order:
• In the connection string
• In the Data Source section of the system information file (odbc.ini)
• In the ODBC section of the system information file (odbc.ini)
If the driver does not find an IANAAppCodePage value, the driver uses the default value of 4 (ISO 8859-1
Latin-1).
Valid Values
IANA_code_page
where:
IANA_code_page
is one of the valid values listed in "IANAAppCodePage values" in the Progress DataDirect for ODBC
Drivers Reference. The value must match the database character encoding and the system locale.
Notes
Refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers Reference
for details.
Default
4 (ISO 8559-1 Latin-1)
GUI Tab
Advanced tab
Initialization String
Attribute
InitializationString (IS)
342 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Purpose
A SQL command that is issued immediately after connecting to the database to manage session settings.
Valid Values
SQL_command
where:
SQL_command
Example
To set the date format on every connection, specify:
Initialization String=ALTER SESSION SET DATE_FORMAT = 'DD/MM/YYYY'
Notes
• If the statement fails to execute, the connection fails and the driver reports the error returned from the server.
Default
None
GUI Tab
Advanced tab
Key Password
Attribute
KeyPassword (KP)
Purpose
The password used to access the individual keys in the keystore file when SSL is enabled (Encryption Method=1)
and SSL client authentication is enabled on the database server. Keys stored in a keystore can be individually
password-protected. To extract the key from the keystore, the driver must have the password of the key.
Valid Values
key_password
where:
key_password
Default
None
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 343
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
GUI Tab
Security tab
Key Store
Attribute
Keystore (KS)
Purpose
The name of the directory containing the keystore file to be used when SSL is enabled (Encryption Method=1)
and SSL client authentication is enabled on the database server. The keystore file contains the certificates that
the client sends to the server in response to the server’s certificate request. If you do not specify a directory,
the current directory is used.
Valid Values
keystore_directory
where:
keystore_directory
Notes
• The keystore and truststore files can be the same file.
Default
None
GUI Tab
Security tab
Attribute
KeystorePassword (KSP)
Purpose
The password used to access the keystore file when SSL is enabled (Encryption Method=1) and SSL client
authentication is enabled on the database server. The keystore file contains the certificates that the client sends
to the server in response to the server’s certificate request.
Valid Values
keystore_password
where:
344 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
keystore_password
Notes
• The keystore and truststore files may be the same file; therefore, they may have the same password.
Default
None
GUI Tab
Security tab
Attribute
LoadBalanceTimeout (LBT)
Purpose
Specifies the number of seconds to keep inactive connections open in a connection pool. An inactive connection
is a database session that is not associated with an ODBC connection handle, that is, a connection in the pool
that is not in use by an application.
Valid Values
0|x
where:
Behavior
If set to 0, inactive connections are kept open.
If set to x, inactive connections are closed after the specified number of seconds passes.
Notes
• The Min Pool Size option may cause some connections to ignore this value.
Default
0
GUI Tab
Pooling tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 345
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Load Balancing
Attribute
LoadBalancing (LB)
Purpose
Determines whether the driver uses client load balancing in its attempts to connect to the database servers
(primary and alternate). You can specify one or multiple alternate servers by setting the Alternate Servers
option.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses client load balancing and attempts to connect to the database servers
(primary and alternate servers) in random order.
If set to 0 (Disabled), the driver does not use client load balancing and connects to each server based on their
sequential order (primary server first, then, alternate servers in the order they are specified).
Default
0 (Disabled)
GUI Tab
Failover tab
Attribute
LocalTimezoneOffset (LTZO)
Purpose
A value to alter local time zone information. The default is "" (empty string), which means that the driver
determines local time zone information from the operating system. If it is not available from the operating
system, the driver defaults to using the setting on the Oracle server.
Valid Values
Valid values are specified as offsets from GMT as follows: (–)HH:MM. For example, -08:00 equals GMT
minus 8 hours.
The driver uses the value of this option to issue an ALTER SESSION for local time zone at connection time.
Default
"" (empty string)
346 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
GUI Tab
Advanced tab
Lock Timeout
Attribute
LockTimeout (LTO)
Purpose
Specifies the amount of time, in seconds, the Oracle server waits for a lock to be released before generating
an error when processing a Select...For Update statement on an Oracle 9i or higher server.
This connection option can affect performance.
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, the server waits indefinitely for the lock to be released.
If set to 0, the server generates an error immediately and does not wait for the lock to time out.
If set to x, the server waits for the specified number of seconds for the lock to be released.
Notes
• If you are connected to an Oracle 8i server, any value greater than 0 is equivalent to the value -1.
• This connection option can affect performance.
Default
-1
GUI Tab
Performance tab
See also
Performance Considerations on page 367
Login Timeout
Attribute
LoginTimeout (LT)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 347
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
The number of seconds the driver waits for a connection to be established before returning control to the
application and generating a timeout error. To override the value that is set by this connection option for an
individual connection, set a different value in the SQL_ATTR_LOGIN_TIMEOUT connection attribute using
the SQLSetConnectAttr() function.
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, the connection request does not time out. The driver silently ignores the
SQL_ATTR_LOGIN_TIMEOUT attribute.
If set to 0, the connection request does not time out, but the driver responds to the SQL_ATTR_LOGIN_TIMEOUT
attribute.
If set to x, the connection request times out after the specified number of seconds unless the application
overrides this setting with the SQL_ATTR_LOGIN_TIMEOUT attribute.
Default
15
GUI Tab
Advanced tab
Attribute
MaxPoolSize (MXPS)
Purpose
The maximum number of connections allowed within a single connection pool. When the maximum number of
connections is reached, no additional connections can be created in the connection pool.
Valid Values
An integer from 1 to 65535
Notes
• This connection option can affect performance.
Example
If set to 20, the maximum number of connections allowed in the pool is 20.
348 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Default
100
GUI Tab
Pooling tab
See also
Performance Considerations on page 367
Attribute
MinPoolSize (MNPS)
Purpose
The minimum number of connections that are opened and placed in a connection pool, in addition to the active
connection, when the pool is created. The connection pool retains this number of connections, even when
some connections exceed their Load Balance Timeout value.
Valid Values
0|x
where:
Behavior
If set to 0, no connections are opened in addition to the current existing connection.
If set to x, the start-up number of connections in the pool is 5 in addition to the current existing connection.
Notes
• This connection option can affect performance.
Example
If set to 5, the start-up number of connections in the pool is 5 in addition to the current existing connection.
Default
0
GUI Tab
Pooling tab
See also
Performance Considerations on page 367
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 349
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Module
Attribute
Module (MOD)
Purpose
Provides additional information about the client to be stored in the database. This value sets the
CLIENT_IDENTIFIER value in the V$SESSION table on the server. This value is used by the client information
feature.
This option only applies to connections to Oracle 10g R2 and higher database servers.
Valid Values
string
where:
string
Notes
• If a value is not specified for this option, the driver uses the PROGRAM value in the V$SESSION table.
• You can also specify this information using the Oracle DBMS_SESSION.SETIDENTIFIER procedure or the
DBMS_APPLICATION_INFO.SET_CLIENT_INFO procedure.
• This connection option can affect performance.
Default
None
GUI Tab
Client Monitoring tab
See also
Performance Considerations on page 367
Password
Attribute
Password (PWD)
Purpose
The password that the application uses to connect to your database. The Password option cannot be specified
through the driver Setup dialog box and should not be stored in a data source. It is specified through the Logon
dialog box or a connection string.
350 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Valid Values
pwd
where:
pwd
is a valid password.
Default
None
GUI Tab
n/a
Port Number
Attribute
PortNumber (PORT)
Description
The port number of the server listener.
Valid Values
port_name
where:
port_name
is the port number of the server listener. Check with your database administrator for the correct
number.
Notes
• This option is mutually exclusive with the Server Name and TNSNames File options.
Default
None
GUI Tab
General tab
PRNGSeedFile
Attribute
PRNGSeedFile (PSF)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 351
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
Specifies the absolute path for the entropy-source file or device used as a seed for SSL key
generation.
Valid Values
string | RANDFILE
where:
string
is the absolute path for the entropy-source file or device that seeds the random number generator
used for TLS/SSL key generation.
Behavior
If set to string, the specified entropy-source file or device seeds the random number generator used for
TLS/SSL key generation. Entropy levels and behavior may vary for different files and devices. See the following
section for a list of commonly used entropy sources and their behavior.
If set to RANDFILE, the RAND_file_name() function in your application generates a default path for the
random seed file. The seed file is $RANDFILE if that environment variable is set; otherwise, it is $HOME/.rnd.
If $HOME is not set either, an error occurs.
/dev/random
is a pseudorandom number generator (blocking) that creates a seed from random bits of environmental
noise it collects in an entropy pool. When there is insufficient noise in the pool, the file blocks calls
until enough noise is collected. This provides more secure SSL key generation, but at the expense
of blocked calls.
/dev/urandom
is a pseudorandom number generator (non-blocking) that creates seeds from random bits from
environmental noise it collects in an entropy pool. When there is insufficient noise in the pool, the
file reuses bits from the pool instead of blocking calls. This eliminates potential delays associated
with blocked calls, but may result in less secure TLS/SSL key generation.
/dev/hwrng
is a hardware random number generator. The behavior is dependent on the device used in your
environment.
352 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Notes
• This option is ignored when TLS/SSL is disabled (EncryptionMethod=0) or the seed source is set to Poll
Only (PRNGSeedSource=1).
• For processes that employ multiple TLS/SSL-enabled drivers, the behavior of this option for all drivers is
determined by the values specified for the driver that first connects to the process and loads the OpenSSL
library. Since the OpenSSL library loads only once per process, the values specified for drivers that
subsequently connect are ignored. To ensure that the correct security settings are used, we recommend
configuring this option identically for all drivers used in a process.
Default
/dev/random
GUI tab
NA
See also
PRNGSeedSource on page 353
PRNGSeedSource
Attribute
PRNGSeedSource (PSS)
Purpose
Specifies the source of the seed the driver uses for TLS/SSL key generation. Seeds are a
pseudorandom or random value used to set the initial state of the random number generator used to generate
TLS/SSL keys. Using seeds with a higher level of entropy, or randomness, provides a more secure transmission
of data encrypted using TLS/SSL.
Valid Values
0|1
Behavior
If set to 0 (File), the driver uses entropy-source file or device specified in the PRNGSeedFile connection option
as the seed used for TLS/SSL key generation.
If set to 1 (Poll Only) , the driver uses the RAND_poll function in TLS/SSL to create the seed used for TLS/SSL
key generation.
Notes
• For processes that employ multiple TLS/SSL-enabled drivers, the behavior of this option for all drivers is
determined by the values specified for the driver that first connects to the process and loads the OpenSSL
library. Since the OpenSSL library loads only once per process, the values specified for drivers that
subsequently connect are ignored. To ensure that the correct security settings are used, we recommend
configuring this option identically for all drivers used in a process.
• This option is ignored when TLS/SSL is disabled (EncryptionMethod=0)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 353
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Default
0 (File)
GUI Tab
NA
See also
PRNGSeedFile on page 351
Attribute
ProcedureRetResults (PRR)
Purpose
Determines whether the driver returns result sets from stored procedures/functions.
See Support of Materialized Views on page 377 for details.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver returns result sets from stored procedures/functions. When set to 1 and you
execute a stored procedure that does not return result sets, you will incur a small performance penalty.
If set to 0 (Disabled), the driver does not return result sets from stored procedures.
Notes
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Advanced tab
See also
Performance Considerations on page 367
Program ID
Attribute
ProgramID (PID)
354 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Purpose
The product and version information of the driver on the client to be stored in the database. This value sets
the PROCESS value in the V$SESSION table on the server. This value is used by the client information feature.
Valid Values
string
where:
string
is a value that identifies the product and version of the driver on the client.
If a value for this option is not specified, the driver uses the process ID of the session.
Notes
• This connection option can affect performance.
Default
None
GUI Tab
Client Monitoring tab
See also
Performance Considerations on page 367
Query Timeout
Attribute
QueryTimeout (QT)
Description
The number of seconds for the default query timeout for all statements that are created by a connection. To
override the value set by this connection option for an individual statement, set a different value in the
SQL_ATTR_QUERY_TIMEOUT statement attribute on the SQLSetStmtAttr() function.
Valid Values
where:
is a number of seconds.
Behavior
If set to -1, the query does not time out. The driver silently ignores the SQL_ATTR_QUERY_TIMEOUT attribute.
If set to 0, the query does not time out, but the driver responds to the SQL_ATTR_QUERY_TIMEOUT attribute.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 355
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
If set to x, all queries time out after the specified number of seconds unless the application overrides this value
by setting the SQL_ATTR_QUERY_TIMEOUT attribute.
Default
0
GUI Tab
Advanced tab
Record Delimiter
Attribute
BulkLoadRecordDelimiter (BLRD)
Purpose
Specifies the character that the driver will use to delimit the record entries in a bulk load data file.
Valid Values
x
where:
For simplicity, avoid using a value that can be in the data, including all alphanumeric characters, the dash(-),
the colon(:), the period (.), the forward slash (/), the space character, the single quote (') and the double quote
("). You can use some of these characters as delimiters if all of the data in the file is contained within double
quotes.
Notes
• The Bulk Load Record Delimiter character must be different from the Bulk Load Field Delimiter.
None
GUI Tab
Bulk tab
Attribute
ReportCodepageConversionErrors (RCCE)
Purpose
Specifies how the driver handles code page conversion errors that occur when a character cannot be converted
from one character set to another.
356 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
An error message or warning can occur if an ODBC call causes a conversion error, or if an error occurs during
code page conversions to and from the database or to and from the application. The error or warning generated
is Code page conversion error encountered. In the case of parameter data conversion errors, the
driver adds the following sentence: Error in parameter x, where x is the parameter number. The standard
rules for returning specific row and column errors for bulk operations apply.
Valid Values
0|1|2
Behavior
If set to 0 (Ignore Errors), the driver substitutes 0x1A for each character that cannot be converted and does
not return a warning or error.
If set to 1 (Return Error), the driver returns an error instead of substituting 0x1A for unconverted characters.
If set to 2 (Return Warning), the driver substitutes 0x1A for each character that cannot be converted and returns
a warning.
Default
0 (Ignore Errors)
GUI Tab
Advanced tab
Attribute
ReportRecycleBin (RRB)
Purpose
Determines whether support is provided for reporting objects that are in the Oracle Recycle Bin.
On Oracle 10g R1 and higher, when a table is dropped, it is not actually removed from the database, but placed
in the recycle bin instead.
Valid Values
0|1
Behavior
If set to 1 (Enabled), support is provided for reporting objects that are in the Oracle Recycle Bin.
If set to 0 (Disabled), the driver does not return tables contained in the recycle bin in the result sets returned
from SQLTables and SQLColumns. Functionally, this means that the driver filters out any results whose Table
name begins with BIN$.
Default
0 (Disabled)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 357
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
GUI Tab
Advanced tab
Server Name
Attribute
ServerName (SRVR)
Purpose
Specifies a net service name that exists in the TNSNAMES.ORA file. The corresponding net service name
entry in the TNSNAMES.ORA file is used to obtain Host, Port Number, and Service Name or SID information.
Valid Values
server_name
where:
server_name
Notes
• This option is mutually exclusive with the Host, Port Number, SID, and Service Name options.
Default
None
GUI Tab
General tab
Attribute
ServerType (ST)
Purpose
Determines whether the connection is established using a shared or dedicated server process (dedicated
thread on Windows).
Valid Values
0|1|2
Behavior
If set to 0 (Server Default), the driver uses the default server process set on the server.
358 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
If set to 1 (Shared), the server process used is retrieved from a pool. The socket connection between the
application and server is made to a dispatcher process on the server. This setting allows there to be fewer
processes than the number of connections, reducing the need for server resources. Use this value when a
server must handle a large number of connections.
If set to 2 (Dedicated), a server process is created to service only that connection. When that connection ends,
so does the process (UNIX and Linux) or thread (Windows). The socket connection is made directly between
the application and the dedicated server process or thread. When connecting to UNIX and Linux servers, a
dedicated server process can provide significant performance improvement, but uses more resources on the
server. When connecting to Windows servers, the server resource penalty is insignificant. Use this value if you
have a batch environment with a low number of connections.
Notes
• The server must be configured for shared connections (the SHARED_SERVERS initialization parameter
on the server has a value greater than 0) for the driver to be able to specify the shared server process type.
• This connection option can affect performance.
Default
0 (Server Default)
GUI Tab
Advanced tab
See also
Performance Considerations on page 367
Service Name
Attribute
ServiceName (SN)
Purpose
The Oracle service name that specifies the database used for the connection. The service name is a string
that is the global database name—a name that is comprised of the database name and domain name, for
example:
sales.us.acme.com
The service name is included as part of the Oracle connect descriptor, which is a description of the destination
for a network connection. The service name is specified in the CONNECT_DATA parameter of the connect
descriptor, for example:
(CONNECT_DATA=(SERVICE_NAME=sales.us.acme.com))
In this example, you would specify sales.us.acme.com as the value for the Service Name connection option.
Valid Values
service_name
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 359
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
service_name
Notes
• This option is mutually exclusive with the SID, Server Name, and TNSNames File options.
Default
None
GUI Tab
General tab
SID
Attribute
SID (SID)
Purpose
The Oracle System Identifier that refers to the instance of Oracle running on the server.
Valid Values
sid
where:
sid
Notes
• This option is mutually exclusive with the Service Name, Server Name, and TNSNames File options.
Default
None
GUI Tab
General tab
SSLLibName
Attribute
SSLLibName (SLN)
360 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Purpose
The absolute path for the OpenSSL library file containing the TLS/SSL library to be used by the data source
or connection when TLS/SSL is enabled. The SSL library contains the implementations of TLS/SSL protocols
the driver uses for data encryption.
This option allows you to designate a different SSL library if you encounter issues with the default version or
want to use a library that you provide. Common issues that require designating a different library include security
vulnerabilities with specific libraries or compatibility issues with your server or application.
Valid Values
absolute_path\openssl_filename
where:
absolute_path
openssl_filename
is the name of the OpenSSL library file containing the TLS/SSL Library to be used by your data
source or connection.
Example
C:\Program Files\Progress\DataDirect\Connect64_for_ODBC_71\
Drivers\OpenSSL\1.0.0r\ddssl27.dll; (64-bit Windows)
Notes
• The OpenSSL library files provided by Progress combine the cryptographic and TLS/SSL libraries into a
single file; therefore, when your drivers are using a Progress library file, the values specified for the
CryptoLibName and SSLLibName options should be the same. For non-Progress library files, the libraries
may use separate files, which would require unique values to be specified.
• This option can be used to designate OpenSSL libraries not installed by the product; however, the drivers
are only certified against libraries provided by Progress.
Default
No default value
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
SSLLibName=C:\Program Files\Progress\DataDirect\
Connect64_for_ODBC_71\drivers\OpenSSL\1.0.0r\ddssl27.dll;
See Advanced tab for details.
See also
CryptoLibName on page 323
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 361
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Attribute
KeepAlive (KA)
Purpose
Specifies whether the driver enables TCPKeepAlive. TCPKeepAlive maintains idle TCP connections by
periodically passing packets between the client and server. If either the client or server does not respond to a
packet, the connection is considered inactive and is terminated. In addition, TCPKeepAlive prevents valid idle
connections from being disconnected by firewalls and proxies by maintaining network activity.
Valid Values
0|1
Behavior
If set to 0 (Disabled), the driver does not enable TCPKeepAlive.
If set to 1 (Enabled), the driver enables TCPKeepAlive.
Default
0 (Disabled)
GUI Tab
Advanced tab
Attribute
TimestampEscapeMapping (TEM)
Purpose
Determines how the driver maps Date, Time, and Timestamp literals.
Valid Values
0|1
Behavior
If set to 0 (Oracle Version Specific), the driver determines whether to use the TO_DATE or TO_TIMESTAMP
function based on the version of the Oracle server to which it is connected. If the driver is connected to an 8.x
server, it maps the Date, Time, and Timestamp literals to the TO_DATE function. If the driver is connected to
a 9.x or higher server, it maps these escapes to the TO_TIMESTAMP function.
If set to 1 (Oracle 8x Compatible), the driver always uses the Oracle 8.x TO_DATE function as if connected to
an Oracle 8.x server.
362 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Default
0 (Oracle Version Specific)
GUI Tab
Advanced tab
TNSNames File
Attribute
TNSNamesFile (TNF)
Purpose
Specifies the name of the TNSNAMES.ORA file. In a TNSNAMES.ORA file, connection information for Oracle
services is associated with an Oracle net service name. The entry in the TNSNAMES.ORA file specifies Host,
Port Number, and Service Name or SID.
TNSNames File is ignored if no value is specified in the Server Name option. If the Server Name option is
specified but the TNSNames File option is left blank, the TNS_ADMIN environment setting is used for the
TNSNAMES.ORA file path. If there is no TNS_ADMIN setting, the ORACLE_HOME environment setting is
used. On Windows, if ORACLE_HOME is not set, the path is taken from the Oracle section of the Registry.
Using an Oracle TNSNAMES.ORA file to centralize connection information in your Oracle environment simplifies
maintenance when changes occur. If, however, the TNSNAMES.ORA file is unavailable, then it is useful to be
able to open a backup version of the TNSNAMES.ORA file (TNSNames file failover). You can specify one or
more backup, or alternate, TNSNAMES.ORA files.
Valid Values
path_filename
where:
path_filename
is the entire path, including the file name, to the TNSNAMES.ORA file.
Behavior
To specify multiple TNSNAMES.ORA file locations, separate the names with a comma and enclose the locations
in parentheses (you do not need parentheses for a single entry). For example:
(F:\server2\oracle\tnsnames.ora, C:\oracle\product\10.1\db_1\network\admin\tnsnames.ora)
The driver tries to open the first file in the list. If that file is not available, then it tries to open the second file in
the list, and so on.
Connection Retry Count on page 321 and Connection Retry Delay on page 322 are also valid with TNSNames
failover. The driver makes at least one attempt to open the files, and, if Connection Retry Count is enabled,
more than one. If Connection Retry Delay is enabled, the driver waits the specified number of seconds between
attempts. Load Balancing is not available for TNSNames failover.
Notes
• This option is mutually exclusive with the Host, Port Number, SID, and Service Name options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 363
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Default
None
GUI Tab
General tab
Truststore
Attribute
Truststore (TS)
Purpose
The directory that contains the truststore file and the truststore file name to be used when SSL is enabled
(Encryption Method=1) and server authentication is used. The truststore file contains a list of the valid Certificate
Authorities (CAs) that are trusted by the client machine for SSL server authentication. If you do not specify a
directory, the current directory is used.
Valid Values
truststore_directory \ filename
where:
truststore_directory
filename
Notes
• The truststore and keystore files may be the same file.
Default
None
GUI Tab
Security tab
Truststore Password
TruststorePassword (TSP)
Purpose
Specifies the password that is used to access the truststore file when SSL is enabled (Encryption Method=1)
and server authentication is used. The truststore file contains a list of the Certificate Authorities (CAs) that the
client trusts.
364 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Valid Values
truststore_password
where:
truststore_password
Notes
• The truststore and keystore files may be the same file; therefore, they may have the same password.
Default
None
GUI Tab
Security tab
Attribute
UseCurrentSchema (UCS)
Description
Determines whether the driver returns only procedures owned by the current user when executing
SQLProcedures.
Valid Values
0|1
Behavior
When set to 1 (Enabled), the call for SQLProcedures is optimized, but only procedures owned by the user are
returned.
When set to 0 (Disabled), the driver does not specify only the current user.
Default
1 (Enabled)
GUI Tab
Performance tab
See also
Performance Considerations on page 367
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 365
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
User Name
Attribute
LogonID (UID)
Description
The default user ID that is used to connect to your database. Your ODBC application may override this value
or you may override it in the logon dialog box or connection string.
You can also use OS Authentication to connect to your Oracle database. See OS Authentication on page 376
for details.
Valid Values
userid
where:
userid
Default
None
GUI Tab
Security tab
Attribute
ValidateServerCertificate (VSC)
Purpose
Determines whether the driver validates the certificate that is sent by the database server when SSL encryption
is enabled (Encryption Method=1). When using SSL server authentication, any certificate sent by the server
must be issued by a trusted Certificate Authority (CA). Allowing the driver to trust any certificate returned from
the server even if the issuer is not a trusted CA is useful in test environments because it eliminates the need
to specify truststore information on each client in the test environment.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver validates the certificate that is sent by the database server. Any certificate from
the server must be issued by a trusted CA in the truststore file. If the Host Name In Certificate option is specified,
the driver also validates the certificate using a host name. The Host Name In Certificate option provides
additional security against man-in-the-middle (MITM) attacks by ensuring that the server the driver is connecting
to is the server that was requested.
366 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
If set to 0 (Disabled), the driver does not validate the certificate that is sent by the database server. The driver
ignores any truststore information specified by the Trust Store and Trust Store Password options.
Notes
• Truststore information is specified using the TrustStore and TrustStorePassword options.
Default
1 (Enabled)
GUI Tab
Security tab
Attribute
WireProtocolMode (WPM)
Description
Specifies whether the driver optimizes network traffic to the Oracle server.
Valid Values
1|2
Behavior
If set to 1, the driver does not optimize network traffic to the Oracle server.
If set to 2, the driver optimizes network traffic to the Oracle server for result sets that contain repeating data in
some or all of the columns, and the repeating data is in consecutive rows. It also optimizes network traffic if
the application is updating or inserting images, pictures, or long text or binary data.
Notes
• This connection option can affect performance.
Default
2
GUI Tab
Performance tab
See Also
See Performance Considerations on page 367 for details.
Performance Considerations
The following connection options can enhance driver performance.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 367
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Note: If you are using a multi-threaded application, you must enable the Application Using Threads option.
Array Size (ArraySize): If this connection string attribute is set appropriately, the driver can improve performance
of your application by reducing the number of round trips on the network. For example, if your application
normally retrieves 200 rows, it is more efficient for the driver to retrieve 200 rows at one time over the network
than to retrieve 50 rows at a time during four round trips over the network.
Cached Cursor Limit (CachedCursorLimit): To improve performance when your application executes
concurrent Select statements, Cursor Identifiers can be cached. In this case, the Cursor Identifier is retrieved
from a cache rather than being created for each connection. When an Identifier is needed, the driver takes one
from its cache, if one is available, rather than creating a new one. Cached Cursor Identifiers are closed when
the connection is closed. To cache Cursor Identifiers, the CachedCursorLimit attribute must be set to the
appropriate number of concurrent open Select statements.
Cached Description Limit (CachedDescLimit): The driver can cache descriptions of Select statements and
improve the performance of your ODBC application; therefore, if your application issues a fixed set of SQL
queries throughout the life of the application, the description of the query should be cached. If a description is
not cached, the description must be retrieved from the server, which reduces performance. The descriptions
include the number of columns and the data type, length, and scale for each column. The matching is done by
an exact-text match through the From clause. If the statement contains a Union or a subquery, the driver cannot
cache the description.
Catalog Functions Include Synonyms (CatalogIncludesSynonyms): Standard ODBC behavior is to include
synonyms in the result set of calls to the following catalog functions: SQLProcedures, SQLStatistics and
SQLProcedureColumns. Retrieving this synonym information degrades performance. If your ODBC application
does not need to return synonyms when using these catalog functions, the driver can improve performance if
the CatalogIncludesSynonyms attribute is disabled (set to 0).
Catalog Options (CatalogOptions): If your application does not need to access the comments/remarks for
database tables, performance of your application can be improved. In this case, the CatalogOptions attribute
should be disabled (set to 0) because retrieving comments/remarks degrades performance. If this attribute is
enabled (set to 1), result column REMARKS (for the catalog functions SQLTables and SQLColumns) and the
result column COLUMN_DEF (for the catalog function SQLColumns) return actual values.
Client Information: The client information feature automatically adjusts server resources, such as CPU and
memory, based on the service class associated with a workload. Therefore, an application’s performance is
tied to the workload to which it is assigned and, ultimately, to the service class associated with that workload.
The Oracle Wire Protocol driver allows your application to set client information in the Oracle database that
can be used by the client information feature to classify work. If you know that your database environment can
use client information, coordinate with your database administrator to determine how setting the following
options affects performance.
• Accounting Info (AccountingInfo): Sets the CLIENT_INFO value of the V$SESSION table on the server.
• Action (Action): Sets ACTION column of the V$SESSION table on the server.
• Application Name (ApplicationName): Sets the dbms_session value in the database and the PROGRAM
value of the V$SESSION table on the server.
• Client Host Name (ClientHostName): Sets the MACHINE value in the V$SESSION table on the server.
• Client ID (ClientID): Sets the CLIENT_IDENTIFIER value in the V$SESSION table on the server.
• Client User (ClientUser): Sets the OSUSER value in the V$SESSION table on the server.
368 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
• Module (Module): Sets the CLIENT_IDENTIFIER value in the V$SESSION table on the server.
• Program ID (ProgramID): Sets the PROCESS value in the V$SESSION table on the server.
Connection Pooling (Pooling): If you enable the driver to use connection pooling, you can set additional
options that affect performance:
• Load Balance Timeout (LoadBalanceTimeout): You can define how long to keep connections in the pool.
The time that a connection was last used is compared to the current time and, if the timespan exceeds the
value of the Load Balance Timeout option, the connection is destroyed. The Min Pool Size option can cause
some connections to ignore this value.
• Connection Reset (ConnectionReset): Resetting a re-used connection to the initial configuration settings
impacts performance negatively because the connection must issue additional commands to the server.
• Max Pool Size (MaxPoolSize): Setting the maximum number of connections that the pool can contain too
low might cause delays while waiting for a connection to become available. Setting the number too high
wastes resources.
• Min Pool Size (MinPoolSize): A connection pool is created when the first connection with a unique
connection string connects to the database. The pool is populated with connections up to the minimum pool
size, if one has been specified. The connection pool retains this number of connections, even when some
connections exceed their Load Balance Timeout value.
Data Integrity Level (DataIntegrityLevel) and Data Integrity Types (DataIntegrityTypes): Checking data
integrity may adversely reduce performance because of the additional overhead (mainly CPU usage) that is
required to perform the check.
Default Buffer Size for Long/LOB Columns (DefaultLongDataBuffLen): To improve performance when
your application fetches images, pictures, or long text or binary data, a buffer size can be set to accommodate
the maximum size of the data. The buffer size should only be large enough to accommodate the maximum
amount of data retrieved; otherwise, performance is reduced by transferring large amounts of data into an
oversized buffer. If your application retrieves more than 1 MB of data, the buffer size should be increased
accordingly.
Describe At Prepare (DescribeAtPrepare): When enabled, this option requires extra network traffic. If your
application does not require result set information at prepare time (for instance, you request information about
the result set using SQLColAttribute(s), SQLDescribeCol, SQLNumResultCols, and so forth, before calling
SQLExecute on a prepared statement), you can increase performance by disabling this option.
Enable Bulk Load (EnableBulkLoad): If your application performs bulk loading of data, you can improve
performance by configuring the driver to use the database system's bulk load functionality instead of database
array binding. The trade-off to consider for improved performance is that using the bulk load functionality can
bypass data integrity constraints.
EnableServerResultCache (EnableServerResultCache): If your application connects to Oracle 11g and
executes the same query multiple times, you can improve performance by using the Oracle feature server-side
resultset caching. When enabled, Oracle stores the result set in database memory. On subsequent executions
of the same query, the result set is returned from database memory if the underlying tables have not been
modified. Without result set caching, the server would process the query and formulate a new result set.
Enable Scrollable Cursors (EnableScrollableCursors) and Enable Static Cursors for Long Data
(EnableStaticCursorsForLongData): When your application uses Static or Keyset (Scrollable) cursors, the
EnableScrollableCursors attribute must be enabled (set to 1). Also, if your application retrieves images, pictures,
long text or binary data while using Static cursors, the EnableStaticCursorsForLongData attribute must be
enabled (set to 1). However, this can degrade performance when retrieving long data with Static cursors as
the entire result set is stored on the client. To improve performance, you might consider designing your application
to retrieve long data through forward-only cursors.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 369
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Some applications may benefit by not waiting indefinitely and continuing execution; this keeps the application
from hanging. The application, however, needs to handle lock timeouts properly with an appropriate timeout
value; otherwise, processing time could be wasted handling lock timeouts, and deadlocks could go undetected.
To improve performance, either enter a number of seconds or enter 0 as the value for this option.
Procedure Returns Results (ProcedureRetResults): The driver can be tuned for improved performance if
your application's stored procedures do not return results. In this case, the ProcedureRetResults attribute
should be disabled (set to 0).
Server Process Type (ServerType): When using a dedicated server connection, a server process on UNIX
(a thread on Windows) is created to serve only your application connection. When you disconnect, the process
goes away. The socket connection is made directly between your application and this dedicated server process.
This can provide tremendous performance improvements, but will use significantly more resources on UNIX
servers. Because this is a thread on Oracle servers running on Windows platforms, the additional resource
usage on the server is significantly less. This option should be set to 2 (dedicated) when you have a batch
environment with lower numbers of connections, your Oracle server has excess processing capacity and
memory available when at maximum load, or if you have a performance-sensitive application that would be
degraded by sharing Oracle resources with other applications.
Use Current Schema for Catalog Functions (UseCurrentSchema): If your application needs to access
database objects owned only by the current user, then performance can be improved. In this case, the Use
Current Schema for Catalog Functions option must be enabled. When this option is enabled, the driver returns
only database objects owned by the current user when executing catalog functions. Calls to catalog functions
are optimized by grouping queries. Enabling this option is equivalent to passing the Logon ID used on the
connection as the SchemaName argument to the catalog functions.
Data Types
The following table shows how the Oracle data types are mapped to the standard ODBC data types. Unicode
Support on page 373 lists Oracle to Unicode data type mappings.
370 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Oracle ODBC
15
BFILE SQL_LONGVARBINARY
16
BINARY DOUBLE SQL_REAL
16
BINARY FLOAT SQL_DOUBLE
16, 17
BLOB SQL_LONGVARBINARY
18
CHAR SQL_CHAR
16, 17, 19
CLOB SQL_LONGVARCHAR
DATE SQL_TYPE_TIMESTAMP
20
LONG SQL_LONGVARCHAR
NUMBER SQL_DOUBLE
RAW SQL_VARBINARY
22
TIMESTAMP SQL_TIMESTAMP
22, 23
TIMESTAMP WITH LOCAL TIMEZONE SQL_TIMESTAMP
22, 23
TIMESTAMP WITH TIMEZONE SQL_VARCHAR
15
Read-Only
16
Supported only on Oracle 10g and higher.
17
Supported in basic file and SecureFiles storage.
18
If the database character set is set to UTF-8, the Oracle driver maps the CHAR data type to SQL_WCHAR.
19
If the database character set is set to UTF-8, the Oracle driver maps the CLOB data type to SQL_WLONGVARCHAR.
20
If the database character set is set to UTF-8, the Oracle driver maps the LONG data type to SQL_WLONGVARCHAR.
21
Supported only when the EnableNcharSupport connection option is enabled.
22
Supported only on Oracle 9i and higher.
23
Timestamp with timezone mapping changes based on the setting of the Fetch TSWTZ as Timestamp option only on Oracle 10g
R2 and higher.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 371
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Oracle ODBC
24
VARCHAR2 SQL_VARCHAR
25
XMLType SQL_LONGVARCHAR
The Oracle Wire Protocol driver does not support any object types (also known as abstract data types). When
the driver encounters an object type during data retrieval, it returns an Unknown Data Type error (SQL State
HY000).
See Retrieving Data Type Information on page 72 for more information about data types.
XMLType
The driver supports tables containing columns whose data type is specified as XMLType, except those with
binary or object relational storage.
When inserting or updating XMLType columns, the data to be inserted or updated must be in the form of an
XMLType data type. The database provides functions to construct XMLType data. The xmlData argument to
xmltype( ) may be specified as a string literal.
Examples
If the XMLType column is created with the CLOB storage type, then the driver returns it without use of the
special getClobVal function, that is, you can use:
instead of
SELECT XML_col.getClobVal()...
The next example illustrates how to create a table, insert data, and retrieve data when not using the CLOB
storage type:
CREATE TABLE PURCHASEORDER (PODOCUMENT sys.XMLTYPE);
24
If the database character set is set to UTF-8, the Oracle driver maps the VARCHAR2 data type to SQL_WVARCHAR.
25
XMLType columns with binary or object relational storage are not supported.
372 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Unicode Support
The Oracle Wire Protocol driver automatically determines whether the Oracle database is a Unicode database.
If the database character set is set to UTF-8, the Oracle driver maps the Oracle data types to Unicode data
types as shown in the following table:
CHAR SQL_WCHAR
CLOB SQL_WLONGVARCHAR
VARCHAR2 SQL_WVARCHAR
LONG SQL_WLONGVARCHAR
The driver also continues to map these Oracle data types to the normal character data types. See Data Types
on page 370 for these mappings. The only exception to this is that when the Enable N-CHAR Support option is
enabled, the N-CHAR types are mapped to the Unicode types SQL_WCHAR, SQL_WVARCHAR, and
SQL_WLONGVARCHAR, and the normal character types are mapped to the data types SQL_CHAR,
SQL_LONGVARCHAR, and SQL_VARCHAR, regardless of the character set on the Oracle server.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 373
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Advanced Features
The driver supports the following advanced features:
• Failover
• Client Information
• Security
• Connection Pooling
• DataDirect Bulk Load
Failover
The driver supports failover and its related connection options. Failover connection options are located on the
Failover tab of the driver Setup dialog box. See Using Failover on page 78 for a general description of failover
and its implementation.
Client Information
Oracle provides a client information feature that allows an administrator to define different work load
classifications and store client information associated with a connection. These workload classifications can
be assigned different priorities and resource allocations. To enable applications to leverage these work load
classifications fully, the Oracle Wire Protocol driver provides connection options for setting the session properties
that are used in identifying a work load. These options are located on the Client Monitoring tab of the driver
Setup dialog box. See Using Client Information on page 87 for a general description of client information and
its implementation.
Security
The driver supports authentication in addition to encryption and data integrity checks. Security connection
options are located on the Security tab and Advanced Security tab of the driver Setup dialog box. See Using
Security on page 89 for a general description of security and its implementation. The following security
information is specific to the Oracle Wire Protocol Driver.
Authentication
If you are using Kerberos, verify that your environment meets the requirements listed in the following table
before you configure the driver for Kerberos authentication.
374 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Table 27: Kerberos Authentication Requirements for the Oracle Wire Protocol Driver
Component Requirements
Database server The database server must be administered by the same domain controller that administers
26
the client and must be running one of the following databases :
Kerberos server The Kerberos server is the machine where the user IDs for authentication are
administered. The Kerberos server is also the location of the Kerberos KDC. Network
authentication must be provided by one of the following methods:
Client The client must be administered by the same domain controller that administers the
database server.
• In a data modification attack, an unauthorized party intercepts transmitted data, alters it, and retransmits it.
For example, suppose a customer order for 5 widgets for delivery to an office in San Francisco is intercepted.
A data modification attack might change the quantity to 500 and the delivery address to a warehouse in Los
Angeles, and then retransmit the order.
• In a replay attack, a set of valid data is retransmitted a number of times. For example, an order for 100
widgets is intercepted and then retransmitted ten times so the final order quantity equals 1,000 widgets.
Because data integrity protection operates independently from the encryption process, you can enable data
integrity with or without enabling encryption.
Connection Pooling
The driver supports connection pooling and its related connection options. Connection pooling connection
options are located on the Pooling tab of the driver Setup dialog box. See Using DataDirect Connection Pooling
on page 97 for a general description of connection pooling and its implementation.
26
See the readme for the latest information, including support for Kerberos on Oracle 12c.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 375
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Limitations
• A bulk operation is not allowed in a manual transaction if it is not the first event.
• Once a bulk operation is started, any non-bulk operation is disallowed until the transaction is committed.
• Because of Oracle limitations, issuing a SELECT statement to determine a row count may return different
results before and after a bulk load operation.
MTS Support
On Windows, the driver can take advantage of Microsoft Transaction Server (MTS) capabilities, specifically,
the Distributed Transaction Coordinator (DTC) using the XA Protocol. For a general discussion of MTS and
DTC, refer to the help file of the Microsoft Transaction Server SDK.
Note: The DataDirect Connect for ODBC 32-bit drivers can operate in a 64-bit Windows environment; however,
they do not support DTC in this environment. Only the DataDirect Connect64 for ODBC 64-bit drivers support
DTC in a 64-bit Windows environment.
To enable DTC support, you must be connected to an Oracle 8.1.7 or higher server.
OS Authentication
On Windows, UNIX, and Linux, Oracle has a feature called OS Authentication that allows you to connect to an
Oracle database via the operating system user name and password. To connect, use a forward slash ( / ) for
the user name and leave the password blank. To configure the Oracle server, refer to the Oracle server
documentation. This feature is valid when connecting from a data source, a connection string, or a logon dialog
box.
376 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
Connection failover and client load balancing can be used in conjunction with an Oracle RAC system, but they
are not specifically part of Oracle RAC. The drivers can also use these two features on DB2, Informix,
SQL Server, and Sybase database systems. See Using Failover on page 78 for details about how these features
work in DataDirect Connect Series for ODBC drivers.
When executing the stored procedures with result sets, do not include the result set arguments (Oracle ref
cursors) in the list of procedure parameters. The result set returned through the ref cursor is returned as a
normal ODBC result set.
{call GEN_PROCEDURE1 (?)}
Unexpected Characters
Users are sometimes surprised when they insert a character into a database, only to have a different character
displayed when they fetch it from the database. There are many reasons this can happen, but it most often
involves code page issues, not driver errors.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 377
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Client and server machines in a database system each use code pages, which can be identified by a name or
a number, such as Shift_JIS (Japanese) or cp1252 (Windows English). A code page is a mapping that associates
a sequence of bits, called a code point, with a specific character. Code pages include the characters and
symbols of one or more languages. Regardless of geographical location, a machine can be configured to use
a specific code page. Most of the time, a client and database server would use similar, if not identical, code
pages. For example, a client and server might use two different Japanese code pages, such as Shift_JIS and
EUC_JP, but they would still share many Japanese characters in common. These characters might, however,
be represented by different code points in each code page. This introduces the need to convert between code
pages to maintain data integrity. In some cases, no one-to-one character correspondence exists between the
two code points. This causes a substitution character to be used, which can result in displaying an unexpected
character on a fetch.
When the driver on the client machine opens a connection with the database server, the driver determines the
code pages being used on the client and the server. This is determined from the Active Code Page on a
Windows-based machine. If the client machine is UNIX-based, the driver checks the IANAAppCodePage option.
If it does not find a specific setting for IACP, it defaults to a value of ISO_8859_1.
If the client and server code pages are compatible, the driver transmits data in the code page of the server.
Even though the pages are compatible, a one-to-one correspondence for every character may not exist. If the
client and server code pages are completely dissimilar, for example, Russian and Japanese, then many
substitutions occur because very few, if any, of the characters are mapped between the two code pages.
The following is a specific example of an unexpected character:
Check the returned hexadecimal values to verify whether the data you intended to reside in the table is there.
If it appears that Oracle substituted a different code point, then check the Oracle database code page to see
if your intended character exists. If your character does not exist in the code page, then no error is involved;
Oracle simply does not recognize the original character, and uses its substitution character instead.
Note: If you are persisting a result set that contains Long data, you must enable the
EnableStaticCursorsforLongData connection string attribute.
378 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Wire Protocol Driver
SQL Support
The driver supports the core SQL grammar.
• SQLColumnPrivileges
• SQLDescribeParam (if EnableDescribeParam=1)
• SQLForeignKeys
• SQLPrimaryKeys
• SQLProcedures
• SQLProcedureColumns
• SQLSetPos
• SQLTablePrivileges
Refer to "ODBC API and scalar functions" in the Progress DataDirect for ODBC Drivers Reference for a list of
supported API functions.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 379
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
• A bulk operation is not allowed in a manual transaction if it is not the first event.
• Bulk inserts into views are not allowed.
• Once a bulk operation is started, any non-bulk operation is disallowed until the transaction is committed.
• The Oracle Wire Protocol driver currently does not support the use of BLOB, CLOB, LONG, LONG RAW,
and XMLType data types when using bulk load for parameter array batch.
• Because of Oracle limitations, issuing a SELECT statement to determine a row count may return different
results before and after a bulk load operation.
• Oracle does not support literal values in a bulk load operation. You must use parameter markers for all
columns being loaded.
• INSERT INTO SELECT statements are not supported.
When designing an application for performance, using native parameter arrays for bulk inserts or updates, for
example, can improve performance.
Refer to "Designing ODBC applications for performance optimization" in the Progress DataDirect for ODBC
Drivers Reference for details.
Driver Requirements
The driver has no client requirements.
380 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
If you choose to use a connection string, you must use specific connection string attributes. See Using a
Connection String on page 389 and Connection Option Descriptions for PostgreSQL Wire Protocol on page 391
for an alphabetical list of driver connection string attributes and their initial default values.
On Windows, data sources are stored in the Windows Registry. You can configure and modify data sources
through the ODBC Administrator using a driver Setup dialog box, as described in this section.
On UNIX and Linux, data sources are stored in the odbc.ini file. On Linux, you can configure and
modify data sources through the Linux ODBC Administrator using a driver Setup dialog box, as described in
this section.
Note: This book shows dialog box images that are specific to Windows. If you are using the drivers in the
Linux environment, the dialog box that you see may differ slightly from the Windows version. Windows-only
and UNIX-only connection options are specifically noted by icons in the Setup dialog box descriptions.
When the driver is first installed, the values of its connection options are set by default. These values appear
on the driver Setup dialog box tabs when you create a new data source. You can change these default values
by modifying the data source. In the following procedure, the description of each tab is followed by a table that
lists the connection options for that tab and their initial default values. This table links you to a complete
description of the options and their connection string attribute equivalents. The connection string attributes are
used to override the default values of the data source if you want to change these values at connection time.
To configure a PostgreSQL data source:
• On Windows, start the ODBC Administrator by selecting its icon from the Progress DataDirect
program group.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 381
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
2. Select a tab:
• User DSN: If you are configuring an existing user data source, select the data source name and click
Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the driver
and click Finish to display the driver Setup dialog box.
• System DSN: If you are configuring an existing system data source, select the data source name
and click Configure to display the driver Setup dialog box.
If you are configuring a new system data source, click Add to display a list of installed drivers. Select
the driver and click Finish to display the driver Setup dialog box.
• File DSN: If you are configuring an existing file data source, select the data source file and click Configure
to display the driver Setup dialog box.
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select
a driver. Click Advancedif you want to specify attributes; otherwise, click Next to proceed. Specify a
name for the data source and click Next. Verify the data source information; then, click Finish to display
the driver Setup dialog box.
382 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
Note: The General tab displays only fields that are required for creating a data source. The fields on all
other tabs are optional, unless noted otherwise.
3. On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
4. Optionally, click the Advanced tab to specify additional data source settings.
Figure 32: Advanced tab
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 383
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Extended Options: Type a semi-colon separated list of connection options and their values. Use this
configuration option to set the value of undocumented connection options that are provided by Progress
DataDirect customer support. You can include any valid connection option in the Extended Options string,
for example:
Database=Server1;UndocumentedOption1=value[;UndocumentedOption2=value;]
384 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
If the Extended Options string contains option values that are also set in the setup dialog or data source,
the values of the options specified in the Extended Options string take precedence. However, connection
options that are specified on a connection string override any option value specified in the Extended Options
string.
Note: Do not specify the Extended Options configuration option in a connection string, or the driver will
return an error. Instead, applications should specify the individual undocumented connection options in the
connection string.
Translate : Click Translate to display the Select Translator dialog box, which lists the translators
specified in the ODBC Translators section of the Registry. Progress DataDirect provides a translator named
OEM to ANSI that translates your data from the IBM PC character set to the ANSI character set.
Select a translator; then, click OK to close this dialog box.
5. Optionally, click the Security tab to specify security data source settings.
Figure 33: Security tab
See Using Security on page 89 for a general description of encryption and its configuration requirements.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 385
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
386 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
6. Optionally, click the Failover tab to specify failover data source settings.
Figure 34: Failover tab
See Using Failover on page 78 for a general description of failover and its related connection options.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 387
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
7. Optionally, click. the Pooling tab to specify pooling data source settings.
Figure 35: Pooling tab
See Using DataDirect Connection Pooling on page 97 for a general description of connection pooling.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
8. At any point during the configuration process, you can click Test Connect to attempt to connect to the data
source using the connection options specified in the driver Setup dialog box. A logon dialog box appears
(see Using a Logon Dialog Box (PostgreSQL) on page 390 for details). Note that the information you enter
in the logon dialog box during a test connect is not saved.
• If the driver can connect, it releases the connection and displays a Connection Established message.
Click OK.
388 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message. Click OK.
Note: If you are configuring alternate servers for use with the connection failover feature, be aware that
the Test Connect button tests only the primary server, not the alternate servers.
9. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
DSN=data_source_name[;attribute=value[;attribute=value]...]
FILEDSN=filename.dsn[;attribute=value[;attribute=value]...]
The DSN-less connection string specifies a driver instead of a data source. All connection information must be
entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
Connection Option Descriptions for PostgreSQL Wire Protocol on page 391 lists the long and short names for
each attribute, as well as the initial default value when the driver is first installed. You can specify either long
or short names in the connection string.
An example of a DSN connection string with overriding attribute values for PostgreSQL Wire Protocol is:
DSN=Accounting;UID=JOHN;PWD=XYZZY
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 389
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
1. In the Host Name field, type either the name or the IP address of the server to which you want to connect.
The IP address can be specified in either IPv4 or IPv6 format, or a combination of the two. See Using IP
Addresses on page 67 for details concerning these formats.
2. In the Port Number field, type the number of your PostgreSQL listener. Check with your database
administrator for the correct number.
3. In the Database Name field, type the name of the database to which you want to connect.
4. If required, type your PostgreSQL user name.
5. If required, type your PostgreSQL password.
6. Click OK to log on to the PostgreSQL database installed on the server you specified and to update the
values in the Registry.
1. Navigate to the \tools\Power BI subdirectory of the Progress DataDirect installation directory; then,
locate the Power BI connector file DataDirectPostgreSQL.pqx, and the installation batch file
install.bat.
2. Run the install.bat file. The following operations are executed by running the install.batfile.
390 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
• Data Source: Enter a name for the data source. For example, PostgreSQL ODBC DSN.
• SQL Statement: If desired, provide a SQL command.
• Data Connectivity mode:
• Select Import to import data to Power BI.
• Select DirectQuery to query live data. (For details, including limitations, refer to the Microsoft Power
BI article Use DirectQuery in Power BI Desktop.)
6. Enter authentication information when prompted. Once connected, the Navigator window displays schema
and table information.
7. Select and load tables. Then, prepare your Power BI dashboard as desired.
Results:
You have successfully accessed your data and are now ready to create reports with Power BI. For more
information, refer to the Power BI product documentation at Power BI documentation.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 391
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
ConnectionRetryCount (CRC) 0
ConnectionRetryDelay (CRD) 3
392 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
LoadBalanceTimeout (LBT) 0
LoginTimeout (LT) 15
MinPoolSize (MNPS) 0
QueryTimeout (QT) 0
UnboundedNumericScale (UNS) 6
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 393
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
AllowedOpenSSLVersions
Attribute
AllowedOpenSSLVersions (AOV)
Purpose
Important: Version 1.0.2 of the OpenSSL library has reached the end of its product life cycle and is no longer
receiving security updates. Best security practices dictate that you use the latest version of the library.
Determines which version of the OpenSSL library file the driver uses for data encryption. Although the latest
version of the OpenSSL library is the most secure, some characteristics of the library can cause connections
to certain databases to fail. This option allows you to continue using older versions of the OpenSSL library
while you transition your environment to support the latest version.
Valid Values
latest | openssl_version_number[[,openssl_version_number]...]
where:
openssl_version_number
is the version number for the OpenSSL library file to be loaded by the driver, for example, 1.0.2.
When more than one version is specified, the driver will first attempt to load the first version listed.
If the driver is unable to locate and load this file, it will attempt to load the next version in the value.
The driver currently supports versions 1.1.1 and 1.0.2. Refer to the installed readme for latest
supported versions.
Behavior
If set to latest, the driver loads the latest installed version of the OpenSSL library file provided by Progress.
If set to openssl_version_number, the driver loads the specified version of the OpenSSL library file. This
value is used to specify a version other than the latest.
Notes
• This option is ignored if OpenSSL library files are specified using the CryptoLibName and SSLLibName
options.
• This option works only with OpenSSL library files provided by Progress and user supplied OpenSSL library
files that match Progress's naming convention and installation location.
• This option works only for installations using the default directory structure.
• Consult your database administrator concerning the security settings of your server.
Default
1.1.1,1.0.2
394 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
AllowedOpenSSLVersions=1.0.2
See also
Advanced tab
Alternate Servers
Attribute
AlternateServers (ASRV)
Purpose
A list of alternate database servers to which the driver tries to connect if the primary database server is
unavailable. Specifying a value for this option enables connection failover for the driver. The value you specify
must be in the form of a string that defines the physical location of each alternate server. All of the other required
connection information for each alternate server is the same as what is defined for the primary server connection.
Valid Values
(HostName=hostvalue:PortNumber=portvalue:Database=databasevalue[, . . .])
You must specify the host name, port number, and database name of each alternate server.
Example
The following Alternate Servers value defines two alternate database servers for connection failover:
AlternateServers=(HostName=PostgreSQLServer:
PortNumber=5431:Database=Pgredb1,
HostName=255.201.11.24:PortNumber=5432:Database=Pgredb2)
Notes
• An alternate server address in IPv6 format must be enclosed in double quotation marks.
Default
None
GUI Tab
Failover tab
Attribute
ApplicationUsingThreads (AUT)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 395
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
Determines whether the driver works with applications using multiple ODBC threads.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver works with single-threaded and multi-threaded applications.
If set to 0 (Disabled), the driver does not work with multi-threaded applications. If using the driver with
single-threaded applications, this value avoids additional processing required for ODBC thread-safety standards.
Default
1 (Enabled)
GUI Tab
Advanced tab
See also
Performance Considerations on page 431
Authentication Method
Attribute
AuthenticationMethod (AM)
Purpose
Specifies the method the driver uses to authenticate the user to the server when a connection is established.
If the specified authentication method is not supported by the database server, the connection fails and the
driver generates an error.
Important: When Kerberos is enabled, if the database user name differs from the domain user name, you are
required to pass the database user name via the User Name (LogonID) option in the datasource or connection
string.
Valid Values
0|4
Behavior
If set to 0 (No Encryption), the driver sends the user ID and password in clear text to the server for authentication.
If set to 4 (Kerberos Authentication), the driver uses Kerberos authentication. This method supports both
Windows Active Directory Kerberos and MIT Kerberos environments.
Default
0 (No Encryption)
396 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
GUI Tab
Security tab
Batch Mechanism
Attribute
BatchMechanism (BM)
Purpose
Determines the mechanism that is used to execute batch operations.
Valid Values
1|2|3
Behavior
If set to 1 (SingleRowInsert), the driver executes an insert statement for each row contained in a parameter
array. Specify this value if you are experiencing out-of-memory errors when performing batch inserts.
If set to 2 (MultiRowInsert), the driver attempts to execute a single insert statement for all the rows contained
in a parameter array. If the size of the insert statement exceeds the available buffer memory of the driver, the
driver executes multiple statements. Specify this value for substantial performance gains over 1 (SingleRowInsert)
when performing batch inserts.
If set to 3 (Copy), the driver uses the PostgreSQL COPY command to insert rows into the target table. Specify
this value for substantial performance gains over 1 (SingleRowInsert) when performing batch inserts.
Default
1 (SingleRowInsert)
Notes
• Batch Mechanism determines the mechanism used to perform batch inserts only. For update and delete
batch operations, the driver uses the native batch mechanism to handle the request.
• When BatchMechanism=3, substantial performance gains can be made. However, the following limitations
apply:
• Individual update counts are not returned. However, the total number of inserted rows are returned the
execution of a batch operation.
• The entire batch insert is ATOMIC. If any issues are encountered, the entire operation fails and no rows
are inserted.
GUI Tab
Advanced tab
See Also
See Performance Considerations on page 431 for details.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 397
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Connection Pooling
Attribute
Pooling (POOL)
Purpose
Specifies whether to use the driver’s connection pooling.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses connection pooling.
If set to 0 (Disabled), the driver does not use connection pooling.
Notes
• The application must be thread-enabled to use connection pooling.
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Pooling tab
See also
Performance Considerations on page 431
Connection Reset
Attribute
ConnectionReset (CR)
Purpose
Determines whether the state of connections that are removed from the connection pool for reuse by the
application is reset to the initial configuration of the connection.
Valid Values
0|1
398 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
Behavior
If set to 1 (Enabled), the state of connections removed from the connection pool for reuse by an application is
reset to the initial configuration of the connection. Resetting the state can negatively impact performance
because additional commands must be sent over the network to the server to reset the state of the connection.
If set to 0 (Disabled), the state of connections is not reset.
Notes
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Pooling tab
See also
Performance Considerations on page 431
Attribute
ConnectionRetryCount (CRC)
Purpose
The number of times the driver retries connection attempts to the primary database server, and if specified,
alternate servers until a successful connection is established.
This option and the Connection Retry Delay connection option, which specifies the wait interval between
attempts, can be used in conjunction with failover.
Valid Values
0|x
where:
Behavior
If set to 0, the driver does not try to connect after the initial unsuccessful attempt.
If set to x, the driver retries connection attempts the specified number of times. If a connection is not established
during the retry attempts, the driver returns an error that is generated by the last server to which it tried to
connect.
Default
0
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 399
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
GUI Tab
Failover tab
Attribute
ConnectionRetryDelay (CRD)
Purpose
Specifies the number of seconds the driver waits between connection retry attempts when Connection Retry
Count is set to a positive integer.
This option and the Connection Retry Count connection option can be used in conjunction with failover.
Valid Values
0|x
where
Behavior
If set to 0, there is no delay between retries.
If set to x, the driver waits the specified number of seconds between connection retry attempts.
Default
3
GUI Tab
Failover tab
Attribute
CryptoProtocolVersion (CPV)
Purpose
Specifies a comma-separated list of the cryptographic protocols to use when SSL is enabled using the Encryption
Method connection option (EncryptionMethod=1 | 6). When multiple protocols are specified, the driver uses
the highest version supported by the server. If none of the specified protocols are supported by the database
server, behavior is determined by the setting of the EncryptionMethod connection option.
Valid Values
cryptographic_protocol [[, cryptographic_protocol ]...]
400 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
where:
cryptographic_protocol
Caution: Good security practices recommend using TLSv1 or higher, due to known vulnerabilities in the SSLv2
and SSLv3 protocols.
Example
If your security environment is configured to use TLSv1.2 and TLSv1.1, specify the following values:
CryptoProtocolVersion=TLSv1.2, TLSv1.1
Notes
• This option is ignored if Encryption Method is set to 0 - No Encryption.
• Consult your database administrator concerning the data encryption settings of your server.
Default
TLSv1.2,TLSv1.1,TLSv1
GUI Tab
Security tab
See also
Encryption Method on page 405
CryptoLibName
Attribute
CryptoLibName (CLN)
Purpose
The absolute path for the OpenSSL library file containing the cryptographic library to be used by the data source
or connection when TLS/SSL is enabled. The cryptograpic library contains the implementations of cryptographic
algorithms the driver uses for data encryption.
This option allows you to designate a different cryptographic library if you encounter issues with the default
version or want to use a library that you provide. Common issues that require designating a different library
include security vulnerabilities with specific libraries or compatibility issues with your server or application.
Valid Values
absolute_path\openssl_filename
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 401
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
absolute_path
openssl_filename
is the name of the OpenSSL library file containing the cryptographic library to be used by your data
source or connection.
Example
C:\Program Files\Progress\DataDirect\Connect64_for_ODBC_71\
Drivers\OpenSSL\1.0.0r\ddssl27.dll; (64-bit Windows)
Notes
• The OpenSSL library files provided by Progress combine the cryptographic and TLS/SSL libraries into a
single file; therefore, when your drivers are using a Progress library file, the values specified for the
CryptoLibName and SSLLibName options should be the same. For non-Progress library files, the libraries
may use separate files, which would require unique values to be specified.
• This option can be used to designate OpenSSL libraries not installed by the product; however, the drivers
are only certified against libraries provided by Progress.
Default
Empty string
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
CryptoLibName=C:\Program Files\Progress\DataDirect\
Connect64_for_ODBC_71\Drivers\OpenSSL\1.0.0r\ddssl27.dll;
See Advanced tab for details.
See also
SSLLibName on page 424
Attribute
DataSourceName (DSN)
Description
Specifies the name of a data source in your Windows Registry or odbc.ini file.
Valid Values
string
where:
402 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
string
Default
None
GUI Tab
General tab
Database Name
Attribute
Database (DB)
Purpose
Specifies the name of the database to which you want to connect.
Valid Values
database_name
where
database_name
Default
None
GUI Tab
General tab
Description
Attribute
Description (n/a)
Purpose
Specifies an optional long description of a data source. This description is not used as a runtime connection
attribute, but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
Valid Values
string
where
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 403
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
string
Default
None
GUI Tab
General tab
Attribute
EnableKeysetCursors (EKC)
Purpose
Determines whether the driver emulates keyset cursors to provide scrollable keyset cursors to an ODBC
application.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver emulates keyset cursors.
If set to 0 (Disabled), the driver does not emulate keyset cursors. If an application requests a keyset cursor
and this option is set to 0, the driver uses a static cursor and returns a message that a different value was used.
Default
0 (Disabled)
GUI Tab
Advanced tab
Enable SQLDescribeParam
Attribute
EnableDescribeParam (EDP)
Purpose
Determines whether SQLDescribeParam returns the Datatype, ParameterSize, DecimalDigits, and Nullable
information for parameters in a prepared statement.
Valid Values
0|1
404 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
Behavior
If set to 1 (enabled), SQLDescribeParam returns the Datatype, ParameterSize, DecimalDigits, and Nullable
information for parameters in a prepared statement.
If set to 0 (disabled), the driver does not support SQLDescribeParam and returns the message: Driver does
not support this function.
Default
1 (Enabled)
GUI Tab
Advanced tab
Encryption Method
Attribute
EncryptionMethod (EM)
Purpose
The method the driver uses to encrypt data sent between the driver and the database server. It supports the
RequestSSL functionality. When RequestSSL is enabled, login requests and data are encrypted if the server
is configured for SSL. If the server is not configured for SSL, an unencrypted connection is established.
Valid Values
0|1|6
Behavior
If set to 0 (No Encryption), data is not encrypted.
If set to 1 (SSL), data is encrypted using the SSL protocols specified in the Crypto Protocol Version connection
option. If the specified encryption method is not supported by the database server, the connection fails and
the driver returns an error.
If set to 6 (RequestSSL), the login request and data are encrypted using SSL if the server is configured for
SSL. If the server is not configured for SSL, an unencrypted connection is established. The SSL protocol used
is determined by the setting of the Crypto Protocol Version connection option.
Notes
• For values 1 and 6, the SSL protocol used is determined by the setting of the Crypto Protocol Version
connection option.
• This connection option can affect performance.
Default
0 (No Encryption)
GUI Tab
Security tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 405
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
See also
Crypto Protocol Version on page 400
Performance Considerations on page 431
Attribute
ExtendedColumnMetaData (ECMD)
Purpose
Determines how the driver returns column metadata when using SQLDescribeCol and SQLColAttribute.
Valid Values
0|1
Behavior
If set to 1 (Enabled), SQLDescribeCol returns the actual values for Data Type, Column Size, Decimal Digits,
and Nullable. SQLColAttribute returns the actual values for:
• SQL_DESC_CATALOG_NAME: catalog_name
• SQL_DESC_TABLE_NAME: table_name
• SQL_DESC_BASE_COLUMN_NAME: base_column_name
• SQL_DESC_LOCAL_TYPE_NAME: local_type_name
• SQL_DESC_NULLABLE: nullable
• SQL_DESC_AUTO_UNIQUE_VALUE: auto_unique_value
If set to 0 (Disabled), SQLDescribeCol returns the Data Type, Column Size, and Decimal Digits for the column.
The value SQL_NULLABLE_UNKNOWN is returned for Nullable. SQLColAttribute returns the following attribute
values:
• SQL_DESC_CATALOG_NAME: empty string
• SQL_DESC_TABLE_NAME: empty string
• SQL_DESC_BASE_COLUMN_NAME: empty string
• SQL_DESC_LOCAL_TYPE_NAME: empty string
• SQL_DESC_NULLABLE: SQL_NULLABLE_UNKNOWN
• SQL_DESC_AUTO_UNIQUE_VALUE: SQL_FALSE
Default
0 (Disabled)
GUI Tab
Advanced tab
406 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
Failover Granularity
Attribute
FailoverGranularity (FG)
Purpose
Determines whether the driver fails the entire failover process or continues with the process if errors occur
while trying to reestablish a lost connection.
This option applies only when Failover Mode is set to 1 (Extended Connection) or 2 (Select).
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
Valid Values
0|1|2|3
Behavior
If set to 0 (Non-Atomic), the driver continues with the failover process and posts any errors on the statement
on which they occur.
If set to 1 (Atomic) the driver fails the entire failover process if an error is generated as the result of anything
other than executing and repositioning a Select statement. If an error is generated as a result of repositioning
a result set to the last row position, the driver continues with the failover process, but generates a warning that
the Select statement must be reissued.
If set to 2 (Atomic Including Repositioning), the driver fails the entire failover process if any error is generated
as the result of restoring the state of the connection or the state of work in progress.
If set to 3 (Disable Integrity Check), the driver does not verify that the rows that were restored during the failover
process match the original rows. This value applies only when Failover Mode is set to 2 (Select).
Default
0 (Non-Atomic)
GUI Tab
Failover tab
Failover Mode
Attribute
FailoverMode (FM)
Purpose
Specifies the type of failover method the driver uses.
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 407
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Valid Values
0|1|2
Behavior
If set to 0 (Connection), the driver provides failover protection for new connections only.
If set to 1 (Extended Connection), the driver provides failover protection for new and lost connections, but not
any work in progress.
If set to 2 (Select), the driver provides failover protection for new and lost connections. In addition, it preserves
the state of work performed by the last Select statement executed.
Default
0 (Connection)
GUI Tab
Failover tab
Failover Preconnect
Attribute
FailoverPreconnect (FP)
Purpose
Specifies whether the driver tries to connect to the primary and an alternate server at the same time.
This attribute applies only when Failover Mode is set to 1 (Extended Connection) or 2 (Select) and at least one
alternate server is specified.
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
Valid Values
0|1
Behavior
If set to 0 (Disabled), the driver tries to connect to an alternate server only when failover is caused by an
unsuccessful connection attempt or a lost connection. This value provides the best performance, but your
application typically experiences a short wait while the failover connection is attempted.
If set to 1 (Enabled), the driver tries to connect to the primary and an alternate server at the same time. This
can be useful if your application is time-sensitive and cannot absorb the wait for the failover connection to
succeed.
Default
0 (Disabled)
GUI Tab
Failover tab
408 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
Attribute
FetchRefCursors (FRC)
Purpose
Determines whether the driver returns refcursors from stored procedures as results sets.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver returns refcursors from stored procedures as result sets. The driver fetches all
the data from the refcursor and then closes the refcursor. If a stored procedure returns multiple refcursors, the
driver generates multiple result sets, one for each refcursor returned.
If set to 0 (Disabled), the driver returns the cursor name for refcursors. The application must fetch the actual
data from the refcursor using the cursor name and must close the cursor before additional processing can be
done on the statement. The application must close the cursor regardless of whether it actually fetches data
from the cursor.
Default
1 (Enabled)
GUI Tab
Advanced tab
Attribute
FetchTSWTZasTimestamp (FTSWTZAT)
Purpose
Determines whether the driver returns column values with the timestamp with time zone data type as the ODBC
data type SQL_TYPE_TIMESTAMP or SQL_VARCHAR.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver returns column values with the timestamp with time zone data type as the ODBC
type SQL_TYPE_TIMESTAMP. The time zone information in the fetched value is truncated. Use this value if
your application needs to process values the same way as TIMESTAMP columns.
If set to 0 (Disabled), the driver returns column values with the timestamp with time zone data type as the
ODBC data type SQL_VARCHAR. Use this value if your application requires the time zone information in the
fetched value.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 409
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Default
0 (Disabled)
GUI Tab
Advanced tab
Attribute
FetchTWFSasTime (FTWFSAT)
Purpose
Determines whether the driver returns column values with the time data type as the ODBC data type
SQL_TYPE_TIME or SQL_TYPE_TIMESTAMP.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver returns column values with the time data type as the ODBC data type
SQL_TYPE_TIME. The fractional seconds portion of the value is truncated.
If set to 0 (Disabled), the driver returns column values with the time data type as the ODBC data type
SQL_TYPE_TIMESTAMP. The fractional seconds portion of the value is preserved. Time columns are not
searchable when they are described and fetched as timestamp.
Notes
• When returning time with fractional seconds data as SQL_TYPE_TIMESTAMP, the Year, Month and Day
parts of the timestamp must be set to zero.
Default
0 (Disabled)
GUI Tab
Advanced tab
Attribute
GSSClient (GSSC)
Purpose
The name of the GSS client library that the driver uses to communicate with the Key Distribution Center (KDC).
The driver uses the path defined by the PATH environment variable for loading the specified client library.
410 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
Valid Values
native | client_library
where:
client_library
Behavior
If set to client_library, the driver uses the specified GSS client library.
Note: For MIT Kerberos distributions, you must provide a full path to the MIT Library. For example, the 64-bit
version for Windows would use the following value: C:\Program
Files\MIT\Kerberos\bin\gssapi64.dll.
If set to native, the driver uses the GSS client for Windows Kerberos. All other users must provide the full
path to the library name.
Default
native
GUI Tab
Security tab
Host Name
Attribute
HostName (HOST)
Purpose
The name or the IP address of the server to which you want to connect.
Valid Values
server_name | IP_address
where:
server_name
IP_address
The IP address can be specified in either IPv4 or IPv6 format. See Using IP Addresses on page 67 for details
about these formats.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 411
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Example
If your network supports named servers, you can specify a server name such as MainServer. Or, you can
specify an IP address such as 199.226.224.34..
Default
None
GUI Tab
General tab
Attribute
HostNameInCertificate (HNIC)
Purpose
A host name for certificate validation when SSL encryption is enabled (Encryption Method=1) and validation
is enabled (Validate Server Certificate=1). This option provides additional security against man-in-the-middle
(MITM) attacks by ensuring that the server the driver is connecting to is the server that was requested.
Valid Values
host_name | #SERVERNAME#
where:
host_name
is the host name specified in the certificate. Consult your SSL administrator for the correct value.
Behavior
If set to a host name, the driver examines the subjectAltName values included in the certificate. If a dnsName
value is present in the subjectAltName values, then the driver compares the value specified for Host Name In
Certificate with the dnsName value. The connection succeeds if the values match. The connection fails if the
Host Name In Certificate value does not match the dnsName value.
If no subjectAltName values exist or a dnsName value is not in the list of subjectAltName values, then the
driver compares the value specified for Host Name In Certificate with the commonName part of the Subject
name in the certificate. The commonName typically contains the host name of the machine for which the
certificate was created. The connection succeeds if the values match. The connection fails if the Host Name
In Certificate value does not match the commonName. If multiple commonName parts exist in the Subject
name of the certificate, the connection succeeds if the Host Name In Certificate value matches any of the
commonName parts.
If set to #SERVERNAME#, the driver compares the host server name specified as part of a data source or
connection string to the dnsName or the commonName value.
Default
None
412 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
GUI Tab
Security tab
IANAAppCodePage
Attribute
IANAAppCodePage (IACP)
Purpose
An Internet Assigned Numbers Authority (IANA) value. You must specify a value for this option if your application
is not Unicode-enabled or if your database character set is not Unicode. The value you specify must match
the database character encoding and the system locale.
The driver uses the specified IANA code page to convert "W" (wide) functions to ANSI.
The driver and Driver Manager both check for the value of IANAAppCodePage in the following order:
• In the connection string
• In the Data Source section of the system information file (odbc.ini)
• In the ODBC section of the system information file (odbc.ini)
If the driver does not find an IANAAppCodePage value, the driver uses the default value of 4 (ISO 8859-1
Latin-1).
Valid Values
IANA_code_page
where:
IANA_code_page
is one of the valid values listed in "IANAAppCodePage values" in the Progress DataDirect for ODBC
Drivers Reference. The value must match the database character encoding and the system locale.
Notes
Refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers Reference
for details.
Default
4 (ISO 8559-1 Latin-1)
GUI Tab
Advanced tab
Initialization String
Attribute
InitializationString (IS)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 413
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
A SQL command that is issued immediately after connecting to the database to manage session settings.
Valid Values
SQL_command
where:
SQL_command
Example
To set the date format on every connection, specify:
Set DateStyle='ISO, MDY'
Notes
• If the statement fails to execute, the connection fails and the driver reports the error returned from the server.
Default
None
GUI Tab
Advanced tab
Key Password
Attribute
KeyPassword (KP)
Purpose
The password used to access the individual keys in the keystore file when SSL is enabled (Encryption Method=1)
and SSL client authentication is enabled on the database server. Keys stored in a keystore can be individually
password-protected. To extract the key from the keystore, the driver must have the password of the key.
Valid Values
key_password
where:
key_password
Default
None
414 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
GUI Tab
Security tab
Key Store
Attribute
Keystore (KS)
Purpose
The name of the directory containing the keystore file to be used when SSL is enabled (Encryption Method=1)
and SSL client authentication is enabled on the database server. The keystore file contains the certificates that
the client sends to the server in response to the server’s certificate request. If you do not specify a directory,
the current directory is used.
Valid Values
keystore_directory
where:
keystore_directory
Notes
• The keystore and truststore files can be the same file.
Default
None
GUI Tab
Security tab
Attribute
KeystorePassword (KSP)
Purpose
The password used to access the keystore file when SSL is enabled (Encryption Method=1) and SSL client
authentication is enabled on the database server. The keystore file contains the certificates that the client sends
to the server in response to the server’s certificate request.
Valid Values
keystore_password
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 415
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
keystore_password
Notes
• The keystore and truststore files may be the same file; therefore, they may have the same password.
Default
None
GUI Tab
Security tab
Attribute
KeysetCursorOptions (KCO)
Purpose
Determines which columns are used to comprise the keyset that the driver uses to create the initial keyset on
which cursor operations are based. PostgreSQL does not offer a true row identifier column; the driver instead
uses a hidden system column provided by the PostgreSQL database, ctid. Because the database might reassign
the ID following a Vacuum operation, the driver can be configured to also include other columns to help ensure
that data integrity is maintained.
Valid Values
0|1
Behavior
If set to 1 (RowID and Searchable Columns), the driver uses a combination of every non-LOB column in the
Select list and the ctid ahidden column to build the keyset. By adding other Select list fields to the keyset, the
driver is able to indicate the row cannot be found if the IDs change following a Vacuum operation.
If set to 0 (RowID Columns), the driver uses the ctid hidden system column.
Notes
• This option has no effect unless the EnableKeysetCursors (EKC) connection option is enabled.
Default
0 (RowID) Columns
GUI Tab
Advanced tab
416 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
Attribute
LoadBalanceTimeout (LBT)
Purpose
Specifies the number of seconds to keep inactive connections open in a connection pool. An inactive connection
is a database session that is not associated with an ODBC connection handle, that is, a connection in the pool
that is not in use by an application.
Valid Values
0|x
where:
Behavior
If set to 0, inactive connections are kept open.
If set to x, inactive connections are closed after the specified number of seconds passes.
Notes
• The Min Pool Size option may cause some connections to ignore this value.
• This connection option can affect performance.
Default
0
GUI Tab
Pooling tab
See also
Performance Considerations on page 431
Load Balancing
Attribute
LoadBalancing (LB)
Purpose
Determines whether the driver uses client load balancing in its attempts to connect to the database servers
(primary and alternate). You can specify one or multiple alternate servers by setting the Alternate Servers
option.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 417
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses client load balancing and attempts to connect to the database servers
(primary and alternate servers) in random order.
If set to 0 (Disabled), the driver does not use client load balancing and connects to each server based on their
sequential order (primary server first, then, alternate servers in the order they are specified).
Notes
• This option has no effect unless alternate servers are defined for the Alternate Servers connection option.
Default
0 (Disabled)
GUI Tab
Failover tab
Login Timeout
Attribute
LoginTimeout (LT)
Purpose
The number of seconds the driver waits for a connection to be established before returning control to the
application and generating a timeout error. To override the value that is set by this connection option for an
individual connection, set a different value in the SQL_ATTR_LOGIN_TIMEOUT connection attribute using
the SQLSetConnectAttr() function.
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, the connection request does not time out. The driver silently ignores the
SQL_ATTR_LOGIN_TIMEOUT attribute.
If set to 0, the connection request does not time out, but the driver responds to the SQL_ATTR_LOGIN_TIMEOUT
attribute.
If set to x, the connection request times out after the specified number of seconds unless the application
overrides this setting with the SQL_ATTR_LOGIN_TIMEOUT attribute.
418 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
Default
15
GUI Tab
Advanced tab
Attribute
MaxCharSize (MCS)
Purpose
Specifies the maximum size of columns of type SQL_CHAR that the driver describes through result set
descriptions and catalog functions.
Valid Values
A positive integer from 1 to 10485760
Behavior
When not specified, the actual size of the columns from the database is persisted to the application.
If you specify a value that is not in the specified range, the driver uses the maximum value of the SQL_CHAR
data type, 10485760.
Default
None. The actual size of the columns from the database is persisted to the application.
GUI Tab
Advanced tab
Attribute
MaxLongVarcharSize (MLVS)
Purpose
Specifies the maximum size of columns of type SQL_LONGVARCHAR that the driver describes through result
set descriptions and catalog functions.
Valid Values
A positive integer from 1 to x
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 419
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Default
None. The actual size of the columns from the database is persisted to the application.
GUI Tab
Advanced tab
Attribute
MaxPoolSize (MXPS)
Purpose
The maximum number of connections allowed within a single connection pool. When the maximum number of
connections is reached, no additional connections can be created in the connection pool.
Valid Values
An integer from 1 to 65535
For example, if set to 20, the maximum number of connections allowed in the pool is 20.
Notes
• This connection option can affect performance.
Default
100
GUI Tab
Pooling tab
See also
Performance Considerations on page 431
Attribute
MaxVarcharSize (MVS)
Purpose
Specifies the maximum size of columns of type SQL_VARCHAR that the driver describes through result set
descriptions and catalog functions.
Valid Values
A positive integer from 1 to x
where:
420 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
Default
None. The actual size of the columns from the database is persisted to the application.
GUI Tab
Advanced tab
Attribute
MinPoolSize (MNPS)
Purpose
The minimum number of connections that are opened and placed in a connection pool, in addition to the active
connection, when the pool is created. The connection pool retains this number of connections, even when
some connections exceed their Load Balance Timeout value.
Valid Values
0|x
Behavior
If set to 0, no connections are opened in addition to the current existing connection.
Notes
• This connection option can affect performance.
Example
If set to 5, the start-up number of connections in the pool is 5 in addition to the current existing connection.
Default
0
GUI Tab
Pooling tab
See also
Performance Considerations on page 431
Password
Attribute
Password (PWD)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 421
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
The password that the application uses to connect to your database. The Password option cannot be specified
through the driver Setup dialog box and should not be stored in a data source. It is specified through the Logon
dialog box or a connection string.
Valid Values
pwd
where:
pwd
is a valid password.
Default
None
GUI Tab
n/a
Port Number
Attribute
PortNumber (PORT)
Purpose
The port number of the server listener.
Valid Values
port_name
where:
port_name
is the port number of the server listener. Check with your database administrator for the correct
number.
Default
5432
GUI Tab
General tab
Query Timeout
Attribute
QueryTimeout (QT)
422 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
Purpose
The number of seconds for the default query timeout for all statements that are created by a connection. To
override the value set by this connection option for an individual statement, set a different value in the
SQL_ATTR_QUERY_TIMEOUT statement attribute on the SQLSetStmtAttr() function.
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, the query does not time out. The driver silently ignores the SQL_ATTR_QUERY_TIMEOUT attribute.
If set to 0, the query does not time out, but the driver responds to the SQL_ATTR_QUERY_TIMEOUT attribute.
If set to x, all queries time out after the specified number of seconds unless the application overrides this value
by setting the SQL_ATTR_QUERY_TIMEOUT attribute.
Default
0
GUI Tab
Advanced tab
Attribute
ReportCodepageConversionErrors (RCCE)
Purpose
Specifies how the driver handles code page conversion errors that occur when a character cannot be converted
from one character set to another.
An error message or warning can occur if an ODBC call causes a conversion error, or if an error occurs during
code page conversions to and from the database or to and from the application. The error or warning generated
is Code page conversion error encountered. In the case of parameter data conversion errors, the
driver adds the following sentence: Error in parameter x, where x is the parameter number. The standard
rules for returning specific row and column errors for bulk operations apply.
Valid Values
0|1|2
Behavior
If set to 0 (Ignore Errors), the driver substitutes 0x1A for each character that cannot be converted and does
not return a warning or error.
If set to 1 (Return Error), the driver returns an error instead of substituting 0x1A for unconverted characters.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 423
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
If set to 2 (Return Warning), the driver substitutes 0x1A for each character that cannot be converted and returns
a warning.
Default
0 (Ignore Errors)
GUI Tab
Advanced tab
Attribute
ServicePrincipalName (SPN)
Purpose
The service principal name to be used by driver for Kerberos authentication.
Valid Values
servicePrincipalName
where:
servicePrincipalName
If unspecified, the value of the Network Address option is used as the service principal name.
Notes
• If Authentication Method is set to 0, the value of the Service Principal Name option is ignored.
Default
None
GUI Tab
Security tab
SSLLibName
Attribute
SSLLibName (SLN)
Purpose
The absolute path for the OpenSSL library file containing the TLS/SSL library to be used by the data source
or connection when TLS/SSL is enabled. The SSL library contains the implementations of TLS/SSL protocols
the driver uses for data encryption.
424 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
This option allows you to designate a different SSL library if you encounter issues with the default version or
want to use a library that you provide. Common issues that require designating a different library include security
vulnerabilities with specific libraries or compatibility issues with your server or application.
Valid Values
absolute_path\openssl_filename
where:
absolute_path
openssl_filename
is the name of the OpenSSL library file containing the TLS/SSL Library to be used by your data
source or connection.
Example
C:\Program Files\Progress\DataDirect\Connect64_for_ODBC_71\
Drivers\OpenSSL\1.0.0r\ddssl27.dll; (64-bit Windows)
Notes
• The OpenSSL library files provided by Progress combine the cryptographic and TLS/SSL libraries into a
single file; therefore, when your drivers are using a Progress library file, the values specified for the
CryptoLibName and SSLLibName options should be the same. For non-Progress library files, the libraries
may use separate files, which would require unique values to be specified.
• This option can be used to designate OpenSSL libraries not installed by the product; however, the drivers
are only certified against libraries provided by Progress.
Default
No default value
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
CryptoLibName=C:\Program Files\Progress\DataDirect\
Connect64_for_ODBC_71\drivers\OpenSSL\1.0.0r\ddssl27.dll;
See Advanced tab for details.
See also
CryptoLibName on page 401
Attribute
KeepAlive (KA)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 425
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
Specifies whether the driver enables TCPKeepAlive. TCPKeepAlive maintains idle TCP connections by
periodically passing packets between the client and server. If either the client or server does not respond to a
packet, the connection is considered inactive and is terminated. In addition, TCPKeepAlive prevents valid idle
connections from being disconnected by firewalls and proxies by maintaining network activity.
Valid Values
0|1
Behavior
If set to 0 (Disabled), the driver does not enable TCPKeepAlive.
If set to 1 (Enabled), the driver enables TCPKeepAlive.
Default
0 (Disabled)
GUI Tab
Advanced tab
Attribute
TransactionErrorBehavior (TEB)
Purpose
Determines how the driver handles errors that occur within a transaction. When an error occurs in a transaction,
the PostgreSQL server does not allow any operations on the connection except for rolling back the transaction.
Valid Values
0|1|2
Behavior
If set to 0 (None), the driver does not roll back the transaction when an error occurs. The application must
handle the error and roll back the transaction. Any operation on the statement other than a rollback results in
an error.
If set to 1 (Rollback Transaction), the driver rolls back the transaction when an error occurs. In addition to the
original error message, the driver posts an error message indicating that the transaction has been rolled back.
If set to 2 (Rollback Savepoint), the driver rolls back the transaction to the last savepoint when an error is
detected. In manual commit mode, the driver automatically sets a savepoint after each statement issued. This
value makes transaction behavior resemble that of most other database system types, but uses more resources
on the database server and may incur a slight performance penalty.
Default
1 (Rollback Transaction)
426 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
GUI Tab
Advanced tab
Trust Store
Attribute
Truststore (TS)
Purpose
The directory that contains the truststore file and the truststore file name to be used when SSL is enabled
(Encryption Method=1) and server authentication is used. The truststore file contains a list of the valid Certificate
Authorities (CAs) that are trusted by the client machine for SSL server authentication. If you do not specify a
directory, the current directory is used.
Valid Values
truststore_directory\filename
where:
truststore_directory
filename
Notes
• The keystore and truststore files may be the same file.
Default
None
GUI Tab
Security tab
Attribute
TruststorePassword (TSP)
Purpose
The password that is used to access the truststore file when SSL is enabled (Encryption Method=1) and server
authentication is used. The truststore file contains a list of the Certificate Authorities (CAs) that the client trusts.
Valid Values
truststore_password
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 427
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
where:
truststore_password
Notes
• The truststore and keystore files may be the same file; therefore, they may have the same password.
Default
None
GUI Tab
Security tab
Attribute
UnboundedNumericPrecision (UNP)
Purpose
Specifies the precision for unbounded NUMERIC columns when they are described within the column, parameter,
result set, or table metadata. Executing aggregation operations (for example, sum or avg) on bounded NUMERIC
columns often results in the server returning the aggregate column as an unbounded NUMERIC column. When
this occurs, this option defines the precision for the aggregate column.
Valid Values
A positive integer from 1 to 1000
Default
1000
GUI Tab
Advanced tab
Attribute
UnboundedNumericScale (UNS)
Purpose
Specifies the scale for unbounded NUMERIC columns when they are described within the column, parameter,
result set, or table metadata. Executing aggregation operations (for example, sum or avg) on bounded NUMERIC
columns often results in the server returning the aggregate column as an unbounded NUMERIC column. When
this occurs, this option defines the scale for the aggregate column.
428 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
Valid Values
A positive integer from 1 to 998
Notes
• The driver returns the scale specified in this option for the affected columns regardless of the number of
decimal digits in a value. If a value contains fewer digits to the right of the decimal than the specified scale,
the remaining digits are automatically returned as padded 0s. For example, if your scale is set to 6 and your
value is 22.22, the value returned is 22.220000.
Default
6
GUI Tab
Advanced tab
User Name
Attribute
LogonID (UID)
Purpose
The default user ID that is used to connect to your database. Your ODBC application may override this value
or you may override it in the logon dialog box or connection string.
Important: When Kerberos is enabled, if the database user name differs from the domain user name, you are
required to pass the database user name via the User Name (LogonID) option in the datasource or connection
string.
Valid Values
userid
where:
userid
Default
None
GUI Tab
Security tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 429
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Attribute
ValidateServerCertificate (VSC)
Purpose
Determines whether the driver validates the certificate that is sent by the database server when SSL encryption
is enabled (Encryption Method=1). When using SSL server authentication, any certificate sent by the server
must be issued by a trusted Certificate Authority (CA). Allowing the driver to trust any certificate returned from
the server even if the issuer is not a trusted CA is useful in test environments because it eliminates the need
to specify truststore information on each client in the test environment.
Truststore information is specified using the Trust Store and Trust Store Password options.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver validates the certificate that is sent by the database server. Any certificate from
the server must be issued by a trusted CA in the truststore file. If the Host Name In Certificate option is specified,
the driver also validates the certificate using a host name. The Host Name In Certificate option provides
additional security against man-in-the-middle (MITM) attacks by ensuring that the server the driver is connecting
to is the server that was requested.
If set to 0 (Disabled), the driver does not validate the certificate that is sent by the database server. The driver
ignores any truststore information specified by the Trust Store and Trust Store Password options.
Default
1 (Enabled)
GUI Tab
Security tab
Attribute
XMLDescribeType (XDT)
Purpose
The SQL data type that is returned by SQLGetTypeInfo for the XML data type.
See Using the XML Data Type on page 435 for further information about the XML data type.
Valid Values
-4 | -10
430 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
Behavior
If set to -4 (SQL_LONGVARBINARY), the driver uses the description SQL_LONGVARBINARY for columns
that are defined as the XML data type.
If set to -10 (SQL_WLONGVARCHAR), the driver uses the description SQL_WLONGVARCHAR for columns
that are defined as the XML data type.
Default
-10
GUI Tab
Advanced tab
Performance Considerations
The following connection options can enhance driver performance.
Application Using Threads (ApplicationUsingThreads): The driver coordinates concurrent database
operations (operations from different threads) by acquiring locks. Although locking prevents errors in the driver,
it also decreases performance. If your application does not make ODBC calls from different threads, the driver
has no reason to coordinate operations. In this case, the ApplicationUsingThreads attribute should be disabled
(set to 0).
Note: If you are using a multi-threaded application, you must enable the Application Using Threads option.
• When BatchMechanism=2, the driver executes a single insert statement for all the rows contained in a
parameter array. If the size of the insert statement exceeds the available buffer memory of the server, the
driver executes multiple statements.
• When BatchMechanism=3, the driver uses the PostgreSQL COPY command to insert rows into the target
table.
Connection Pooling (Pooling): If you enable the driver to use connection pooling, you can set additional
options that affect performance:
• Load Balance Timeout (LoadBalancing): You can define how long to keep connections in the pool. The
time that a connection was last used is compared to the current time and, if the timespan exceeds the value
of the Load Balance Timeout option, the connection is destroyed. The Min Pool Size option can cause some
connections to ignore this value.
• Connection Reset (ConnectionReset): Resetting a re-used connection to the initial configuration settings
impacts performance negatively because the connection must issue additional commands to the server.
• Max Pool Size (MaxPoolSize): Setting the maximum number of connections that the pool can contain too
low might cause delays while waiting for a connection to become available. Setting the number too high
wastes resources.
• Min Pool Size (MinPoolSize): A connection pool is created when the first connection with a unique
connection string connects to the database. The pool is populated with connections up to the minimum pool
size, if one has been specified. The connection pool retains this number of connections, even when some
connections exceed their Load Balance Timeout value.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 431
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Encryption Method (EncryptionMethod): Data encryption may adversely affect performance because of the
additional overhead (mainly CPU usage) that is required to encrypt and decrypt data.
Failover Mode (FailoverMode): Although high availability that replays queries after a failure provides increased
levels of protection, it can adversely affect performance because of increased overhead.
Data Types
The following table shows how the PostgreSQL data types are mapped to the standard ODBC data types.
Using the XML Data Type on page 435 describes PostgreSQL to Unicode data type mappings.
PostgreSQL ODBC
Bigint SQL_BIGINT
Bigserial SQL_BIGINT
27
Bit SQL_BIT
Boolean SQL_BIT
Bytea SQL_VARBINARY
Character SQL_CHAR
Date SQL_TYPE_DATE
Decimal SQL_DECIMAL
Float SQL_REAL
Integer SQL_INTEGER
Money SQL_VARCHAR
Name SQL_VARCHAR
27
Bit maps to SQL_BIT when the length for the bit is 1. If the length is greater than 1, the driver maps the column to SQL_BINARY.
28
The Citext data type behaves the same as the Text data type, except that it is case-insensitive. The select operations performed
on Citext columns return case-insensitive results.
29
Supported for PostgreSQL versions 9.4 and higher.
432 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
PostgreSQL ODBC
30
Numeric SQL_NUMERIC
Real SQL_REAL
Serial SQL_INTEGER
Smallint SQL_SMALLINT
Text SQL_LONGVARCHAR
31
Time SQL_TYPE_TIME
Timestamp SQL_TYPE_TIMESTAMP
32
Timestamp with timezone SQL_VARCHAR
Tinyint SQL_SMALLINT
Wchar SQL_CHAR
Wvarchar SQL_VARCHAR
XML SQL_WLONGVARCHAR
See Retrieving Data Type Information on page 72 for more information about data types.
Box 255
Cidr 50
Inet 50
Int4 255
30
Numeric maps to SQL_NUMERIC if the precision of the Numeric is less than or equal to 38. If the precision is greater than 38,
the driver maps the column to SQL_VARCHAR.
31
Time mapping changes based on the setting of the Fetch TWFS as Time option
32
Timestamp with timezone mapping changes based on the setting of the Fetch TSWTZ as Timestamp option.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 433
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Interval 255
Lseg 255
Macaddr 17
Money 255
Point 255
Point 255
Polygon 255
Timetz 21
434 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
• character_data
• sql_identifier
• time_stamp
• yes_or_no
Unicode Support
The PostgreSQL Wire Protocol driver automatically determines whether the PostgreSQL database is a Unicode
database.
Advanced Features
The driver supports the following advanced features:
• Failover
• Security
• Connection Pooling
Failover
The driver supports failover and its related connection options. Failover connection options are located on the
Failover tab of the driver Setup dialog box. See Using Failover on page 78 for a general description of failover
and its implementation.
Security
The driver supports authentication and encryption. Security connection options are located on the Security tab
of the driver Setup dialog box. See Using Security on page 89 for a general description of security and its
implementation.
Connection Pooling
The driver supports connection pooling and its related connection options. Connection pooling connection
options are located on the Pooling tab of the driver Setup dialog box. See Using DataDirect Connection Pooling
on page 97 for a general description of connection pooling and its implementation.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 435
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
even though the function does not return a value or results. The Select SQL statement returns a result set that
has one column named insertFoo and no row data.
The PostgreSQL Wire Protocol driver supports invoking user-defined functions using the ODBC call Escape.
The previously described function can be invoked using:
{call insertFoo(100, 'Mark')}
PostgreSQL functions return data from functions as a result set. If multiple output parameters are specified,
the values for the output parameters are returned as columns in the result set. For example, the function defined
as:
CREATE or REPLACE FUNCTION addValues(in v1 int, in v2 int)
RETURNS int
AS $$
SELECT $1 + $2;
$$
LANGUAGE SQL;
returns a result set with a single column of type SQL_INTEGER, whereas the function defined as:
CREATE or REPLACE FUNCTION selectFooRow2
(IN idVal int, OUT id int, OUT name varchar)
AS $$
select intcol, varcharcol from foo where intcol = $1;
$$
LANGUAGE SQL
returns a result set that contains two columns, a SQL_INTEGER id column and a SQL_VARCHAR name
column.
In addition, when calling PostgreSQL functions that contain output parameters, the native syntax requires that
the output parameter values be omitted from the function call. This, in addition to output parameter values
being returned as a result set, makes the PostgreSQL behavior of calling functions different from most other
databases.
436 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The PostgreSQL Wire Protocol Driver
The PostgreSQL Wire Protocol driver provides a mechanism that makes the invoking of functions more consistent
with how other databases behave. In particular, the PostgreSQL Wire Protocol driver allows parameter markers
for output parameters to be specified in the function argument list when the Escape call is used. The driver
allows buffers to be bound to these output parameters. When the function is executed, the output parameters
are removed from the argument list sent to the server. The driver extracts the output parameter values from
the result set returned by the server and updates the bound output parameter buffers with those values. For
example, the function selectFooRow2 described previously can be invoked as:
The values of the id and name output parameters are returned in the idBuf2 and nameBuf buffers.
If output parameters are bound to a function call, the driver returns the output parameters in the bound buffers.
An error is returned if the number of output parameters bound when the function is executed is less than the
number of output parameters defined in the function. If no output parameters are bound to a function call, the
driver returns the output parameters as a result set.
PostgreSQL can also return results from a function as a refcursor. There can be, at most, one refcursor per
result; however, a function can return multiple results where each result is a refcursor. A connection option
defines how the driver handles refcursors. See Fetch Ref Cursors on page 409 for details about this option.
SQL Support
The driver supports the core SQL grammar.
• SQLColumnPrivileges
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 437
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
The DataDirect Connect for ODBC Progress OpenEdge Wire Protocol driver (the Progress OpenEdge Wire
Protocol driver) supports Progress OpenEdge database systems and services.
For the latest support information, visit the Progress DataDirect Supported Configurations page:
https://www.progress.com/supported-configurations/datadirect.
The Progress OpenEdge Wire Protocol driver is supported in the Windows, UNIX, and Linux environments.
See Environment-Specific Information on page 58 for detailed information about the Windows, UNIX, and Linux
environments supported by this driver.
See the README file shipped with your DataDirect product for the file name of the Progress OpenEdge Wire
Protocol driver.
Driver Requirements
There are no client requirements for the Progress OpenEdge Wire Protocol driver.
438 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Progress OpenEdge Wire Protocol Driver
If you choose to use a connection string, you must use specific connection string attributes. See Using a
Connection String on page 444 and Connection Option Descriptions for OpenEdge Wire Protocol on page 445
for an alphabetical list of driver connection string attributes and their initial default values.
On UNIX and Linux, data sources are configured and modified by editing the system information file (by default,
odbc.ini) and storing default connection values there. See Configuring the Product on UNIX/Linux on page 111
for detailed information about the specific steps needed to set up the UNIX and Linux environments and to
configure a data source.
Connection Option Descriptions for OpenEdge Wire Protocol on page 445 lists driver connection string attributes
that must be used in the odbc.ini file to set the value of connection options. Note that only the long name of
the attribute can be used in the file. The default listed in the table is the initial default value when the driver is
installed.
On Windows, data sources are stored in the Windows Registry. You can configure and modify data sources
through the ODBC Administrator using a driver Setup dialog box, as described in this section.
When the driver is first installed, the values of its connection options are set by default. These values appear
on the driver Setup dialog box tabs when you create a new data source. You can change these default values
by modifying the data source. In the following procedure, the description of each tab is followed by a table that
lists the connection options for that tab and their initial default values. This table links you to a complete
description of the options and their connection string attribute equivalents. The connection string attributes are
used to override the default values of the data source if you want to change these values at connection time.
To configure a Progress OpenEdge data source:
1. Start the ODBC Administrator. On Windows, start the ODBC Administrator by selecting its icon from the
DataDirect Connect program group.
2. Select a tab:
• User DSN: If you are configuring an existing user data source, select the data source name and click
Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the driver
and click Finish to display the driver Setup dialog box.
• System DSN: If you are configuring an existing system data source, select the data source name
and click Configure to display the driver Setup dialog box.
If you are configuring a new system data source, click Add to display a list of installed drivers. Select
the driver and click Finish to display the driver Setup dialog box.
• File DSN: If you are configuring an existing file data source, select the data source file and click Configure
to display the driver Setup dialog box.
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select
a driver. Click Advanced if you want to specify attributes; otherwise, click Next to proceed. Specify a
name for the data source and click Next. Verify the data source information; then, click Finish to display
the driver Setup dialog box.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 439
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Note: The General tab displays only fields that are required for creating a data source. The fields on all
other tabs are optional, unless noted otherwise.
3. Provide values for the options on this tab in the following table; then, click Apply. The table provides links
to descriptions of the connection options.
440 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Progress OpenEdge Wire Protocol Driver
4. Optionally, click the Advanced tab to specify additional data source settings.
Figure 38: Advanced tab
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
Extended Options: Type a semi-colon separated list of connection options and their values. Use this
configuration option to set the value of undocumented connection options that are provided by Progress
DataDirect customer support. You can include any valid connection option in the Extended Options string,
for example:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 441
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Database=Server1;UndocumentedOption1=value[;UndocumentedOption2=value;]
If the Extended Options string contains option values that are also set in the setup dialog or data source,
the values of the options specified in the Extended Options string take precedence. However, connection
options that are specified on a connection string override any option value specified in the Extended Options
string.
Note: Do not specify the Extended Options configuration option in a connection string, or the driver will
return an error. Instead, applications should specify the individual undocumented connection options in the
connection string.
Translate: Click Translate to display the Select Translator dialog box, which lists the translators
specified in the ODBC Translators section of the Registry. Progress DataDirect provides a translator named
OEM to ANSI that translates your data from the IBM PC character set to the ANSI character set.
Select a translator; then, click OK to close this dialog box.
5. Optionally, click the Security tab to specify security data source settings.
Figure 39: Security tab
See Using Security on page 89 for a general description of authentication and encryption and their
configuration requirements.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
442 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Progress OpenEdge Wire Protocol Driver
6. Optionally, click the Failover tab to specify failover data source settings.
Figure 40: Failover tab
See Using Failover on page 78 for a general description of failover and its related connection options.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 443
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
7. At any point during the configuration process, you can click Test Connect to attempt to connect to the data
source using the connection options specified in the driver Setup dialog box. A logon dialog box appears
(see Using a Logon Dialog Box (OpenEdge) on page 445 for details). Note that the information you enter in
the logon dialog box during a test connect is not saved.
• If the driver can connect, it releases the connection and displays a Connection Established message.
Click OK.
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message. Click OK.
Note: If you are configuring alternate servers for use with the connection failover feature, be aware that
the Test Connect button tests only the primary server, not the alternate servers.
8. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
DSN=data_source_name[;attribute=value[;attribute=value]...]
FILEDSN=filename.dsn[;attribute=value[;attribute=value]...]
The DSN-less connection string specifies a driver instead of a data source. All connection information must be
entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
Connection Option Descriptions for OpenEdge Wire Protocol on page 445 lists the long and short names for
each attribute, as well as the initial default value when the driver is first installed. You can specify either long
or short names in the connection string.
444 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Progress OpenEdge Wire Protocol Driver
An example of a DSN connection string with overriding attribute values for Progress OpenEdge is:
DSN=PROGRESS;DB=PAYROLL;UID=JOHN;PWD=XYZZY
1. In the Host Name field, type the name of the system where the database is stored.
2. Type the Port Number setup for the database listener process.
3. Type the name of the database to which you want to connect.
4. Type your user name.
5. Type your password.
6. Click OK to complete the logon.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 445
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
The following table lists the connection string attributes supported by the Progress OpenEdge Wire Protocol
driver.
ConnectionRetryCount (CRC) 0
ConnectionRetryDelay (CRD) 3
LoginTimeout (LT) 15
446 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Progress OpenEdge Wire Protocol Driver
AllowedOpenSSLVersions
Attribute
AllowedOpenSSLVersions (AOV)
Purpose
Important: Version 1.0.2 of the OpenSSL library has reached the end of its product life cycle and is no longer
receiving security updates. Best security practices dictate that you use the latest version of the library.
Determines which version of the OpenSSL library file the driver uses for data encryption. Although the latest
version of the OpenSSL library is the most secure, some characteristics of the library can cause connections
to certain databases to fail. This option allows you to continue using older versions of the OpenSSL library
while you transition your environment to support the latest version.
Valid Values
latest | openssl_version_number[[,openssl_version_number]...]
where:
openssl_version_number
is the version number for the OpenSSL library file to be loaded by the driver, for example, 1.0.2.
When more than one version is specified, the driver will first attempt to load the first version listed.
If the driver is unable to locate and load this file, it will attempt to load the next version in the value.
The driver currently supports versions 1.1.1 and 1.0.2. Refer to the installed readme for latest
supported versions.
Behavior
If set to latest, the driver loads the latest installed version of the OpenSSL library file provided by Progress.
If set to openssl_version_number, the driver loads the specified version of the OpenSSL library file. This
value is used to specify a version other than the latest.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 447
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Notes
• This option is ignored if OpenSSL library files are specified using the CryptoLibName and SSLLibName
options.
• This option works only with OpenSSL library files provided by Progress and user supplied OpenSSL library
files that match Progress's naming convention and installation location.
• This option works only for installations using the default directory structure.
• Consult your database administrator concerning the security settings of your server.
Default
1.1.1,1.0.2
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
AllowedOpenSSLVersions=1.0.2
See also
Advanced tab
Alternate Servers
Attribute
AlternateServers (ASVR)
Purpose
A list of alternate database servers to which the driver tries to connect if the primary database server is
unavailable. Specifying a value for this option enables connection failover for the driver. The value you specify
must be in the form of a string that defines the physical location of each alternate server. All of the other required
connection information for each alternate server is the same as what is defined for the primary server connection.
Valid Values
(HostName=hostvalue:PortNumber=portvalue:Database=databasevalue[, . . .])
You must specify the host name, port number, and database name of each alternate server.
Notes
• An alternate server address in IPv6 format must be enclosed in double quotation marks.
Example
The following Alternate Servers values define two alternate database servers for connection failover:
AlternateServers=(HostName=123.456.78.90:PortNumber=5177:Database=PAYROLL1,
HostName=223.456.78.90:PortNumber=5178:Database=PAYROLL2)
448 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Progress OpenEdge Wire Protocol Driver
Default
None
GUI Tab
Failover tab
Attribute
ConnectionRetryCount (CRC)
Purpose
The number of times the driver retries connection attempts to the primary database server, and if specified,
alternate servers until a successful connection is established.
This option and the Connection Retry Delay connection option, which specifies the wait interval between
attempts, can be used in conjunction with failover.
Valid Values
0|x
where:
Behavior
If set to 0, the driver does not try to connect after the initial unsuccessful attempt.
If set to x, the driver retries connection attempts the specified number of times. If a connection is not established
during the retry attempts, the driver returns an error that is generated by the last server to which it tried to
connect.
Default
0
GUI Tab
Failover tab
Attribute
ConnectionRetryDelay (CRD)
Purpose
Specifies the number of seconds the driver waits between connection retry attempts when Connection Retry
Count is set to a positive integer.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 449
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
This option and the Connection Retry Count connection option can be used in conjunction with failover.
Valid Values
0|x
where:
Behavior
If set to 0, there is no delay between retries.
If set to x, the driver waits the specified number of seconds between connection retry attempts.
Default
3
GUI Tab
Failover tab
Attribute
CryptoProtocolVersion (CPV)
Purpose
Specifies a comma-separated list of the cryptographic protocols to use when SSL is enabled using the Encryption
Method connection option (EncryptionMethod=1). When multiple protocols are specified, the driver uses the
highest version supported by the server. If none of the specified protocols are supported by the database
server, the connection fails and the driver returns an error.
Valid Values
cryptographic_protocol [[, cryptographic_protocol ]...]
where:
cryptographic_protocol
Caution: Good security practices recommend using TLSv1 or higher, due to known vulnerabilities in the SSLv2
and SSLv3 protocols.
450 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Progress OpenEdge Wire Protocol Driver
Example
If your security environment is configured to use TLSv1.2 and TLSv1.1, specify the following values:
CryptoProtocolVersion=TLSv1.2, TLSv1.1
Default
TLSv1.2,TLSv1.1,TLSv1
GUI Tab
Security tab
CryptoLibName
Attribute
CryptoLibName (CLN)
Purpose
The absolute path for the OpenSSL library file containing the cryptographic library to be used by the data source
or connection when TLS/SSL is enabled. The cryptograpic library contains the implementations of cryptographic
algorithms the driver uses for data encryption.
This option allows you to designate a different cryptographic library if you encounter issues with the default
version or want to use a library that you provide. Common issues that require designating a different library
include security vulnerabilities with specific libraries or compatibility issues with your server or application.
Valid Values
absolute_path\openssl_filename
where:
absolute_path
openssl_filename
is the name of the OpenSSL library file containing the cryptographic library to be used by your data
source or connection.
Example
C:\Progress\DataDirect\Connect64_for_ODBC_71\
Drivers\OpenSSL\1.0.0r\ddssl27.dll (64-bit Windows)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 451
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Notes
• The OpenSSL library files provided by Progress combine the cryptographic and TLS/SSL libraries into a
single file; therefore, when your drivers are using a Progress library file, the values specified for the
CryptoLibName and SSLLibName options should be the same. For non-Progress library files, the libraries
may use separate files, which would require unique values to be specified.
• This option can be used to designate OpenSSL libraries not installed by the product; however, the drivers
are only certified against libraries provided by Progress.
Default
Empty string
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
CryptoLibName=C:\Program Files\Progress\DataDirect\
Connect64_for_ODBC_71\Drivers\OpenSSL\1.0.0r\ddssl27.dll;
See Advanced tab for details.
See also
SSLLibName on page 464
Attribute
DataSourceName (DSN)
Purpose
Specifies the name of a data source in your Windows Registry or odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
452 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Progress OpenEdge Wire Protocol Driver
Database Name
Attribute
Database (DB)
Purpose
Specifies the name of the database to which you want to connect.
Valid Values
database_name
where:
database_name
Default
None
GUI Tab
General tab
Attribute
DefaultIsolationLevel (DIL)
Purpose
The method by which locks on data in the database are acquired and released.
Valid Values
READ COMMITTED | READ UNCOMMITED | REPEATABLE READ | SERIALIZABLE
0|1|2|3
Behavior
If set to 0 (READ_UNCOMMITTED), other processes can be read from the database. Only modified data is
locked and is not released until the transaction ends.
If set to 1 (READ_COMMITTED) other processes can change a row that your application has read if the cursor
is not on the row you want to change. This level prevents other processes from changing records that your
application has changed until your application commits them or ends the transaction.
If set to 2 (REPEATABLE_READ), other processes are prevented from accessing data that your application
has read or modified. All read or modified data is locked until transaction ends.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 453
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
If set to 3 (SERIALIZABLE), other processes are prevented from changing records that are read or changed
by your application (including phantom records) until your program commits them or ends the transaction. This
level prevents the application from reading modified records that have not been committed by another process.
If your application opens the same query during a single unit of work under this isolation level, the results table
will be identical to the previous table; however, it can contain updates made by your application.
Refer to "Locking and isolation levels" in the Progress DataDirect for ODBC Drivers Reference for details.
Valid Values
Default
1 - READ COMMITTED
GUI Tab
Advanced tab
Description
Attribute
Description (n/a)
Purpose
Specifies an optional long description of a data source. This description is not used as a runtime connection
attribute, but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Attribute
EnableTimestampwithTimezone (ETWT)
Purpose
Determines whether the driver exposes timestamps with timezones to the application.
454 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Progress OpenEdge Wire Protocol Driver
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver exposes timestamps with timezones to the application.
If set to 0 (Disabled), timestamps with timezones are not exposed to the application.
Default
1 (Enabled)
GUI Tab
Advanced tab
Encryption Method
Attribute
EncryptionMethod (EM)
Purpose
The method the driver uses to encrypt data sent between the driver and the database server. If the specified
encryption method is not supported by the database server, the connection fails and the driver returns an error.
Valid Values
0|1
Behavior
If set to 0 (No Encryption), data is not encrypted.
If set to 1 (SSL), data is encrypted using SSL. If the server supports protocol negotiation, the driver and server
negotiate the use of TLS v1, SSL v3, or SSL v2 in that order.
Notes
• This connection option can affect performance.
Default
0 (No Encryption)
GUI Tab
Security tab
See Also
See Performance Considerations on page 468 for details.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 455
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Failover Granularity
Attribute
FailoverGranularity (FG)
Purpose
Determines whether the driver fails the entire failover process or continues with the process if errors occur
while trying to reestablish a lost connection.
This option applies only when Failover Mode is set to 1 (Extended Connection) or 2 (Select).
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
Valid Values
0|1|2|3
Behavior
If set to 0 (Non-Atomic), the driver continues with the failover process and posts any errors on the statement
on which they occur.
If set to 1 (Atomic) the driver fails the entire failover process if an error is generated as the result of anything
other than executing and repositioning a Select statement. If an error is generated as a result of repositioning
a result set to the last row position, the driver continues with the failover process, but generates a warning that
the Select statement must be reissued.
If set to 2 (Atomic Including Repositioning), the driver fails the entire failover process if any error is generated
as the result of restoring the state of the connection or the state of work in progress.
If set to 3 (Disable Integrity Check), the driver does not verify that the rows that were restored during the failover
process match the original rows. This value applies only when Failover Mode is set to 2 (Select).
Default
0 (Non-Atomic)
GUI Tab
Failover tab
Failover Mode
Attribute
FailoverMode (FM)
Purpose
Specifies the type of failover method the driver uses.
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
456 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Progress OpenEdge Wire Protocol Driver
Valid Values
0|1|2
Behavior
If set to 0 (Connection), the driver provides failover protection for new connections only.
If set to 1 (Extended Connection), the driver provides failover protection for new and lost connections, but not
any work in progress.
If set to 2 (Select), the driver provides failover protection for new and lost connections. In addition, it preserves
the state of work performed by the last Select statement executed.
Notes
• This connection option can affect performance.
Default
0 (Connection)
GUI Tab
Failover tab
See Also
See Performance Considerations on page 212 for details.
Failover Preconnect
Attribute
FailoverPreconnect (FP)
Purpose
Specifies whether the driver tries to connect to the primary and an alternate server at the same time.
This attribute applies only when Failover Mode is set to 1 (Extended Connection) or 2 (Select) and at least one
alternate server is specified.
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
Valid Values
0|1
Behavior
If set to 0 (Disabled), the driver tries to connect to an alternate server only when failover is caused by an
unsuccessful connection attempt or a lost connection. This value provides the best performance, but your
application typically experiences a short wait while the failover connection is attempted.
If set to 1 (Enabled), the driver tries to connect to the primary and an alternate server at the same time. This
can be useful if your application is time-sensitive and cannot absorb the wait for the failover connection to
succeed.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 457
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Default
0 (Disabled)
GUI Tab
Failover tab
Attribute
ArraySize (AS)
Purpose
The number of rows the driver retrieves from the server for a fetch. This is not the number of rows given to the
user.
This connection option can affect performance. See Performance Considerations on page 212 for details.
Valid Values
x
where:
Notes
• This connection option can affect performance.
Default
50
GUI Tab
Advanced tab
See Also
See Performance Considerations on page 212 for details.
Host Name
Attribute
HostName (HOST)
Purpose
The name or the IP address of the server to which you want to connect.
458 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Progress OpenEdge Wire Protocol Driver
Valid Values
server_name | IP_address
where:
server_name
IP_address
The IP address can be specified in either IPv4 or IPv6 format. See Using IP Addresses on page 67 for details
about these formats.
Default
None
GUI Tab
General tab
HostName In Certificate
Attribute
HostNameInCertificate (HNIC)
Purpose
A host name for certificate validation when SSL encryption is enabled (Encryption Method=1) and validation
is enabled (Validate Server Certificate=1). This option provides additional security against man-in-the-middle
(MITM) attacks by ensuring that the server the driver is connecting to is the server that was requested.
Valid Values
host_name | #SERVERNAME#
where:
host_name
is the host name specified in the certificate. Consult your SSL administrator for the correct value.
Behavior
If set to a host name, the driver examines the subjectAltName values included in the certificate. If a dnsName
value is present in the subjectAltName values, then the driver compares the value specified for Host Name In
Certificate with the dnsName value. The connection succeeds if the values match. The connection fails if the
Host Name In Certificate value does not match the dnsName value.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 459
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
If no subjectAltName values exist or a dnsName value is not in the list of subjectAltName values, then the
driver compares the value specified for Host Name In Certificate with the commonName part of the Subject
name in the certificate. The commonName typically contains the host name of the machine for which the
certificate was created. The connection succeeds if the values match. The connection fails if the Host Name
In Certificate value does not match the commonName. If multiple commonName parts exist in the Subject
name of the certificate, the connection succeeds if the Host Name In Certificate value matches any of the
commonName parts.
If set to #SERVERNAME#, the driver compares the host server name specified as part of a data source or
connection string to the dnsName or the commonName value.
Default
None
GUI Tab
Security tab
IANAAppCodePage
Attribute
IANAAppCodePage (IACP)
Purpose
An Internet Assigned Numbers Authority (IANA) value. You must specify a value for this option if your application
is not Unicode-enabled or if your database character set is not Unicode. The value you specify must match
the database character encoding and the system locale.
The driver uses the specified IANA code page to convert "W" (wide) functions to ANSI.
The driver and Driver Manager both check for the value of IANAAppCodePage in the following order:
• In the connection string
• In the Data Source section of the system information file (odbc.ini)
• In the ODBC section of the system information file (odbc.ini)
If the driver does not find an IANAAppCodePage value, the driver uses the default value of 4 (ISO 8859-1
Latin-1).
Valid Values
IANA_code_page
where:
IANA_code_page
is one of the valid values listed in "IANAAppCodePage values" in the Progress DataDirect for ODBC
Drivers Reference. The value must match the database character encoding and the system locale.
Notes
Refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers Reference
for details.
460 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Progress OpenEdge Wire Protocol Driver
Default
4 (ISO 8559-1 Latin-1)
GUI Tab
N/A
Load Balancing
Attribute
LoadBalancing (LB)
Purpose
Determines whether the driver uses client load balancing in its attempts to connect to the database servers
(primary and alternate). You can specify one or multiple alternate servers by setting the Alternate Servers
option.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses client load balancing and attempts to connect to the database servers
(primary and alternate servers) in random order.
If set to 0 (Disabled), the driver does not use client load balancing and connects to each server based on their
sequential order (primary server first, then, alternate servers in the order they are specified).
Notes
• This option has no effect unless alternate servers are defined for the Alternate Servers connection option.
Default
0 (Disabled)
GUI Tab
Failover tab
Login Timeout
Attribute
LoginTimeout (LT)
Purpose
The number of seconds the driver waits for a connection to be established before returning control to the
application and generating a timeout error. To override the value that is set by this connection option for an
individual connection, set a different value in the SQL_ATTR_LOGIN_TIMEOUT connection attribute using
the SQLSetConnectAttr() function.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 461
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, the connection request does not time out. The driver silently ignores the
SQL_ATTR_LOGIN_TIMEOUT attribute.
If set to 0, the connection request does not time out, but the driver responds to the SQL_ATTR_LOGIN_TIMEOUT
attribute.
If set to x, the connection request times out after the specified number of seconds unless the application
overrides this setting with the SQL_ATTR_LOGIN_TIMEOUT attribute.
Default
15
GUI Tab
Advanced tab
Password
Attribute
Password (PWD)
Purpose
The password that the application uses to connect to your database. The Password option cannot be specified
through the driver Setup dialog box and should not be stored in a data source. It is specified through the Logon
dialog box or a connection string.
Valid Values
pwd
where:
pwd
is a valid password.
Default
None
GUI Tab
n/a
462 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Progress OpenEdge Wire Protocol Driver
Port Number
Attribute
PortNumber (PORT)
Purpose
The port number of the server listener.
Valid Values
port_name
where:
port_name
is the port number of the server listener. Check with your database administrator for the correct
number.
Default
None
GUI Tab
General tab
Query Timeout
Attribute
QueryTimeout (QT)
Purpose
The number of seconds for the default query timeout for all statements that are created by a connection. To
override the value set by this connection option for an individual statement, set a different value in the
SQL_ATTR_QUERY_TIMEOUT statement attribute on the SQLSetStmtAttr() function.
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, the query does not time out. The driver silently ignores the SQL_ATTR_QUERY_TIMEOUT attribute.
If set to 0, the query does not time out, but the driver responds to the SQL_ATTR_QUERY_TIMEOUT attribute.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 463
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
If set to x, all queries time out after the specified number of seconds unless the application overrides this value
by setting the SQL_ATTR_QUERY_TIMEOUT attribute.
Default
0
GUI Tab
Advanced tab
SSLLibName
Attribute
SSLLibName (SLN)
Purpose
The absolute path for the OpenSSL library file containing the TLS/SSL library to be used by the data source
or connection when TLS/SSL is enabled. The SSL library contains the implementations of TLS/SSL protocols
the driver uses for data encryption.
This option allows you to designate a different SSL library if you encounter issues with the default version or
want to use a library that you provide. Common issues that require designating a different library include security
vulnerabilities with specific libraries or compatibility issues with your server or application.
Valid Values
absolute_path\openssl_filename
where:
absolute_path
openssl_filename
is the name of the OpenSSL library file containing the TLS/SSL Library to be used by your data
source or connection.
Example
C:\Program Files\Progress\DataDirect\ODBC_71\
Drivers\OpenSSL\1.0.0r\ddssl27.dll (64-bit Windows)
Notes
• The OpenSSL library files provided by Progress combine the cryptographic and TLS/SSL libraries into a
single file; therefore, when your drivers are using a Progress library file, the values specified for the
CryptoLibName and SSLLibName options should be the same. For non-Progress library files, the libraries
may use separate files, which would require unique values to be specified.
• This option can be used to designate OpenSSL libraries not installed by the product; however, the drivers
are only certified against libraries provided by Progress.
464 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Progress OpenEdge Wire Protocol Driver
Default
No default value
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
SSLLibName=C:\Program Files\Progress\DataDirect\
Connect64_for_ODBC_71\Drivers\OpenSSL\1.0.0r\ddssl27.dll;
See Advanced tab for details.
See also
CryptoLibName on page 451
Attribute
KeepAlive (KA)
Purpose
Specifies whether the driver enables TCPKeepAlive. TCPKeepAlive maintains idle TCP connections by
periodically passing packets between the client and server. If either the client or server does not respond to a
packet, the connection is considered inactive and is terminated. In addition, TCPKeepAlive prevents valid idle
connections from being disconnected by firewalls and proxies by maintaining network activity.
Valid Values
0|1
Behavior
If set to 0 (Disabled), the driver does not enable TCPKeepAlive.
If set to 1 (Enabled), the driver enables TCPKeepAlive.
Default
0 (Disabled)
GUI Tab
Advanced tab
Truststore
Attribute
Truststore (TS)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 465
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
The directory that contains the truststore file and the truststore file name to be used when SSL is enabled
(Encryption Method=1) and server authentication is used. The truststore file contains a list of the valid Certificate
Authorities (CAs) that are trusted by the client machine for SSL server authentication. If you do not specify a
directory, the current directory is used.
Valid Values
truststore_directory\filename
where:
truststore_directory
filename
Notes
• The truststore and keystore files may be the same file.
Default
None
GUI Tab
Security tab
Truststore Password
Attribute
TruststorePassword (TSP)
Purpose
The password that is used to access the truststore file when SSL is enabled (Encryption Method=1) and server
authentication is used. The truststore file contains a list of the Certificate Authorities (CAs) that the client trusts.
Valid Values
truststore_password
where:
truststore_password
Notes
• The truststore and keystore files may be the same file; therefore, they may have the same password.
466 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Progress OpenEdge Wire Protocol Driver
Default
None
GUI Tab
Security tab
Attribute
UseWideCharacterTypes (UWCT)
Purpose
A value that determines whether character data types are described to the application as SQL_CHAR or
SQL_WCHAR when connected to a Unicode database.
Valid Values
0|1
Behavior
If set to 0 (Disabled), character data types are described to the application as SQL_CHAR.
If set to 1 (Enabled), character data types are described to the application as SQL_WCHAR.
Default
0 (Disabled)
GUI Tab
Advanced tab
User ID
Attribute
LogonID (UID)
Purpose
The default user ID that is used to connect to your database. Your ODBC application may override this value
or you may override it in the logon dialog box or connection string.
Valid Values
userid
where:
userid
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 467
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Default
None
GUI Tab
General tab
Attribute
ValidateServerCertificate (VSC)
Purpose
Determines whether the driver validates the certificate that is sent by the database server when SSL encryption
is enabled (Encryption Method=1). When using SSL server authentication, any certificate sent by the server
must be issued by a trusted Certificate Authority (CA). Allowing the driver to trust any certificate returned from
the server even if the issuer is not a trusted CA is useful in test environments because it eliminates the need
to specify truststore information on each client in the test environment.
Truststore information is specified using the Trust Store and Trust Store Password options.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver validates the certificate that is sent by the database server. Any certificate from
the server must be issued by a trusted CA in the truststore file. If the Host Name In Certificate option is specified,
the driver also validates the certificate using a host name. The Host Name In Certificate option provides
additional security against man-in-the-middle (MITM) attacks by ensuring that the server the driver is connecting
to is the server that was requested.
If set to 0 (Disabled), the driver does not validate the certificate that is sent by the database server. The driver
ignores any truststore information specified by the Trust Store and Trust Store Password options.
Default
1 (Enabled)
GUI Tab
Security tab
Performance Considerations
The following connection options can enhance driver performance.
Encryption Method (EncryptionMethod): Data encryption may adversely affect performance because of the
additional overhead (mainly CPU usage) that is required to encrypt and decrypt data.
Failover Mode (FailoverMode): Although high availability that replays queries after a failure provides increased
levels of protection, it can adversely affect performance because of increased overhead.
468 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Progress OpenEdge Wire Protocol Driver
Fetch Array Size (ArraySize): Reducing the number of round trips on the network to the approximate number
of rows being fetched increases performance. For example, if your application normally fetches 200 rows, it is
more efficient for the driver to fetch 200 rows at one time over the network than to fetch 50 rows at a time during
four round trips over the network.
Notes
• The ideal setting for your application will vary. To calculate the ideal setting for this option, you must know
the size in bytes of the rows that you are fetching and the size in bytes of your Network Packet. Then, you
must calculate the number of rows that will fit in your Network Packet, leaving space for packet overhead.
For example, suppose your Network Packet size is 1024 bytes and the row size is 8 bytes. Dividing 1024
by 8 equals 128; however, the ideal setting for Fetch Array Size is 127, not 128, because the number of
rows times the row size must be slightly smaller than the Network Packet size.
Data Types
The following table shows how the Progress OpenEdge data types are mapped to the standard ODBC data
types.
OpenEdge ODBC
Bigint SQL_BIGINT
Binary SQL_BINARY
Bit SQL_BIT
Blob SQL_LONGVARBINARY
Char SQL_CHAR
Clob SQL_LONGVARCHAR
Date SQL_TYPE_DATE
Decimal SQL_DECIMAL
Float SQL_FLOAT
Integer SQL_INTEGER
Lvarbinary SQL_LONGVARBINARY
Lvarchar SQL_LONGVARCHAR
Numeric SQL_NUMERIC
Real SQL_FLOAT
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 469
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
OpenEdge ODBC
Smallint SQL_SMALLINT
Time SQL_TYPE_TIME
Timestamp SQL_TYPE_TIMESTAMP
Tinyint SQL_TINYINT
Varbinary SQL_VARBINARY
Varchar SQL_VARCHAR
See Retrieving Data Type Information on page 72 for more information about data types.
Unicode Support
When connected to a Unicode database, the Progress OpenEdge Wire Protocol driver supports the Unicode
data types listed in the following table, in addition to standard ODBC data types listed in Data Types on page
213. The Use Wide Character Types connection string option must be enabled.
Char SQL_WCHAR
Varchar SQL_WVARCHAR
The driver supports the Unicode ODBC W (Wide) function calls, such as SQLConnectW. This allows the Driver
Manager to transmit these calls directly to the driver. Otherwise, the Driver Manager would incur the additional
overhead of converting the W calls to ANSI function calls, and vice versa.
See UTF-16 Applications on UNIX and Linux on page 137 for related details.
Also, refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers
Reference for a more detailed explanation of Unicode.
Advanced Features
The driver supports the following advanced features:
• Failover
• Security
Failover
The driver supports failover and its related connection options. Failover connection options are located on the
Failover tab of the driver Setup dialog box. See Using Failover on page 78 for a general description of failover
and its implementation.
470 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
Security
The driver supports data security by providing both user authentication and SSL data encryption, including
Kerberos authentication and SSL data encryption. See Using Security on page 89 for a general description of
authentication and encryption and its configuration requirements.
You configure the driver for data security on the Security tab of the driver Setup dialog box. See the description
of the Security tab under Configuring and Connecting to Data Sources on page 142 for specific implementations.
The DataDirect Connect for ODBC and DataDirect Connect64 for ODBC SQL Server Wire Protocol driver (the SQL
Server Wire Protocol driver) each support the following databases and services:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 471
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Cloud:
Driver Requirements
The driver has no client requirements.
The SQL Server Wire Protocol driver connects via TCP/IP. TCP/IP connections must be configured on the
Windows server on which the Microsoft SQL Server database resides.
472 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
On Windows, data sources are stored in the Windows Registry. You can configure and modify data sources
through the ODBC Administrator using a driver Setup dialog box, as described in this section.
On UNIX and Linux, data sources are stored in the odbc.ini file.
When the driver is first installed, the values of its connection options are set by default. These values appear
on the driver Setup dialog box tabs when you create a new data source. You can change these default values
by modifying the data source. In the following procedure, the description of each tab is followed by a table that
lists the connection options for that tab and their initial default values. This table links you to a complete
description of the options and their connection string attribute equivalents. The connection string attributes are
used to override the default values of the data source if you want to change these values at connection time.
To configure a Microsoft SQL Server data source:
1. Start the ODBC Administrator by selecting its icon from the DataDirect Connect program group.
2. Select a tab:
• User DSN: If you are configuring an existing user data source, select the data source name and click
Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the
driver and click Finish to display the driver Setup dialog box.
• System DSN: If you are configuring an existing system data source, select the data source name
and click Configure to display the driver Setup dialog box.
• If you are configuring a new system data source, click Add to display a list of installed drivers. Select
the driver and click Finish to display the driver Setup dialog box.
• File DSN: If you are configuring an existing file data source, select the data source file and click Configure
to display the driver Setup dialog box.
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select
a driver. Click Advanced if you want to specify attributes; otherwise, click Next to proceed. Specify a
name for the data source and click Next. Verify the data source information; then, click Finish to display
the driver Setup dialog box.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 473
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Note: The General tab displays only fields that are required for creating a data source. The fields on all
other tabs are optional, unless noted otherwise.
On this tab, provide values for the options in the following table; then, click Apply. The table provides links
to descriptions of the connection options.
474 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
3. Optionally, click the Advanced tab to specify additional data source settings.
Figure 43: Advanced tab
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 475
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Extended Options: Type a semi-colon separated list of connection options and their values. Use this
configuration option to set the value of undocumented connection options that are provided by Progress
DataDirect customer support. You can include any valid connection option in the Extended Options string,
for example:
Database=Server1;UndocumentedOption1=value[;UndocumentedOption2=value;]
If the Extended Options string contains option values that are also set in the setup dialog or data source,
the values of the options specified in the Extended Options string take precedence. However, connection
options that are specified on a connection string override any option value specified in the Extended Options
string.
Note: Do not specify the Extended Options configuration option in a connection string, or the driver will
return an error. Instead, applications should specify the individual undocumented connection options in the
connection string.
Translate : Click Translate to display the Select Translator dialog box, which lists the translators
specified in the ODBC Translators section of the Registry. Progress DataDirect provides a translator named
OEM to ANSI that translates your data from the IBM PC character set to the ANSI character set.
Select a translator; then, click OK to close this dialog box.
476 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
4. Optionally, click the Security tab to specify additional data source settings.
Figure 44: Security tab
See Using Security on page 89 for a general description of authentication and encryption and their
configuration requirements.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 477
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
5. Optionally, click the Failover tab to specify additional data source settings.
Figure 45: Failover tab
See Using Failover on page 78 for a general description of failover and its related connection options.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
478 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
6. Optionally, click the Pooling tab to specify additional data source settings.
Figure 46: Pooling tab
See Using DataDirect Connection Pooling on page 97 for a general description of connection pooling.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 479
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
7. Optionally, click the Bulk tab to specify additional data source settings.
Figure 47: Bulk tab
See Using DataDirect Bulk Load on page 101 for a general description of DataDirect Bulk Load.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
Bulk Options on page 498 Individual item descriptions are grouped under
Only Table Lock enabled
the Bulk Option description.
480 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
If your application is already coded to use parameter array batch functionality, you can leverage DataDirect
Bulk Load features through the Enable Bulk Load connection option. Enabling this option automatically
converts the parameter array batch operation to use the database bulk load protocol.
If you are not using parameter array batch functionality, you can export data to a bulk load data file, verify
the metadata of the bulk load configuration file against the structure of the target table, and bulk load data
to a table. Use the following steps to accomplish these tasks.
a) To export data from a table to a bulk load data file, click Export Tablefrom the Bulk tab. The Export
Table dialog box appears.
Figure 48: ODBC SQL Server Wire Protocol Export Table Driver Setup dialog box
Both a bulk data file and a bulk configuration file are produced by exporting a table. The configuration
file has the same name as the data file, but with an XML extension. See Using DataDirect Bulk Load on
page 101 for details about these files.
The bulk export operation can create a log file and can also export to external files. See External Overflow
Files on page 108 for more information. The export operation can be configured such that if any errors
or warnings occur:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 481
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Information about the load is written to this file, preceded by a header. Information about the next load
is appended to the end of the file.
If you do not supply a value for Log Filename, no log file is created.
Error Tolerance: A value that specifies the number of errors to tolerate before an operation terminates.
A value of 0 indicates that no errors are tolerated; the operation fails when the first error is encountered.
The default of -1 means that an infinite number of errors is tolerated.
Warning Tolerance: A value that specifies the number of warnings to tolerate before an operation
terminates. A value of 0 indicates that no warnings are tolerated; the operation fails when the first warning
is encountered.
The default of -1 means that an infinite number of warnings is tolerated.
Code Page: A value that specifies the code page value to which the driver must convert all data for
storage in the bulk data file. See Character Set Conversions on page 108 for more information.
The default value on Windows is the current code page of the machine. On UNIX/Linux, the default value
is 4 (ISO 8559-1 Latin-1).
Click Export Table to connect to the database and export data to the bulk data file or click Cancel.
To verify the metadata of the bulk load configuration file against the structure of the target database
table, click Verify from the Bulk tab. See Verification of the Bulk Load Configuration File on page 106 for
details. The Verify dialog box appears.
Figure 49: ODBC SQL Server Wire Protocol Verify Driver Setup dialog box
Table Name: A string that specifies the name of the target database table into which the data is to be
loaded.
Configuration Filename: A string that specifies the path (relative or absolute) and file name of the bulk
configuration file. The file name must be the fully qualified path to the configuration file.
482 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
b) To load data from the bulk data file to a database table, click Load Tablefrom the Bulk tab. The Load
File dialog box appears.
Figure 50: ODBC SQL Server Wire Protocol Load File Driver Setup dialog box
The load operation can create a log file and can also create a discard file that contains rows rejected
during the load. The discard file is in the same format as the bulk load data file. After fixing reported
issues in the discard file, the bulk load can be reissued using the discard file as the bulk load data file.
The export operation can be configured such that if any errors or warnings occur:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 483
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
• If the driver can connect, it releases the connection and displays a Connection Established
message. Click OK.
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message. Click OK.
484 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
Note: If you are configuring alternate servers for use with the connection failover feature, be aware that
the Test Connect button tests only the primary server, not the alternate servers.
8. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
DSN=data_source_name[;attribute=value[;attribute=value]...]
FILEDSN=filename.dsn[;attribute=value[;attribute=value]...]
The DSN-less connection string specifies a driver instead of a data source. All connection information must be
entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
Connection Option Descriptions for SQL Server Wire Protocol on page 486 lists the long and short names for
each attribute, as well as the initial default value when the driver is first installed. You can specify either long
or short names in the connection string.
An example of a DSN connection string with overriding attribute values for Microsoft SQL Server is:
DSN=ACCOUNTING;DATABASE=ACCT
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 485
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Note: The Logon Dialog is not displayed if Authentication Mode has previously been set to Kerberos and the
Host Name is specified in the data source.
1. Type an IP address in Host Name in following format: IP_address. For example, you can enter
199.226.224.34.
The IP address can be specified in IPv4 on Windows, and in either IPv4 or IPv6 format, or a combination
of the two, on UNIX. See Using IP Addresses on page 67 for details about these formats.
If your network supports named servers, you can specify an address as: server_name. For example, you
can enter SSserver.
To specify a named instance of Microsoft SQL Server, use the format: server_name\instance_name.
If only a server name is specified with no instance name, the driver uses the default instance on the server.
7. Click OK to complete the logon and to update the values in the Registry.
486 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
Also, a few connection string attributes, for example, Password, do not have equivalent options that appear
on the GUI. They are in the list of descriptions alphabetically by their attribute names.
The following table lists the connection string attributes supported by the SQL Server Wire Protocol driver.
ApplicationIntent (AI)
0 (READWRITE)
BulkBinaryThreshold (BBT) 32
BulkCharacterThreshold (BCT) -1
BulkLoadOptions (BLO) 2
BulkLoadThreshold (BLTH) 2
ConnectionRetryCount (CRC) 0
ConnectionRetryDelay (CRD) 3
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 487
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
LoadBalanceTimeout (LBT) 0
MinPoolSize (MNPS) 0
PacketSize (PS) -1
488 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
QueryTimeout (QT) 0
AllowedOpenSSLVersions
Attribute
AllowedOpenSSLVersions (AOV)
Purpose
Important: Version 1.0.2 of the OpenSSL library has reached the end of its product life cycle and is no longer
receiving security updates. Best security practices dictate that you use the latest version of the library.
Determines which version of the OpenSSL library file the driver uses for data encryption. Although the latest
version of the OpenSSL library is the most secure, some characteristics of the library can cause connections
to certain databases to fail. This option allows you to continue using older versions of the OpenSSL library
while you transition your environment to support the latest version.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 489
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Valid Values
latest | openssl_version_number[[,openssl_version_number]...]
where:
openssl_version_number
is the version number for the OpenSSL library file to be loaded by the driver, for example, 1.0.2.
When more than one version is specified, the driver will first attempt to load the first version listed.
If the driver is unable to locate and load this file, it will attempt to load the next version in the value.
The driver currently supports versions 1.1.1 and 1.0.2. Refer to the installed readme for latest
supported versions.
Behavior
If set to latest, the driver loads the latest installed version of the OpenSSL library file provided by Progress.
If set to openssl_version_number, the driver loads the specified version of the OpenSSL library file. This
value is used to specify a version other than the latest.
Notes
• This option is ignored if OpenSSL library files are specified using the CryptoLibName and SSLLibName
options.
• This option works only with OpenSSL library files provided by Progress and user supplied OpenSSL library
files that match Progress's naming convention and installation location.
• This option works only for installations using the default directory structure.
• Consult your database administrator concerning the security settings of your server.
Default
1.1.1,1.0.2
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
AllowedOpenSSLVersions=1.0.2
See also
Advanced tab
Alternate Servers
Attribute
AlternateServers (ASRV)
490 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
Purpose
A list of alternate database servers to which the driver tries to connect if the primary database server is
unavailable. Specifying a value for this option enables connection failover for the driver. The value you specify
must be in the form of a string that defines the physical location of each alternate server. All of the other required
connection information for each alternate server is the same as what is defined for the primary server connection.
Valid Values
(HostName=hostvalue:PortNumber=portvalue:Database=databasevalue[, . . .])
You must specify the host name, port number, and database name of each alternate server.
Notes
• An alternate server address in IPv6 format must be enclosed in double quotation marks.
Example
The following Alternate Servers value defines two alternate database servers for connection failover:
AlternateServers=(HostName=SqlsServer:PortNumber=1433:Database=Sqlsdb1,
HostName=255.201.11.24:PortNumber=1434:Database=Sqlsdb2)
Default
None
GUI Tab
Failover tab
Attribute
AlwaysReportTriggerResults (ARTR)
Purpose
Determines how the driver reports results that are generated by database triggers (procedures that are stored
in the database and executed, or fired, when a table is modified). For Microsoft SQL Server 2005 and higher
and Windows Azure SQL Database, this includes triggers that are fired by Data Definition Language (DDL)
events.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver returns all results, including results that are generated by triggers. Multiple
trigger results are returned one at a time. You can use the SQLMoreResults function to return individual trigger
results. Warnings and errors are reported in the results as they are encountered.
If set to 0 (Disabled):
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 491
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
• For Microsoft SQL Server 2005 and higher and Windows Azure SQL Database, the driver does not report
trigger results if the statement is a single INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, GRANT,
REVOKE, or DENY statement.
• For other Microsoft SQL Server databases, the driver does not report trigger results if the statement is a
single INSERT, UPDATE, or DELETE statement.
When set to 0, the only result that is returned is the update count that is generated by the statement that was
executed (if no errors occurred). Although trigger results are ignored, any errors and warnings that are generated
by the trigger are reported. If errors are reported, the update count is not reported.
Default
0 (Disabled)
GUI Tab
Advanced tab
AnsiNPW
Attribute
AnsiNPW (ANPW)
Purpose
Determines whether ANSI-defined behaviors are exposed. Setting this option has no effect on NULL
concatenation for Windows Azure SQL Database or SQL Server versions higher than SQL Server 2012.
Valid Values
0|1
Behavior
When set to 1 (Enabled), the driver sets four ANSI-defined behaviors for handling NULL comparisons: NULLS,
character data padding, warnings, and NULL concatenation.
When set to 0 (Disabled), ANSI-defined behaviors are not exposed. If the driver appears to be truncating trailing
blank spaces, set this attribute to 0 (Disabled).
Default
1 (Enabled)
GUI Tab
Advanced tab
Application Intent
Attribute
ApplicationIntent (AI)
492 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
Purpose
Specifies whether the driver connects to read-write databases or requests read-only routing to connect to
read-only database replicas. Read-only routing only applies to connections in Microsoft SQL Server 2012 where
Always On Availability Groups have been deployed.
Valid Values
0|1
Behavior
If set to 0 (READWRITE), the driver connects to a read-write node in the Always On environment.
If set to 1 (READONLY), the driver requests read-only routing and connects to the read-only database replicas
specified by the server.
Notes
• By setting ApplicationIntent to 1 (ReadOnly) and querying read-only database replicas when possible, you
can improve efficiency of your environment by reducing the work load on read-write nodes.
• When ApplicationIntent is enabled, the virtual network name (VNN) of the availability group listener must
be specified in the Host Name connection option.
Default
0 (READWRITE)
GUI Tab
Advanced tab
Application Name
Attribute
ApplicationName (APP)
Purpose
The name the database uses to identify your application.
Valid Values
string
where:
string
Default
None
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 493
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
GUI Tab
Advanced tab
Attribute
ApplicationUsingThreads (AUT)
Purpose
Determines whether the driver works with applications using multiple ODBC threads.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver works with single-threaded and multi-threaded applications.
If set to 0 (Disabled), the driver does not work with multi-threaded applications. If using the driver with
single-threaded applications, this value avoids additional processing required for ODBC thread-safety standards.
Notes
• This connection option can affect performance.
Default
1 (Enabled)
GUI Tab
Advanced tab
See Also
See Performance Considerations on page 533 for details.
Authentication Method
Attribute
AuthenticationMethod (AM)
Purpose
Specifies the method the driver uses to authenticate the user to the server when a connection is established.
If the specified authentication method is not supported by the database server, the connection fails and the
driver generates an error.
Valid Values
1 | 4 | 9 | 10 | 13
494 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
Behavior
If set to 1 (Encrypt Password), the driver sends the user ID in clear text and an encrypted password to the
server for authentication.
If set to 4 (Kerberos Authentication), the driver uses Kerberos authentication. This method supports both
Windows Active Directory Kerberos and MIT Kerberos environments.
Setting this value to 4 also enables NTLMv2 and NTLMv1 authentication on Windows platforms. The protocol
used for a connection is determined by the local security policy settings for the client.
(UNIX and Linux only) If set to 9 on Linux and UNIX platforms, the driver uses NTLMv1 or NTLMv2 authentication.
The driver determines which protocol to use based on the size of the password provided. For passwords 14
bytes or less, the driver uses NTLMv1; otherwise, the driver uses NTLMv2. To connect to the database, users
must supply the Windows User Id, Password, and, in some cases, Domain to the driver.
(UNIX and Linux only) If set to 10, the driver uses NTLMv2 authentication. To connect to the database, users
must supply the Windows User Id, Password, and, in some cases, Domain to the driver.
If set to 13 (Active Directory Password), the driver uses Azure Active Directory (Azure AD) authentication when
establishing a connection to an Azure SQL Database data store. All communications to the service are encrypted
using SSL.
Important: Before enabling Azure AD authentication, see "Configuring Azure Active Directory Authentication"
for requirements and additional information.
Notes
• NTLM single sign on is supported only on Windows.
Default
1 (Encrypt Password)
GUI Tab
Security tab
See Also
Configuring Azure Active Directory Authentication on page 537
Batch Size
Attribute
BulkLoadBatchSize (BLBS)
Purpose
The number of rows that the driver sends to the database at a time during bulk operations. This value applies
to all methods of bulk loading.
Valid Values
0|x
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 495
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Default
1024
GUI Tab
Bulk tab
Attribute
BulkBinaryThreshold (BBT)
Purpose
The maximum size, in KB, of binary data that is exported to the bulk data file.
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, all binary data, regardless of size, is written to the bulk data file, not to an external file.
If set to 0, all binary data, regardless of size, is written to an external file, not the bulk data file. A reference to
the external file is written to the bulk data file.
If set to x, any binary data exceeding this specified number of KB is written to an external file, not the bulk data
file. A reference to the external file is written to the bulk data file.
Default
32
GUI Tab
Bulk tab
Attribute
BulkCharacterThreshold (BCT)
496 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
Purpose
The maximum size, in KB, of character data that is exported to the bulk data file.
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, all character data, regardless of size, is written to the bulk data file, not to an external file.
If set to 0, all character data regardless of size, is written to an external file, not the bulk data file. A reference
to the external file is written to the bulk data file.
If set to x, any character data exceeding this specified number of KB is written to an external file, not the bulk
data file. A reference to the external file is written to the bulk data file.
Default
-1
GUI Tab
Bulk tab
Attribute
BulkLoadThreshold (BLTH)
Purpose
Determines when the driver uses bulk load for insert, update, delete, or batch operations. If the Enable Bulk
Load option is set to True and the number of rows affected by an insert, update, delete, or batch operation
exceeds the threshold specified by this option, the driver uses SQL Server bulk load protocol to perform the
operation.
Valid Values
0|x
where:
Behavior
If set to 0, the driver always uses bulk load to execute insert, update, delete, or batch operations.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 497
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
If set to x, the driver only uses bulk load if the Enable Bulk Load option is enabled and the number of rows to
be updated by an insert, update, delete, or batch operation exceeds the threshold. If the operation times out,
the driver returns an error.
Notes
• If the Enable Bulk Load option is set to false, this option is ignored.
Default
2
GUI Tab
Bulk tab
Bulk Options
Attribute
BulkLoadOptions (BLO)
Purpose
Toggles options for the bulk load process.
Valid Values
0|x
where:
is a positive integer representing the cumulative total of the Bulk Options values.
Behavior
If set to 0, none of the options for bulk load are enabled.
If set to x, the values represented by x are enabled.
Note: The cumulative value of the options is only used in a connection string with the connection string attribute,
BulkLoadOptions. On the Bulk tab of the driver Setup dialog, the individual options are enabled by selecting
the appropriate check box.
498 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
• Table Lock - Assigns a table lock for the duration of the bulk copy operation. Other applications are not
permitted to update the table during the copy operation. When not enabled, the default bulk locking
mechanism (row or table) specified by the table lock on bulk load server option is used. Value=2.
Example
If you wanted to enable Check Constraints (16), Fire Triggers (32), and Keep Identity (1) in a connection string,
you would add the values together:
BulkLoadOptions=49
To enable these options on the Bulk tab of the driver Setup dialog, you would simply select the check box for
each one.
Default
2 (Table Lock enabled)
GUI Tab
Bulk tab
Connection Pooling
Attribute
Pooling (POOL)
Purpose
Specifies whether to use the driver’s connection pooling.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses connection pooling.
If set to 0 (Disabled), the driver does not use connection pooling.
Notes
• The application must be thread-enabled to use connection pooling.
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Pooling tab
See Also
See Performance Considerations on page 533 for details.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 499
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Connection Reset
Attribute
ConnectionReset (CR)
Purpose
Determines whether the state of connections that are removed from the connection pool for reuse by the
application is reset to the initial configuration of the connection.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the state of connections removed from the connection pool for reuse by an application is
reset to the initial configuration of the connection. Resetting the state can negatively impact performance
because additional commands must be sent over the network to the server to reset the state of the connection.
If set to 0 (Disabled), the state of connections is not reset.
Notes
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Pooling tab
See Also
See Performance Considerations on page 533 for details.
Attribute
ConnectionRetryCount (CRC)
Purpose
The number of times the driver retries connection attempts to the primary database server, and if specified,
alternate servers until a successful connection is established.
This option and the Connection Retry Delay connection option, which specifies the wait interval between
attempts, can be used in conjunction with failover.
Valid Values
0|x
where:
500 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
Behavior
If set to 0, the driver does not try to connect after the initial unsuccessful attempt.
If set to x, the driver retries connection attempts the specified number of times. If a connection is not established
during the retry attempts, the driver returns an error that is generated by the last server to which it tried to
connect.
Default
0
GUI Tab
Failover tab
Attribute
ConnectionRetryDelay (CRD)
Purpose
Specifies the number of seconds the driver waits between connection retry attempts when Connection Retry
Count is set to a positive integer.
This option and the Connection Retry Count connection option can be used in conjunction with failover.
Valid Values
0|x
where:
Behavior
If set to 0, there is no delay between retries.
If set to x, the driver waits the specified number of seconds between connection retry attempts.
Default
3
GUI Tab
Failover tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 501
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Attribute
CryptoProtocolVersion (CPV)
Purpose
Specifies a comma-separated list of the cryptographic protocols to use when SSL is enabled using the Encryption
Method connection option (EncryptionMethod=1 | 6 | 7). When multiple protocols are specified, the driver uses
the highest version supported by the server. If none of the specified protocols are supported by the database
server, driver behavior is determined by the Encryption Method connection option.
Valid Values
cryptographic_protocol [[, cryptographic_protocol ]...]
where:
cryptographic_protocol
Caution: Good security practices recommend using TLSv1 or higher, due to known vulnerabilities in the SSLv2
and SSLv3 protocols.
Example
If your security environment is configured to use TLSv1.2 and TLSv1.1, specify the following values:
CryptoProtocolVersion=TLSv1.2, TLSv1.1
Notes
• This option is ignored if Encryption Method is set to 0 - No Encryption.
• Consult your database administrator concerning the data encryption settings of your server.
Default
TLSv1.2,TLSv1.1,TLSv1
GUI Tab
Security tab
See also
Encryption Method on page 507
502 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
CryptoLibName
Attribute
CryptoLibName (CLN)
Purpose
The absolute path for the OpenSSL library file containing the cryptographic library to be used by the data source
or connection when TLS/SSL is enabled. The cryptograpic library contains the implementations of cryptographic
algorithms the driver uses for data encryption.
This option allows you to designate a different cryptographic library if you encounter issues with the default
version or want to use a library that you provide. Common issues that require designating a different library
include security vulnerabilities with specific libraries or compatibility issues with your server or application.
Valid Values
absolute_path\openssl_filename
where:
absolute_path
openssl_filename
is the name of the OpenSSL library file containing the cryptographic library to be used by your data
source or connection.
Example
C:\Program Files\Progress\DataDirect\Connect64_for_ODBC_71\Drivers
\OpenSSL\1.0.0r\ddssl27.dll; (64-bit Windows)
Notes
• The OpenSSL library files provided by Progress combine the cryptographic and TLS/SSL libraries into a
single file; therefore, when your drivers are using a Progress library file, the values specified for the
CryptoLibName and SSLLibName options should be the same. For non-Progress library files, the libraries
may use separate files, which would require unique values to be specified.
• This option can be used to designate OpenSSL libraries not installed by the product; however, the drivers
are only certified against libraries provided by Progress.
Default
Empty string
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
CryptoLibName=C:\Program Files\Progress\DataDirect\
Connect64_for_ODBC_71\Drivers\OpenSSL\1.0.0r\ddssl27.dll;
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 503
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
See also
SSLLibName on page 527
Attribute
DataSourceName (DSN)
Purpose
Specifies the name of a data source in your Windows Registry or odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Database
Attribute
Database (DB)
Purpose
Specifies the name of the database to which you want to connect.
Valid Values
database_name
where:
database_name
Default
None
504 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
GUI Tab
General tab
Description
Attribute
Description (n/a)
Purpose
Specifies an optional long description of a data source. This description is not used as a runtime connection
attribute, but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Domain
Attribute
Domain (DOM)
Purpose
Specifies the Windows domain that the driver uses when connecting to a SQL Server Instance.
To connect to the database, users must supply the Windows User Id, Password, and, in some cases, domain
to the driver. NTLM single sign on is not supported.
Valid Values
string
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 505
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
string
is a valid Windows domain for the user specified by LoginId. This attribute applies only when
Authentication Mode is set to 9.
Default
None
GUI Tab
n/a
Attribute
EnableBulkLoad (EBL)
Purpose
Specifies the bulk load method.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses the database bulk load protocol when an application executes an INSERT
with multiple rows of parameter data. If the protocol cannot be used, the driver returns a warning.
If set to 0 (Disabled), the driver uses standard parameter arrays.
Default
0 (Disabled)
GUI Tab
Bulk tab
Attribute
EnableQuotedIdentifiers (EQI)
Purpose
Determines whether the driver allows the use of quoted identifiers.
Valid Values
0|1
506 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
Behavior
If set to 1 (Enabled), the database enforces ANSI rules regarding quotation marks. Double quotation marks
can only be used for identifiers, such as column and table names. Character strings must be enclosed in single
quotation marks, for example:
SELECT "au_id"
FROM "authors"
WHERE "au_lname" = 'O''Brien'
If set to no (Disabled), applications that use quoted identifiers encounter errors when they generate SQL
statements with quoted identifiers.
Default
0 (Disabled)
GUI Tab
Advanced tab
Encryption Method
Attribute
EncryptionMethod (EM)
Purpose
The method the driver uses to encrypt data sent between the driver and the database server.
Valid Values
0|1|6|7
Behavior
If set to 0 (No Encryption), data is not encrypted.
If set to 1 (SSL), data is encrypted using the SSL protocols specified in the Crypto Protocol Version connection
option.
If set to 6 (RequestSSL), the login request and data are encrypted using SSL if the server is configured for
SSL. If the server is not configured for SSL, an unencrypted connection is established. The SSL protocol used
is determined by the setting of the Crypto Protocol Version connection option.
If set to 7 (LoginSSL), the login request is encrypted using SSL regardless of whether the server is configured
for SSL. The data is encrypted using SSL if the server is configured for SSL, and the data is unencrypted if the
server is not configured for SSL. The SSL protocol used is determined by the setting of the Crypto Protocol
Version connection option.
This option can only be set to 1 when Authentication Method is set to 1.
Notes
• For values 1 through 7, the SSL protocol used is determined by the setting of the Crypto Protocol Version
connection option.
• The driver must use the server-specified packet size when using SSL encryption. If SSL is used, any value
set for the Packet Size connection option is ignored.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 507
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Default
0 (No Encryption)
GUI Tab
Security tab
See Also
Crypto Protocol Version on page 502
Performance Considerations on page 533
Failover Granularity
Attribute
FailoverGranularity (FG)
Purpose
Determines whether the driver fails the entire failover process or continues with the process if errors occur
while trying to reestablish a lost connection.
This option applies only when Failover Mode is set to 1 (Extended Connection) or 2 (Select).
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
Valid Values
0|1|2|3
Behavior
If set to 0 (Non-Atomic), the driver continues with the failover process and posts any errors on the statement
on which they occur.
If set to 1 (Atomic) the driver fails the entire failover process if an error is generated as the result of anything
other than executing and repositioning a Select statement. If an error is generated as a result of repositioning
a result set to the last row position, the driver continues with the failover process, but generates a warning that
the Select statement must be reissued.
If set to 2 (Atomic Including Repositioning), the driver fails the entire failover process if any error is generated
as the result of restoring the state of the connection or the state of work in progress.
If set to 3 (Disable Integrity Check), the driver does not verify that the rows that were restored during the failover
process match the original rows. This value applies only when Failover Mode is set to 2 (Select).
Default
0 (Non-Atomic)
GUI Tab
Failover tab
508 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
Failover Mode
Attribute
FailoverMode (FM)
Purpose
Specifies the type of failover method the driver uses.
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
Valid Values
0|1|2
Behavior
If set to 0 (Connection), the driver provides failover protection for new connections only.
If set to 1 (Extended Connection), the driver provides failover protection for new and lost connections, but not
any work in progress.
If set to 2 (Select), the driver provides failover protection for new and lost connections. In addition, it preserves
the state of work performed by the last Select statement executed.
Notes
• This connection option can affect performance.
Default
0 (Connection)
GUI Tab
Failover tab
See Also
See Performance Considerations on page 533 for details.
Failover Preconnect
Attribute
FailoverPreconnect (FP)
Purpose
Specifies whether the driver tries to connect to the primary and an alternate server at the same time.
This attribute applies only when Failover Mode is set to 1 (Extended Connection) or 2 (Select) and at least one
alternate server is specified.
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 509
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Valid Values
0|1
Behavior
If set to 0 (Disabled), the driver tries to connect to an alternate server only when failover is caused by an
unsuccessful connection attempt or a lost connection. This value provides the best performance, but your
application typically experiences a short wait while the failover connection is attempted.
If set to 1 (Enabled), the driver tries to connect to the primary and an alternate server at the same time. This
can be useful if your application is time-sensitive and cannot absorb the wait for the failover connection to
succeed.
Default
0 (Disabled)
GUI Tab
Failover tab
Attribute
FetchTSWTZasTimestamp (FTSWTZAT)
Purpose
Determines whether the driver returns column values with the timestamp with time zone data type as the ODBC
data type SQL_TYPE_TIMESTAMP or SQL_VARCHAR.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver returns column values with the timestamp with time zone data type as the ODBC
type SQL_TYPE_TIMESTAMP. The time zone information in the fetched value is truncated. Use this value if
your application needs to process values the same way as TIMESTAMP columns.
If set to 0 (Disabled), the driver returns column values with the timestamp with time zone data type as the
ODBC data type SQL_VARCHAR. Use this value if your application requires the time zone information in the
fetched value.
Default
0 (Disabled)
GUI Tab
Advanced tab
510 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
Attribute
FetchTWFSasTime (FTWFSAT)
Purpose
Determines whether the driver returns column values with the time data type as the ODBC data type
SQL_TYPE_TIME or SQL_TYPE_TIMESTAMP.
Supported only for Microsoft SQL Server 2008.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver returns column values with the time data type as the ODBC data type
SQL_TYPE_TIME. The fractional seconds portion of the value is truncated.
If set to 0 (Disabled), the driver returns column values with the time data type as the ODBC data type
SQL_TYPE_TIMESTAMP. The fractional seconds portion of the value is preserved. Time columns are not
searchable when they are described and fetched as timestamp.
Notes
• When returning time with fractional seconds data as SQL_TYPE_TIMESTAMP, the Year, Month and Day
parts of the timestamp must be set to zero.
Default
1 (Enabled)
GUI Tab
Advanced tab
Field Delimiter
Attribute
BulkLoadFieldDelimiter (BLFD)
Purpose
Specifies the character that the driver will use to delimit the field entries in a bulk load data file.
Valid Values
x
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 511
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
For simplicity, avoid using a value that can be in the data, including all alphanumeric characters, the dash(-),
the colon(:), the period (.), the forward slash (/), the space character, the single quote (') and the double quote
("). You can use some of these characters as delimiters if all of the data in the file is contained within double
quotes.
Notes
• The Bulk Load Field Delimiter character must be different from the Bulk Load Record Delimiter.
Default
None
GUI Tab
Bulk tab
Attribute
GSSClient (GSSC)
Purpose
The name of the GSS client library that the driver uses to communicate with the Key Distribution Center (KDC).
The driver uses the path defined by the PATH environment variable for loading the specified client library.
Valid Values
native | client_library
where:
client_library
Behavior
If set to client_library, the driver uses the specified GSS client library.
If set to native, the driver uses the GSS client shipped with the operating system.
Default
native
GUI Tab
Security tab
512 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
Host Name
Attribute
HostName (HOST)
Purpose
The name or the IP address of the server to which you want to connect.
Valid Values
IP_address | named_server | named_instance| server_name | virtual_network_name
where:
IP_address
is the IP address of the server to which you want to connect. Specify this address as: IP_address.
For example, you can enter 199.226.224.34.
The IP address can be specified in either IPv4 or IPv6 format. See Using IP Addresses on page 67
for details about these formats.
named_server
is the named server address of the server to which you want to connect. Specify this address as:
named_server. For example, you can enter SSserver.
named_instance
is a named instance of Microsoft SQL Server or Windows Azure SQL Database. Specify this address
as: server_name\instance_name.
virtual_network_name
is the virtual network name (VNN) of the availability group listener when using an Always On
Availability Group.
Notes
• If only a server name is specified with no instance name, the driver uses the default instance on the server.
• If only a server name is specified with a backward slash \ or \* at the end with no instance name, the driver
uses the first instance on the server with a TCP port.
Default
None
GUI Tab
General tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 513
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Attribute
HostNameInCertificate (HNIC)
Purpose
A host name for certificate validation when SSL encryption is enabled (Encryption Method=1) and validation
is enabled (Validate Server Certificate=1). This option provides additional security against man-in-the-middle
(MITM) attacks by ensuring that the server the driver is connecting to is the server that was requested.
Valid Values
host_name | #SERVERNAME#
where:
host_name
is the host name specified in the certificate. Consult your SSL administrator for the correct value.
Behavior
If set to a host name, the driver examines the subjectAltName values included in the certificate. If a dnsName
value is present in the subjectAltName values, then the driver compares the value specified for Host Name In
Certificate with the dnsName value. The connection succeeds if the values match. The connection fails if the
Host Name In Certificate value does not match the dnsName value.
If no subjectAltName values exist or a dnsName value is not in the list of subjectAltName values, then the
driver compares the value specified for Host Name In Certificate with the commonName part of the Subject
name in the certificate. The commonName typically contains the host name of the machine for which the
certificate was created. The connection succeeds if the values match. The connection fails if the Host Name
In Certificate value does not match the commonName. If multiple commonName parts exist in the Subject
name of the certificate, the connection succeeds if the Host Name In Certificate value matches any of the
commonName parts.
If set to #SERVERNAME#, the driver compares the host server name specified as part of a data source or
connection string to the dnsName or the commonName value.
Default
None
GUI Tab
Security tab
IANAAppCodePage
Attribute
IANAAppCodePage (IACP)
514 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
Purpose
An Internet Assigned Numbers Authority (IANA) value. You must specify a value for this option if your application
is not Unicode-enabled or if your database character set is not Unicode. The value you specify must match
the database character encoding and the system locale.
The driver uses the specified IANA code page to convert "W" (wide) functions to ANSI.
The driver and Driver Manager both check for the value of IANAAppCodePage in the following order:
• In the connection string
• In the Data Source section of the system information file (odbc.ini)
• In the ODBC section of the system information file (odbc.ini)
If the driver does not find an IANAAppCodePage value, the driver uses the default value of 4 (ISO 8859-1
Latin-1).
Valid Values
IANA_code_page
where:
IANA_code_page
is one of the valid values listed in "IANAAppCodePage values" in the Progress DataDirect for ODBC
Drivers Reference. The value must match the database character encoding and the system locale.
Notes
Refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers Reference
for details.
Default
4 (ISO 8559-1 Latin-1)
GUI Tab
Advanced tab
Initialization String
Attribute
InitializationString (IS)
Purpose
A SQL command that is issued immediately after connecting to the database to manage session settings.
Valid Values
SQL_command
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 515
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
SQL_command
Example
To set the date format on every connection, specify:
Set DateStyle='ISO, MDY'
Notes
• If the statement fails to execute, the connection fails and the driver reports the error returned from the server.
Default
None
GUI Tab
Advanced tab
Language
Attribute
Language (LANG)
Purpose
The national language to use for Microsoft SQL Server system messages.
Valid Values
lang
where:
lang
is the language to use for Microsoft SQL Server system messages. This overrides the default language
specified for the login on the server. If no language is specified, the connection uses the default
language specified for the login on the server.
Default
None
GUI Tab
Advanced tab
Attribute
LoadBalanceTimeout (LBT)
516 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
Purpose
The number of seconds to keep inactive connections open in a connection pool. An inactive connection is a
database session that is not associated with an ODBC connection handle, that is, a connection in the pool that
is not in use by an application.
Valid Values
0|x
where:
Behavior
If set to 0, inactive connections are kept open.
If set to x, inactive connections are closed after the specified number of seconds passes.
Notes
• The Min Pool Size option may cause some connections to ignore this value.
• This connection option can affect performance.
Default
0
GUI Tab
Pooling tab
See also
Performance Considerations on page 533
Load Balancing
Attribute
LoadBalancing (LB)
Purpose
Determines whether the driver uses client load balancing in its attempts to connect to the database servers
(primary and alternate). You can specify one or multiple alternate servers by setting the Alternate Servers
option.
Valid Values
0|1
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 517
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Behavior
If set to 1 (Enabled), the driver uses client load balancing and attempts to connect to the database servers
(primary and alternate servers) in random order.
If set to 0 (Disabled), the driver does not use client load balancing and connects to each server based on their
sequential order (primary server first, then, alternate servers in the order they are specified).
Notes
• This option has no effect unless alternate servers are defined for the Alternate Servers connection option.
Default
0 (Disabled)
GUI Tab
Failover tab
Login Timeout
Attribute
LoginTimeout (LT)
Purpose
The number of seconds the driver waits for a connection to be established before returning control to the
application and generating a timeout error. To override the value that is set by this connection option for an
individual connection, set a different value in the SQL_ATTR_LOGIN_TIMEOUT connection attribute using
the SQLSetConnectAttr() function.
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, the connection request does not time out. The driver silently ignores the
SQL_ATTR_LOGIN_TIMEOUT attribute.
If set to 0, the connection request does not time out, but the driver responds to the SQL_ATTR_LOGIN_TIMEOUT
attribute.
If set to x, the connection request times out after the specified number of seconds unless the application
overrides this setting with the SQL_ATTR_LOGIN_TIMEOUT attribute.
Default
15
518 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
GUI Tab
Advanced tab
Attribute
MaxPoolSize (MXPS)
Purpose
The maximum number of connections allowed within a single connection pool. When the maximum number of
connections is reached, no additional connections can be created in the connection pool.
Valid Values
An integer from 1 to 65535
For example, if set to 20, the maximum number of connections allowed in the pool is 20.
Notes
• This connection option can affect performance.
Default
100
GUI Tab
Pooling tab
See also
Performance Considerations on page 533
Attribute
MinPoolSize (MNPS)
Purpose
The minimum number of connections that are opened and placed in a connection pool, in addition to the active
connection, when the pool is created. The connection pool retains this number of connections, even when
some connections exceed their Load Balance Timeout value.
Valid Values
0|x
Behavior
If set to 0, no connections are opened in addition to the current existing connection.
If set to x, the start-up number of connections in the pool is x in addition to the current existing connection.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 519
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Notes
• This connection option can affect performance.
Example
If set to 5, the start-up number of connections in the pool is 5 in addition to the current existing connection.
Default
0
GUI Tab
Pooling tab
See also
Performance Considerations on page 533
Multi-Subnet Failover
Attribute
MultiSubnetFailover (MSF)
Purpose
Determines whether the driver attempts parallel connections to the failover IP addresses of an Availability
Group during a multi-subnet failover. When Multi-Subnet Failover is enabled, the driver simultaneously attempts
to connect to all IP addresses associated with the Availability Group listener when the connection is broken or
the listener IP address becomes unavailable. The first IP address to successfully respond to the request is
used for the connection. Using parallel-connection attempts offers improved response time over traditional
failover, which attempts to connect to alternate servers one at a time.
Valid Values
1|0
Behavior
If set to 1 (Enabled), the driver attempts parallel connections to all failover IP addresses in an Availability Group
when the connection is broken or the listener IP address is unavailable. The first IP address to successfully
respond to the request is used for the connection. This setting is only supported when your environment is
configured for Always On Availability Groups.
If set to 0 (Disabled), the driver uses the failover method specified by the Failover Mode connection option
when the primary server is unavailable. Use this setting if your environment is not configured for Always On
Availability Groups.
Notes
• When MultiSubnetFalover is enabled, the virtual network name (VNN) of the availability group listener must
be specified by the Host Name connection option.
• When MultiSubnetFailover is enabled, the Alternate Servers, Load Balancing, and Failover Preconnect
connection options are disabled.
520 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
Default
0 (Disabled)
GUI Tab
Failover tab
Packet Size
Attribute
PacketSize (PS)
Purpose
Determines the number of bytes for each database protocol packet that is transferred from the database server
to the client machine. Adjusting the packet size can improve performance. The optimal value depends on the
typical size of data that is inserted, updated, or returned by the application and the environment in which it is
running. Typically, larger packet sizes work better for large amounts of data. For example, if an application
regularly returns character values that are 10,000 characters in length, using a value of 32 (16 KB) typically
results in improved performance.
Valid Values
-1 | 0 | x
Behavior
If set to -1, the driver uses the maximum packet size that is set by the database server.
If set to 0, the driver uses the default packet size that is used by the database server.
If set to x, an integer from 1 to 127, the driver uses a packet size that is a multiple of 512 bytes. For example,
PacketSize=8 means to set the packet size to 8 * 512 bytes (4096 bytes).
Notes
• If SSL encryption is used, the driver must use the packet size that is specified by the server. Any value set
for this option or the SQL_PACKET_SIZE connect option is ignored if SSL encryption is used.
• The ODBC connection option SQL_PACKET_SIZE provides the same functionality as the Packet Size
option; however SQL_PACKET SIZE and the Packet Size option are mutually exclusive. If Packet Size is
specified, the driver returns the message Driver Not Capable if an application attempts to call
SQL_PACKET_SIZE. If you do not set the Packet Size option, application calls to SQL_PACKET_SIZE are
accepted by the driver.
Default
-1
GUI Tab
Advanced tab
See also
Performance Considerations on page 533
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 521
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Password
Attribute
Password (PWD)
Purpose
The password that the application uses to connect to your database. The Password option cannot be specified
through the driver Setup dialog box and should not be stored in a data source. It is specified through the Logon
dialog box or a connection string.
Valid Values
pwd
where:
pwd
is a valid password.
Default
None
GUI Tab
n/a
Port Number
Attribute
PortNumber (PORT)
Purpose
The port number of the server listener.
Valid Values
port_name
where:
port_name
is the port number of the server listener. Check with your database administrator for the correct
number.
Default
1433
522 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
GUI Tab
General tab
PRNGSeedFile
Attribute
PRNGSeedFile (PSF)
Purpose
Specifies the absolute path for the entropy-source file or device used as a seed for SSL key
generation.
Valid Values
string | RANDFILE
where:
string
is the absolute path for the entropy-source file or device that seeds the random number generator
used for TLS/SSL key generation.
Behavior
If set to string, the specified entropy-source file or device seeds the random number generator used for
TLS/SSL key generation. Entropy levels and behavior may vary for different files and devices. See the following
section for a list of commonly used entropy sources and their behavior.
If set to RANDFILE, the RAND_file_name() function in your application generates a default path for the
random seed file. The seed file is $RANDFILE if that environment variable is set; otherwise, it is $HOME/.rnd.
If $HOME is not set either, an error occurs.
/dev/random
is a pseudorandom number generator (blocking) that creates a seed from random bits of environmental
noise it collects in an entropy pool. When there is insufficient noise in the pool, the file blocks calls
until enough noise is collected. This provides more secure SSL key generation, but at the expense
of blocked calls.
/dev/urandom
is a pseudorandom number generator (non-blocking) that creates seeds from random bits from
environmental noise it collects in an entropy pool. When there is insufficient noise in the pool, the
file reuses bits from the pool instead of blocking calls. This eliminates potential delays associated
with blocked calls, but may result in less secure TLS/SSL key generation.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 523
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
/dev/hwrng
is a hardware random number generator. The behavior is dependent on the device used in your
environment.
Notes
• This option is ignored when TLS/SSL is disabled (EncryptionMethod=0) or the seed source is set to Poll
Only (PRNGSeedSource=1).
• For processes that employ multiple TLS/SSL-enabled drivers, the behavior of this option for all drivers is
determined by the values specified for the driver that first connects to the process and loads the OpenSSL
library. Since the OpenSSL library loads only once per process, the values specified for drivers that
subsequently connect are ignored. To ensure that the correct security settings are used, we recommend
configuring this option identically for all drivers used in a process.
Default
/dev/random
GUI tab
NA
See also
PRNGSeedSource on page 524
PRNGSeedSource
Attribute
PRNGSeedSource (PSS)
Purpose
Specifies the source of the seed the driver uses for TLS/SSL key generation. Seeds are a
pseudorandom or random value used to set the initial state of the random number generator used to generate
TLS/SSL keys. Using seeds with a higher level of entropy, or randomness, provides a more secure transmission
of data encrypted using TLS/SSL.
Valid Values
0|1
Behavior
If set to 0 (File), the driver uses entropy-source file or device specified in the PRNGSeedFile connection option
as the seed used for TLS/SSL key generation.
If set to 1 (Poll Only) , the driver uses the RAND_poll function in TLS/SSL to create the seed used for TLS/SSL
key generation.
524 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
Notes
• For processes that employ multiple TLS/SSL-enabled drivers, the behavior of this option for all drivers is
determined by the values specified for the driver that first connects to the process and loads the OpenSSL
library. Since the OpenSSL library loads only once per process, the values specified for drivers that
subsequently connect are ignored. To ensure that the correct security settings are used, we recommend
configuring this option identically for all drivers used in a process.
• This option is ignored when TLS/SSL is disabled (EncryptionMethod=0)
Default
0 (File)
GUI Tab
NA
See also
PRNGSeedFile on page 523
Query Timeout
Attribute
QueryTimeout (QT)
Purpose
The number of seconds for the default query timeout for all statements that are created by a connection. To
override the value set by this connection option for an individual statement, set a different value in the
SQL_ATTR_QUERY_TIMEOUT statement attribute on the SQLSetStmtAttr() function.
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, the query does not time out. The driver silently ignores the SQL_ATTR_QUERY_TIMEOUT attribute.
If set to 0, the query does not time out, but the driver responds to the SQL_ATTR_QUERY_TIMEOUT attribute.
If set to x, all queries time out after the specified number of seconds unless the application overrides this value
by setting the SQL_ATTR_QUERY_TIMEOUT attribute.
Default
0
GUI Tab
Advanced tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 525
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Record Delimiter
Attribute
BulkLoadRecordDelimiter (BLRD)
Purpose
Specifies the character that the driver will use to delimit the record entries in a bulk load data file.
Valid Values
x
where:
For simplicity, avoid using a value that can be in the data, including all alphanumeric characters, the dash(-),
the colon(:), the period (.), the forward slash (/), the space character, the single quote (') and the double quote
("). You can use some of these characters as delimiters if all of the data in the file is contained within double
quotes.
Notes
• The Bulk Load Record Delimiter character must be different from the Bulk Load Field Delimiter.
Default
None
GUI Tab
Bulk tab
Attribute
ReportCodepageConversionErrors (RCCE)
Purpose
Specifies how the driver handles code page conversion errors that occur when a character cannot be converted
from one character set to another.
An error message or warning can occur if an ODBC call causes a conversion error, or if an error occurs during
code page conversions to and from the database or to and from the application. The error or warning generated
is Code page conversion error encountered. In the case of parameter data conversion errors, the
driver adds the following sentence: Error in parameter x, where x is the parameter number. The standard
rules for returning specific row and column errors for bulk operations apply.
Valid Values
0|1|2
526 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
Behavior
If set to 0 (Ignore Errors), the driver substitutes 0x1A for each character that cannot be converted and does
not return a warning or error.
If set to 1 (Return Error), the driver returns an error instead of substituting 0x1A for unconverted characters.
If set to 2 (Return Warning), the driver substitutes 0x1A for each character that cannot be converted and returns
a warning.
Default
0 (Ignore Errors)
GUI Tab
Advanced tab
SSLLibName
Attribute
SSLLibName (SLN)
Purpose
The absolute path for the OpenSSL library file containing the TLS/SSL library to be used by the data source
or connection when TLS/SSL is enabled. The SSL library contains the implementations of TLS/SSL protocols
the driver uses for data encryption.
This option allows you to designate a different SSL library if you encounter issues with the default version or
want to use a library that you provide. Common issues that require designating a different library include security
vulnerabilities with specific libraries or compatibility issues with your server or application.
Valid Values
absolute_path\openssl_filename
where:
absolute_path
openssl_filename
is the name of the OpenSSL library file containing the TLS/SSL Library to be used by your data
source or connection.
Example
C:\Program Files\Progress\DataDirect\Connect64_for_ODBC_71\
Drivers\OpenSSL\1.0.0r\ddssl27.dll; (64-bit Windows)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 527
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Notes
• The OpenSSL library files provided by Progress combine the cryptographic and TLS/SSL libraries into a
single file; therefore, when your drivers are using a Progress library file, the values specified for the
CryptoLibName and SSLLibName options should be the same. For non-Progress library files, the libraries
may use separate files, which would require unique values to be specified.
• This option can be used to designate OpenSSL libraries not installed by the product; however, the drivers
are only certified against libraries provided by Progress.
Default
No default value
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
SSLLibName=C:\Program Files\Progress\DataDirect\
Connect64_for_ODBC_71\Drivers\OpenSSL\1.0.0r\ddssl27.dll;
See Advanced tab for details.
See also
CryptoLibName on page 503
Attribute
KeepAlive (KA)
Purpose
Specifies whether the driver enables TCPKeepAlive. TCPKeepAlive maintains idle TCP connections by
periodically passing packets between the client and server. If either the client or server does not respond to a
packet, the connection is considered inactive and is terminated. In addition, TCPKeepAlive prevents valid idle
connections from being disconnected by firewalls and proxies by maintaining network activity.
Valid Values
0|1
Behavior
If set to 0 (Disabled), the driver does not enable TCPKeepAlive.
If set to 1 (Enabled), the driver enables TCPKeepAlive.
Default
0 (Disabled)
GUI Tab
Advanced tab
528 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
Trust Store
Attribute
Truststore (TS)
Purpose
The directory that contains the truststore file and the truststore file name to be used when SSL is enabled
(Encryption Method=1) and server authentication is used. The truststore file contains a list of the valid Certificate
Authorities (CAs) that are trusted by the client machine for SSL server authentication. If you do not specify a
directory, the current directory is used
Valid Values.
truststore_directory\filename
where:
truststore_directory
filename
Default
None
GUI Tab
Security tab
Attribute
TruststorePassword (TSP)
Purpose
The password that is used to access the truststore file when SSL is enabled (Encryption Method=1) and server
authentication is used. The truststore file contains a list of the Certificate Authorities (CAs) that the client trusts.
Valid Values
truststore_password
where:
truststore_password
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 529
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Notes
• The truststore and keystore files may be the same file; therefore, they may have the same password.
Default
None
GUI Tab
Security tab
Attribute
SnapshotSerializable (SS)
Purpose
Allows your application to use the snapshot isolation level if your Microsoft SQL Server database is configured
for Snapshot isolation. Supported only for Microsoft SQL Server 2005 and higher.
See Using The Snapshot Isolation Level on page 540 for details about using the snapshot isolation level.
Valid Values
0|1
Behavior
When set to 1 (Enabled) and your application has the transaction isolation level set to serializable, the application
uses the snapshot isolation level.
When set to 0 (Disabled) and your application has the transaction isolation level set to serializable, the application
uses the serializable isolation level.
This option is useful for existing applications that set the isolation level to serializable. Using Snapshot
Transactions in this case allows you to change to the snapshot isolation level with no or minimum code changes.
If developing a new application, you can code it to set the connection attribute SQL_COPT_SS_TXN_ISOLATION
to the value SQL_TXN_SS_SNAPSHOT.
Notes
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Advanced tab
See Also
See Performance Considerations on page 533 for details.
530 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
User Name
Attribute
LogonID (UID)
Purpose
The default user ID that is used to connect to your database. Your ODBC application may override this value
or you may override it in the logon dialog box or connection string.
Valid Values
userid
where:
userid
Default
None
GUI Tab
Security tab
Attribute
ValidateServerCertificate (VSC)
Purpose
Determines whether the driver validates the certificate that is sent by the database server when SSL encryption
is enabled (Encryption Method=1). When using SSL server authentication, any certificate sent by the server
must be issued by a trusted Certificate Authority (CA). Allowing the driver to trust any certificate returned from
the server even if the issuer is not a trusted CA is useful in test environments because it eliminates the need
to specify truststore information on each client in the test environment.
Truststore information is specified using the Trust Store and Trust Store Password options.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver validates the certificate that is sent by the database server. Any certificate from
the server must be issued by a trusted CA in the truststore file. If the Host Name In Certificate option is specified,
the driver also validates the certificate using a host name. The Host Name In Certificate option provides
additional security against man-in-the-middle (MITM) attacks by ensuring that the server the driver is connecting
to is the server that was requested.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 531
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
If set to 0 (Disabled), the driver does not validate the certificate that is sent by the database server. The driver
ignores any truststore information specified by the Trust Store and Trust Store Password options.
Default
1 (Enabled)
GUI Tab
Security tab
Workstation ID
Attribute
WorkstationID (WSID)
Purpose
The workstation ID that is used by the client.
Valid Values
string
where:
string
Default
None
GUI Tab
Advanced tab
Attribute
XMLDescribeType (XDT)
Purpose
The SQL data type that is returned by SQLGetTypeInfo for the XML data type.
See Using the XML Data Type on page 536 for further information about the XML data type.
Valid Values
-4 | -10
532 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
Behavior
If set to -4 (SQL_LONGVARBINARY), the driver uses the description SQL_LONGVARBINARY for columns
that are defined as the XML data type.
If set to -10 (SQL_WLONGVARCHAR), the driver uses the description SQL_WLONGVARCHAR for columns
that are defined as the XML data type.
Default
-10
GUI Tab
Advanced tab
Performance Considerations
The following connection options can enhance driver performance.
Connection Pooling (Pooling): If you enable the driver to use connection pooling, you can set additional
options that affect performance:
• Load Balance Timeout (LoadBalanceTimeout): You can define how long to keep connections in the pool.
The time that a connection was last used is compared to the current time and, if the timespan exceeds the
value of the Load Balance Timeout option, the connection is destroyed. The Min Pool Size option can cause
some connections to ignore this value.
• Connection Reset (ConnectionReset): Resetting a re-used connection to the initial configuration settings
impacts performance negatively because the connection must issue additional commands to the server.
• Max Pool Size (MaxPoolSize): Setting the maximum number of connections that the pool can contain too
low might cause delays while waiting for a connection to become available. Setting the number too high
wastes resources.
• Min Pool Size (MinPoolSize): A connection pool is created when the first connection with a unique
connection string connects to the database. The pool is populated with connections up to the minimum pool
size, if one has been specified. The connection pool retains this number of connections, even when some
connections exceed their Load Balance Timeout value.
Enable Bulk Load (EnableBulkLoad): If your application performs bulk loading of data, you can improve
performance by configuring the driver to use the database system's bulk load functionality instead of database
array binding. The trade-off to consider for improved performance is that using the bulk load functionality can
bypass data integrity constraints.
Encryption Method (EncryptionMethod): Data encryption may adversely affect performance because of the
additional overhead (mainly CPU usage) that is required to encrypt and decrypt data.
Failover Mode (FailoverMode): Although high availability that replays queries after a failure provides increased
levels of protection, it can adversely affect performance because of increased overhead.
Packet Size (PacketSize): Typically, it is optimal for the client to use the maximum packet size that the database
server allows. This reduces the total number of round trips required to return data to the client, thus improving
performance. Therefore, performance can be improved if the PacketSize attribute is set to the maximum packet
size of the server.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 533
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Use Snapshot Transactions (SnapshotSerializable): You must have your Microsoft SQL Server 2005 and
higher database configured for snapshot isolation for this connection option to work. Snapshot Isolation provides
transaction-level read consistency and an optimistic approach to data modifications by not acquiring locks on
data until data is to be modified. This Microsoft SQL Server 2005 and higher feature can be useful if you want
to consistently return the same result set even if another transaction has changed the data and 1) your application
executes many read operations or 2) your application has long running transactions that could potentially block
users from reading data. This feature has the potential to eliminate data contention between read operations
and update operations. When this connection option is enabled, performance is improved due to increased
concurrency.
See Using The Snapshot Isolation Level on page 540 for details.
Data Types
The following table shows how the Microsoft SQL Server and Windows Azure SQL Database data types are
mapped to the standard ODBC data types. Unicode Support on page 535 lists Microsoft SQL Server to Unicode
data type mappings.
binary SQL_BINARY
bigint SQL_BIGINT
bit SQL_BIT
char SQL_CHAR
33
date SQL_TYPE_DATE
datetime SQL_TYPE_TIMESTAMP
33
datetime2 SQL_TYPE_TIMESTAMP
decimal SQL_DECIMAL
float SQL_FLOAT
image SQL_LONGVARBINARY
int SQL_INTEGER
money SQL_DECIMAL
33
Supported only on Microsoft SQL Server 2008 and higher.
534 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
numeric SQL_NUMERIC
real SQL_REAL
smalldatetime SQL_TYPE_TIMESTAMP
smallint SQL_SMALLINT
smallmoney SQL_DECIMAL
text SQL_LONGVARCHAR
33, 34
time SQL_TYPE_TIMESTAMP
timestamp SQL_BINARY
tinyint SQL_TINYINT
uniqueidentifier SQL_GUID
varbinary SQL_VARBINARY
35
varbinary(max) SQL_LONGVARBINARY
varchar SQL_VARCHAR
35
varchar(max) SQL_LONGVARCHAR
See Retrieving Data Type Information on page 72 for information about retrieving data types.
Unicode Support
The SQL Server Wire Protocol driver maps the Microsoft SQL Server and Windows Azure SQL Database data
types to Unicode data types as shown in the following table:
34
Time mapping changes based on the setting of the Fetch TWFS as Time option.
35
Supported only on Microsoft SQL Server 2005 and higher.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 535
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Table 35: Mapping Microsoft SQL Server and Windows Azure SQL Database Data Types to Unicode
Data Types
nchar SQL_WCHAR
ntext SQL_WLONGVARCHAR
nvarchar SQL_WVARCHAR
38
nvarchar(max) SQL_WLONGVARCHAR
sysname SQL_WVARCHAR
38
xml SQL_WLONGVARCHAR
The driver supports the Unicode ODBC W (Wide) function calls, such as SQLConnectW. This allows the Driver
Manager to transmit these calls directly to the driver. Otherwise, the Driver Manager would incur the additional
overhead of converting the W calls to ANSI function calls, and vice versa.
See UTF-16 Applications on UNIX and Linux on page 137 for related details.
Also, refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers
Reference for a more detailed explanation of Unicode.
Advanced Features
The driver supports the following advanced features:
• Failover
• Security
• Connection Pooling
• DataDirect Bulk Load
36
Supported only for Microsoft SQL Server 2008 and higher, and Windows Azure SQL Database.
37
Datetimeoffset mapping changes based on the setting of the Fetch TSWTZ as Timestamp option.
38
nvarchar(max) and xml are supported for Microsoft SQL Server 2005 and higher.
536 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
Failover
The driver supports failover and its related connection options. Failover connection options are located on the
Failover tab of the driver Setup dialog box. See Using Failover on page 78 for a general description of failover
and its implementation.
Security
The driver supports authentication and encryption. Security connection options are located on the Security tab
of the driver Setup dialog box. See Using Security on page 89 for a general description of security and its
implementation.
Authentication
If you are using Kerberos, verify that your environment meets the requirements listed in the following table
39
before you configure the driver for Kerberos authentication.
Table 36: Kerberos Authentication Requirements for the SQL Server Wire Protocol Driver
Component Requirements
Microsoft SQL Server The database server must be administered by the same domain controller that
database server administers the client and must be running one of the following databases:
Kerberos server The Kerberos server is the machine where the user IDs for authentication are
administered. The Kerberos server is also the location of the Kerberos KDC.
Network authentication must be provided by Windows Active Directory on
Windows Server 2008 or higher.
Client The client must be administered by the same domain controller that administers
the database server.
39
Not supported for Microsoft Windows Azure for SQL Database. You must provide credentials every time when you connect to
SQL Database.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 537
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Note: For testing purposes, you can disable the truststore requirement by setting the Validate Server
Certificate to 0 (disabled). Disabling the Validate Server Certificate option leaves your connection vulnerable
to man-in-the-middle attacks; therefore, it is not recommended for extended use.
• Set the Host Name In Certificate option to specify the host name for SSL certificate validation. For example,
*.database.windows.net.
• Set the User Name option to specify your Active Directory username using the [email protected]
format.
• Set the Password option to specify your Active Directory password.
• Specify values for minimum required options for establishing a connection:
• Set the Host Name option to specify either the IP address in IPv4 or IPv6 format, or the server name for
your Azure server. For example, your_server.database.windows.net.
• Set the Port Number option to specify the TCP port of the primary database server that is listening for
connections to the database.
• Set Database option to specify the name of the database to which you want to connect.
• If using data sources, set the Data Source Name to specify the name of your data source.
For example, the following is a DSN-less connection string with only the required options for making a connection
using Azure AD authentication:
DRIVER={DataDirect 7.1 SQL Server Wire Protocol};AM=13;DB=SQLSdb1;
HOST=myserver.database.windows.net;HNIC=*.database.windows;PORT=1433;
TS=\<truststore_path>\ca-bundle.crt;VSC=1;[email protected];PWD=secret;
The following example demonstrates a data source definition in the odbc.ini file with only the required options
for making a connection using Azure AD authentication:
See also
Authentication Method on page 494
Trust Store on page 529
Host Name In Certificate on page 514
User Name on page 531
538 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
Connection Pooling
The driver supports connection pooling and its related connection options. Connection pooling connection
options are located on the Pooling tab of the driver Setup dialog box. See Using DataDirect Connection Pooling
on page 97 for a general description of connection pooling and its implementation.
Limitations
• A bulk operation is not allowed in a manual transaction if it is not the first event.
• Once a bulk operation is started, any non-bulk operation is disallowed until the transaction is committed.
• Because of Oracle limitations, issuing a SELECT statement to determine a row count may return different
results before and after a bulk load operation.
• Snapshot
• Read Committed with Snapshots
• Read Committed with Locks (equivalent to Read Committed in previous Microsoft SQL Server versions)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 539
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Refer to "Locking and isolation levels" in the Progress DataDirect for ODBC Drivers Reference for details.
SQL Support
The driver supports the core SQL grammar.
• SQLForeignKeys
• SQLTablePrivileges
• SQLDescribeParam
• SQLColumnPrivileges
Refer to "ODBC API and scalar functions" in the Progress DataDirect for ODBC Drivers Reference for a list of
supported API functions.
540 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Wire Protocol Driver
• No support for unquoted identifiers. The driver always enforces ANSI rules regarding quotation marks for
all ADW and APS connections (EnabledQuotedIdentifiers=1); therefore, the Enable Quoted Identifiers
option is disabled.
• No support for connection pooling reauthentication.
• No support for Data Definition Language (DDL) queries within transactions.
• No support for closing holdable cursors when a transaction is committed.
• No support for server side cursors; therefore:
• Scroll-sensitive result sets are not supported.
• The driver always disables server side cursors.
• Support for the varchar(max), nvarchar(max), varbinary(max) data types is limited to Heap and Clustered
Index Tables.
• No support for the following SQL Server data types:
decimal() identity timestamp
image tinyint() identity
numeric() identity ntext
smallint identity xml
text
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 541
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
CEILING PI TAN
COS POWER TRUNCATE
COT (ADW only) RADIANS
DEGREES RAND
• Support for scalar date and time functions is limited to the following functions:
CURDATE DAYOFWEEK QUARTER
CURRENT_DATE DAYOFYEAR SECOND
CURRENT_TIME HOUR WEEK
CURTIME MINUTE YEAR
DAYNAME MONTH
DAYOFMONTH MONTHNAME
Refer to "Scalar functions" in the Progress DataDirect for ODBC Drivers Reference for more information.
See also
Enable Quoted Identifiers on page 506
Isolation and Lock Levels Supported on page 539
Driver Requirements
The driver has no client requirements.
542 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
On Windows, data sources are stored in the Windows Registry. You can configure and modify data sources
through the ODBC Administrator using a driver Setup dialog box, as described in this section.
On UNIX and Linux, data sources are stored in the odbc.ini file. On Linux, you can configure and
modify data sources through the Linux ODBC Administrator using a driver Setup dialog box, as described in
this section.
Note: This book shows dialog box images that are specific to Windows. If you are using the drivers in the
Linux environment, the dialog box that you see may differ slightly from the Windows version. Windows-only
and UNIX-only connection options are specifically noted by icons in the Setup dialog box descriptions.
When the driver is first installed, the values of its connection options are set by default. These values appear
on the driver Setup dialog box tabs when you create a new data source. You can change these default values
by modifying the data source. In the following procedure, the description of each tab is followed by a table that
lists the connection options for that tab and their initial default values. This table links you to a complete
description of the options and their connection string attribute equivalents. The connection string attributes are
used to override the default values of the data source if you want to change these values at connection time.
To configure a Sybase data source:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 543
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
• On Windows, start the ODBC Administrator by selecting its icon from the Progress DataDirect
program group.
2. Select a tab:
• User DSN: If you are configuring an existing user data source, select the data source name and click
Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the driver
and click Finish to display the driver Setup dialog box.
• System DSN: If you are configuring an existing system data source, select the data source name
and click Configure to display the driver Setup dialog box.
If you are configuring a new system data source, click Add to display a list of installed drivers. Select
the driver and click Finish to display the driver Setup dialog box.
• File DSN: If you are configuring an existing file data source, select the data source file and click Configure
to display the driver Setup dialog box.
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select
a driver. Click Advanced if you want to specify attributes; otherwise, click Next to proceed. Specify a
name for the data source and click Next. Verify the data source information; then, click Finish to display
the driver Setup dialog box.
544 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
Note: The General tab displays the only fields that are required for creating a data source. The fields on
all other tabs are optional, unless noted otherwise.
3. On this tab, provide values for the options in the following table; then, click Apply. The table provides links
to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 545
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
4. Optionally, click the Advanced tab to specify additional data source settings.
Figure 52: Advanced tab
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
Default Buffer Size for Long/LOB Columns (in Kb) on page 576 1024
546 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
Extended Options: Type a semi-colon separated list of connection options and their values. Use this
configuration option to set the value of undocumented connection options that are provided by Progress
DataDirect customer support. You can include any valid connection option in the Extended Options string,
for example:
Database=Server1;UndocumentedOption1=value[;UndocumentedOption2=value;]
If the Extended Options string contains option values that are also set in the setup dialog or data source,
the values of the options specified in the Extended Options string take precedence. However, connection
options that are specified on a connection string override any option value specified in the Extended Options
string.
Note: Do not specify the Extended Options configuration option in a connection string, or the driver will
return an error. Instead, applications should specify the individual undocumented connection options in the
connection string.
Translate: Click Translate to display the Select Translator dialog box, which lists the translators
specified in the ODBC Translators section of the Registry. Progress DataDirect provides a translator named
OEM to ANSI that translates your data from the IBM PC character set to the ANSI character set.
Select a translator; then, click OK to close this dialog box.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 547
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
5. Optionally, click the Security tab to specify security data source settings.
Figure 53: Security tab
See Using Security on page 89 for a general description of authentication and encryption and their
configuration requirements.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
548 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 549
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
7. Optionally, click the Performance tab to specify performance data source settings.
Figure 55: Performance tab
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
550 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
8. Optionally, click the Failover tab to specify failover data source settings.
Figure 56: Failover tab
See Using Failover on page 78 for a general description of failover and its related connection options.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 551
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
9. Optionally, click the Pooling tab to specify connection pooling data source settings.
Figure 57: Pooling tab
See Using DataDirect Connection Pooling on page 97 for a general description of connection pooling.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
552 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
10. Optionally, click the Bulk tab to specify DataDirect Bulk Load data source settings.
Figure 58: Bulk tab
See Using DataDirect Bulk Load on page 101 for a general description of DataDirect Bulk Load.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
If your application is already coded to use parameter array batch functionality, you can leverage DataDirect
Bulk Load features through the Enable Bulk Load connection option. Enabling this option automatically
converts the parameter array batch operation to use the database bulk load protocol.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 553
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
If you are not using parameter array batch functionality, you can export data to a bulk load data file, verify
the metadata of the bulk load configuration file against the structure of the target table, and bulk load data
to a table. Use the following steps to accomplish these tasks.
a) To export data from a table to a bulk load data file, click Export Table from the Bulk tab. The Export
Table dialog box appears.
Figure 59: ODBC Sybase Wire Protocol Export Table Driver Setup dialog box
Table Name: A string that specifies the name of the source database table containing the data to be
exported.
Export Filename: A string that specifies the path (relative or absolute) and file of the bulk load data file
to which the data is to be exported. It also specifies the file name of the bulk configuration file. The file
name must be the fully qualified path to the bulk data file. These files must not already exist; if one of
both of them already exists, an error is returned.
Log Filename: A string that specifies the path (relative or absolute) and file name of the bulk log file.
The log file is created if it does not exist. Events logged to this file are:
554 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
The default value on Windows is the current code page of the machine. On UNIX/Linux, the default value
is 4 (ISO 8559-1 Latin-1).
Click Export Table to connect to the database and export data to the bulk data file or click Cancel.
b) To verify the metadata of the bulk load configuration file against the structure of the target database
table, click Verify from the Bulk tab. See Verification of the Bulk Load Configuration File on page 106 for
details. The Verify dialog box appears.
Figure 60: ODBC Sybase Wire Protocol Verify Driver Setup dialog box
Table Name: A string that specifies the name of the target database table into which the data is to be
loaded.
Configuration Filename: A string that specifies the path (relative or absolute) and file name of the bulk
configuration file.
Click Verify to verify table structure or click Cancel.
c) To bulk load data from the bulk data file to a database table, click Load Table from the Bulk tab. The
Load File dialog box appears.
Figure 61: ODBC Sybase Wire Protocol Load File Driver Setup dialog box
Table Name: A string that specifies the name of the target database table into which the data is loaded.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 555
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Load Data Filename: A string that specifies the path (relative or absolute) and file name of the bulk data
file from which the data is loaded.
Configuration Filename: A string that specifies the path (relative or absolute) and file name of the bulk
configuration file..
Log Filename: A string that specifies the path (relative or absolute) and file name of the bulk log file.
Specifying a value for Log Filename creates the file if it does not already exist. Events logged to this file
are:
556 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
11. At any point during the configuration process, you can click Test Connect to attempt to connect to the data
source using the connection options specified in the driver Setup dialog box. A logon dialog box appears
(see Using a Logon Dialog Box (Sybase) on page 558 for details). Note that the information you enter in the
logon dialog box during a test connect is not saved.
• If the driver can connect, it releases the connection and displays a Connection Established message.
Click OK.
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message. Click OK.
Note: If you are configuring alternate servers for use with the connection failover feature, be aware that
the Test Connect button tests only the primary server, not the alternate servers.
12. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
DSN=data_source_name[;attribute=value[;attribute=value]...]
FILEDSN=filename.dsn[;attribute=value[;attribute=value]...]
The DSN-less connection string specifies a driver instead of a data source. All connection information must be
entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
Connection Option Descriptions for Sybase Wire Protocol on page 558 lists the long and short names for each
attribute, as well as the initial default value when the driver is first installed. You can specify either long or short
names in the connection string.
An example of a DSN connection string with overriding attribute values for Sybase is:
DSN=SYB TABLES;DB=PAYROLL;UID=JOHN;PWD=XYZZY
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 557
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
1. In the Network Address field, specify an IP address for the Sybase server as follows: IP
address,port_number. For example, you might enter 199.226.224.34,5000. If your network supports
named servers, you can specify an address as: servername,port_number. For example, you might enter
Sybaseserver,5000.
The IP address can be specified in either IPv4 or IPv6 format, or a combination of the two. See Using IP
Addresses on page 67 for details concerning these formats.
Note: If you are connecting through the Test Connect button of the Setup dialog box, only the default
database specified on the General tab of the Setup dialog box is available in the Database drop-down list.
The database names specified on the Connection tab are not available.
5. Click OK to complete the logon and to update the values in the Registry.
558 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
Also, a few connection string attributes, for example, Password, do not have equivalent options that appear
on the GUI. They are in the list of descriptions alphabetically by their attribute names.
The following table lists the connection string attributes supported by the Sybase Wire Protocol driver.
ArraySize (AS) 50
BulkBinaryThreshold (BBT) 32
BulkCharacterThreshold (BCT) -1
ConnectionRetryCount (CRC) 0
ConnectionRetryDelay (CRD) 3
CursorCacheSize (CCS) 1
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 559
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
FetchTWFSasTime (FTWFSAT) 1
Language None
LoadBalancing (LB) 0
LoginTimeout (LT) 15
MinPoolSize (MNPS) 0
560 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
PacketSize (PS) 0
QueryTimeout (QT) 0
AllowedOpenSSLVersions
Attribute
AllowedOpenSSLVersions (AOV)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 561
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
Important: Version 1.0.2 of the OpenSSL library has reached the end of its product life cycle and is no longer
receiving security updates. Best security practices dictate that you use the latest version of the library.
Determines which version of the OpenSSL library file the driver uses for data encryption. Although the latest
version of the OpenSSL library is the most secure, some characteristics of the library can cause connections
to certain databases to fail. This option allows you to continue using older versions of the OpenSSL library
while you transition your environment to support the latest version.
Valid Values
latest | openssl_version_number[[,openssl_version_number]...]
where:
openssl_version_number
is the version number for the OpenSSL library file to be loaded by the driver, for example, 1.0.2.
When more than one version is specified, the driver will first attempt to load the first version listed.
If the driver is unable to locate and load this file, it will attempt to load the next version in the value.
The driver currently supports versions 1.1.1 and 1.0.2. Refer to the installed readme for latest
supported versions.
Behavior
If set to latest, the driver loads the latest installed version of the OpenSSL library file provided by Progress.
If set to openssl_version_number, the driver loads the specified version of the OpenSSL library file. This
value is used to specify a version other than the latest.
Notes
• This option is ignored if OpenSSL library files are specified using the CryptoLibName and SSLLibName
options.
• This option works only with OpenSSL library files provided by Progress and user supplied OpenSSL library
files that match Progress's naming convention and installation location.
• This option works only for installations using the default directory structure.
• Consult your database administrator concerning the security settings of your server.
Default
1.1.1,1.0.2
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
AllowedOpenSSLVersions=1.0.2
See also
Advanced tab
562 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
Alternate Servers
Attribute
AlternateServers (ASRV)
Purpose
A list of alternate database servers to which the driver tries to connect if the primary database server is
unavailable. Specifying a value for this option enables connection failover for the driver. The value you specify
must be in the form of a string that defines the physical location of each alternate server. All of the other required
connection information for each alternate server is the same as what is defined for the primary server connection.
Valid Values
({NetworkAddress=addressvalue | InterfacesFileServerName=sectionvalue}[, ...])
Notes
• An alternate server address in IPv6 format must be enclosed in double quotation marks.
• The Alternate Servers option and the HA Failover Server Connection Information option are mutually
exclusive.
Example
The following example Alternate Servers values define three alternate database servers for connection failover:
(InterfacesFileServerName=Accounting, NetworkAddress="255.125.1.11, 4200",
NetworkAddress="SybaseASE2, 4200")
In this example, the network address of the last two alternates contain commas. In this case, enclose the
network address with double quotation marks as shown.
Default
None
GUI Tab
Failover tab
Application Name
Attribute
ApplicationName (APP)
Purpose
The name used by Sybase to identify your application.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 563
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Valid Values
string
where:
string
Default
None
GUI Tab
Connection tab
Attribute
ApplicationUsingThreads (AUT)
Purpose
Determines whether the driver works with applications using multiple ODBC threads.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver works with single-threaded and multi-threaded applications.
If set to 0 (Disabled), the driver does not work with multi-threaded applications. If using the driver with
single-threaded applications, this value avoids additional processing required for ODBC thread-safety standards.
Notes
• This connection option can affect performance.
Default
1 (Enabled)
GUI Tab
Advanced tab
See Also
See Performance Considerations on page 607 for details.
564 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
Authentication Method
Attribute
AuthenticationMethod (AM)
Purpose
Specifies the method the driver uses to authenticate the user to the server when a connection is established.
If the specified authentication method is not supported by the database server, the connection fails and the
driver generates an error.
Valid Values
0|1|4
Behavior
If set to 0 (No Encryption), the driver sends the user ID and password in clear text to the server for authentication.
If set to 1 (Encrypt Password), the driver negotiates a secure login with the database server by sending an
encrypted password. The password is encrypted using Sybase Extended Password Encryption, Sybase
Extended Plus Encrypted Password, or Sybase proprietary encryption, depending on the response by the
server. Note that the proprietary Sybase password must contain characters from the 7-bit ASCII set.
If set to 4 (Kerberos Authentication), the driver uses Kerberos authentication. This method supports both
Windows Active Directory Kerberos and MIT Kerberos environments.
If the specified authentication method is not supported by the database server, the connection fails and the
driver generates an error.
Notes
• Sybase Extended Password Encryption and Sybase Extended Plus Encrypted Password, which use an
asymmetrical key type, provide stronger password encryption for the secure transmission of public key
passwords over networks than the proprietary encryption.
Default
0 (No Encryption)
GUI Tab
Security tab
Batch Size
Attribute
BulkLoadBatchSize (BLBS)
Purpose
The number of rows that the driver sends to the database at a time during bulk operations. This value applies
to all methods of bulk loading.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 565
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Valid Values
0|x
where
Notes
• This connection option can affect performance.
Default
1024
GUI Tab
Bulk tab
See Also
See Performance Considerations on page 607 for details.
Attribute
BulkBinaryThreshold (BBT)
Purpose
The maximum size, in KB, of binary data that is exported to the bulk data file.
Valid Values
-1 | 0 | x
where
Behavior
If set to -1, all binary data, regardless of size, is written to the bulk data file, not to an external file.
If set to 0, all binary data, regardless of size, is written to an external file, not the bulk data file. A reference to
the external file is written to the bulk data file.
If set to x, any binary data exceeding this specified number of KB is written to an external file, not the bulk data
file. A reference to the external file is written to the bulk data file.
Notes
• This connection option can affect performance.
566 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
Default
32
GUI Tab
Bulk tab
See Also
See Performance Considerations on page 607 for details.
Attribute
BulkCharacterThreshold (BCT)
Purpose
The maximum size, in KB, of character data that is exported to the bulk data file.
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, all character data, regardless of size, is written to the bulk data file, not to an external file.
If set to 0, all character data regardless of size, is written to an external file, not the bulk data file. A reference
to the external file is written to the bulk data file.
If set to x, any character data exceeding this specified number of KB is written to an external file, not the bulk
data file. A reference to the external file is written to the bulk data file.
Default
-1
GUI Tab
Bulk tab
Charset
Attribute
Charset (CS)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 567
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
The name of a character set installed on the Sybase server to be used by the driver.
This option is not a substitute for the IANAAppCodePage option. See IANAAppCodePage for details.
Valid Values
charset
where:
charset
Example
If your client needs to receive data in iso-8859-1 from a non-Unicode Sybase server, you would specify a value
of iso_1.
Default
None
GUI Tab
Connection tab
Attribute
CursorCacheSize (CCS)
Purpose
The number of connections that the connection cache can hold.
Valid Values
x
where:
is a positive integer representing the number of connections that the connection cache can hold.
To enable the connection cache, you must set the Select Method option to 1 (enabled). Increasing the connection
cache may increase performance of some applications but requires additional database resources.
Default
1
568 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
GUI Tab
Performance tab
Connection Pooling
Attribute
Pooling (POOL)
Purpose
Specifies whether to use the driver’s connection pooling.
Determines whether the driver works with applications using multiple ODBC threads.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses connection pooling.
If set to 0 (Disabled), the driver does not use connection pooling.
Notes
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Pooling tab
See Also
See Performance Considerations on page 607 for details.
Connection Reset
Attribute
ConnectionReset (CR)
Purpose
Determines whether the state of connections that are removed from the connection pool for reuse by the
application is reset to the initial configuration of the connection.
Valid Values
0|1
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 569
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Behavior
If set to 1 (Enabled), the state of connections removed from the connection pool for reuse by an application is
reset to the initial configuration of the connection. Resetting the state can negatively impact performance
because additional commands must be sent over the network to the server to reset the state of the connection.
If set to 0 (Disabled), the state of connections is not reset.
Notes
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Pooling tab
See Also
See Performance Considerations on page 607 for details.
Attribute
ConnectionRetryCount (CRC)
Purpose
The number of times the driver retries connection attempts to the primary database server, and if specified,
alternate servers until a successful connection is established.
This option and the Connection Retry Delay connection option, which specifies the wait interval between
attempts, can be used in conjunction with failover.
Valid Values
0|x
where:
Behavior
If set to 0, the driver does not try to connect after the initial unsuccessful attempt.
If set to x, the driver retries connection attempts the specified number of times. If a connection is not established
during the retry attempts, the driver returns an error that is generated by the last server to which it tried to
connect.
Default
0
570 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
GUI Tab
Failover tab
Attribute
ConnectionRetryDelay (CRD)
Purpose
Specifies the number of seconds the driver waits between connection retry attempts when Connection Retry
Count is set to a positive integer.
This option and the Connection Retry Count connection option can be used in conjunction with failover.
Valid Values
0|x
where:
Behavior
If set to 0, there is no delay between retries.
If set to x, the driver waits the specified number of seconds between connection retry attempts.
Default
3
GUI Tab
Failover tab
Attribute
CryptoProtocolVersion (CPV)
Purpose
Specifies a comma-separated list of the cryptographic protocols to use when SSL is enabled using the Encryption
Method connection option (EncryptionMethod=1). When multiple protocols are specified, the driver uses the
highest version supported by the server. If none of the specified protocols are supported by the database
server, driver behavior is determined by the Encryption Method connection option.
Valid Values
cryptographic_protocol [[, cryptographic_protocol ]...]
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 571
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
where:
cryptographic_protocol
Caution: Good security practices recommend using TLSv1 or higher, due to known vulnerabilities in the SSLv2
and SSLv3 protocols.
Example
If your security environment is configured to use TLSv1.2 and TLSv1.1, specify the following values:
CryptoProtocolVersion=TLSv1.2, TLSv1.1
Notes
• This option is ignored if Encryption Method is set to 0 - No Encryption.
• Consult your database administrator concerning the data encryption settings of your server.
Default
TLSv1.2,TLSv1.1,TLSv1
GUI Tab
Security tab
See also
Encryption Method on page 579
CryptoLibName
Attribute
CryptoLibName (CLN)
Purpose
The absolute path for the OpenSSL library file containing the cryptographic library to be used by the data source
or connection when TLS/SSL is enabled. The cryptograpic library contains the implementations of cryptographic
algorithms the driver uses for data encryption.
This option allows you to designate a different cryptographic library if you encounter issues with the default
version or want to use a library that you provide. Common issues that require designating a different library
include security vulnerabilities with specific libraries or compatibility issues with your server or application.
Valid Values
absolute_path\openssl_filename
where:
572 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
absolute_path
openssl_filename
is the name of the OpenSSL library file containing the cryptographic library to be used by your data
source or connection.
Example
C:\Progress\DataDirect\Connect64_for_ODBC_71\
Drivers\OpenSSL\1.0.0r\ddssl27.dll (64-bit Windows)
Notes
• The OpenSSL library files provided by Progress combine the cryptographic and TLS/SSL libraries into a
single file; therefore, when your drivers are using a Progress library file, the values specified for the
CryptoLibName and SSLLibName options should be the same. For non-Progress library files, the libraries
may use separate files, which would require unique values to be specified.
• This option can be used to designate OpenSSL libraries not installed by the product; however, the drivers
are only certified against libraries provided by Progress.
Default
Empty string
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
CryptoLibName=C:\Program Files\Progress\DataDirect\
Connect64_for_ODBC_71\Drivers\OpenSSL\1.0.0r\ddssl27.dll;
See Advanced tab for details.
See also
SSLLibName on page 601
Attribute
RaiseErrorPositionBehavior (REPB)
Purpose
Determines whether the driver returns raiserrors when the next statement is executed or handles them separately.
Valid Values
0|1
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 573
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Behavior
If set to 0 (Default), raiserrors are handled separately from surrounding statements. The error is returned when
a raiserror is processed (for example, resulting from SQLExecute, SQLExecDirect, or SQLMoreResults). The
result set is empty.
If set to 1 (Microsoft compatible), raiserrors are returned when the next statement is processed, and the cursor
is positioned on the first row of the subsequent result set. This could result in multiple raiserrors being returned
on a single execute.
Default
0 (Default)
GUI Tab
Advanced tab
Attribute
DataSourceName (DSN)
Purpose
Specifies the name of a data source in your Windows Registry or odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Database List
Attribute
n/a
Purpose
A list of database names that will appear in the drop-down list of the logon dialog box (see Using a Logon
Dialog Box (Sybase) on page 558 for a description).
574 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
Valid Values
database_list
where:
database_list
is a comma-separated list of database names that will appear in the drop-down list of the logon dialog
box.
Default
None
GUI Tab
Connection tab
Database Name
Attribute
Database (DB)
Purpose
Specifies the name of the database to which you want to connect.
Valid Values
database_name
where:
database_name
Default
None
GUI Tab
General tab
Description
Attribute
Description (n/a)
Purpose
Specifies an optional long description of a data source. This description is not used as a runtime connection
attribute, but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 575
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Valid Values
string
where
string
Default
None
GUI Tab
General tab
Attribute
DefaultLongDataBuffLen (DLDBL)
Purpose
The maximum length of data (in KB) the driver can fetch from long columns in a single round trip and the
maximum length of data that the driver can send using the SQL_DATA_AT_EXEC parameter.
This option also applies to binding long parameters in chunks. The driver truncates any data passed in a
Long/LOB SQL_DATA_AT_EXEC parameter to the size specified.
Valid Values
An integer in multiples of 1024
The value must be in multiples of 1024 (for example, 1024, 2048). You need to increase the default value if
the total size of any Long data exceeds 1 MB. This value is multiplied by 1024 to determine the total maximum
length of fetched data. For example, if you enter a value of 2048, the maximum length of data would be 1024
x 2048, or 2097152 (2 MB).
Notes
• This connection option can affect performance.
Default
1024
GUI Tab
Advanced tab
See Also
See Performance Considerations on page 607 for details.
576 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
Attribute
DistributedTransactionModel (DTM)
Purpose
The model to use for distributed transaction support. The driver supports two different models: XA Protocol
and Native OLE.
Valid Values
0|1
Specify the appropriate distributed transaction protocol, either 0 (XA Protocol) or 1 (Native OLE)
Default
0 (XA Protocol)
GUI Tab
Advanced tab
Attribute
EnableBulkLoad (EBL)
Purpose
Specifies the bulk load method.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses the database bulk load protocol when an application executes an INSERT
with multiple rows of parameter data. If the protocol cannot be used, the driver returns a warning.
If set to 0 (Disabled), the driver uses standard parameter arrays.
Notes
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Bulk tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 577
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
See Also
See Performance Considerations on page 607 for details.
Attribute
EnableDescribeParam (EDP)
Purpose
Determines whether the driver supports the SQLDescribeParam function, which allows an application to describe
parameters in SQL statements and in stored procedure calls.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver supports SQLDescribeParam. The Prepare Method option must be set to 0 or
1, and the SQL statement must not include long parameters. If using Microsoft Remote Data Objects (RDO)
to access data, you must use this value.
If set to 0 (Disabled), the driver does not support SQLDescribeParam.
Default
0 (Disabled)
GUI Tab
Advanced tab
Attribute
EnableQuotedIdentifiers (EQI)
Purpose
Determines whether the driver supports the use of quoted identifiers.
Valid Values
0|1
If set to 1 (Enabled), the driver supports the use of quoted identifiers. Double quotation marks (") must be used
to enclose identifiers, such as column and table names. Character strings must be enclosed in single quotation
marks, for example:
SELECT "au_id"
FROM "authors"
WHERE "au_lname" = 'O''Brien'
578 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
If set to 0 (Disabled), the driver does not support the use of quoted identifiers and generates an error when
quoted identifiers are encountered.
Default
0 (Disabled)
GUI Tab
Advanced tab
Encryption Method
Attribute
EncryptionMethod (EM)
Purpose
The method the driver uses to encrypt data sent between the driver and the database server. If the specified
encryption method is not supported by the database server, the connection fails and the driver returns an error.
Valid Values
0|1
Behavior
If set to 0 (No Encryption), data is not encrypted.
If set to 1 (SSL), data is encrypted using the SSL protocols specified in the Crypto Protocol Version connection
option.
This option can only be set to 1 when Authentication Method is set to 0 or 1.
Notes
• This connection option can affect performance.
Default
0 (No Encryption)
GUI Tab
Security tab
See Also
Crypto Protocol Version on page 571
Performance Considerations on page 607
Failover Granularity
Attribute
FailoverGranularity (FG)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 579
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
Determines whether the driver fails the entire failover process or continues with the process if errors occur
while trying to reestablish a lost connection.
This option applies only when Failover Mode is set to 1 (Extended Connection) or 2 (Select).
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
Valid Values
0|1|2|3
Behavior
If set to 0 (Non-Atomic), the driver continues with the failover process and posts any errors on the statement
on which they occur.
If set to 1 (Atomic) the driver fails the entire failover process if an error is generated as the result of anything
other than executing and repositioning a Select statement. If an error is generated as a result of repositioning
a result set to the last row position, the driver continues with the failover process, but generates a warning that
the Select statement must be reissued.
If set to 2 (Atomic Including Repositioning), the driver fails the entire failover process if any error is generated
as the result of restoring the state of the connection or the state of work in progress.
If set to 3 (Disable Integrity Check), the driver does not verify that the rows that were restored during the failover
process match the original rows. This value applies only when Failover Mode is set to 2 (Select).
Default
0 (Non-Atomic)
GUI Tab
Failover tab
Failover Mode
Attribute
FailoverMode (FM)
Purpose
Specifies the type of failover method the driver uses.
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
Valid Values
0|1|2
Behavior
If set to 0 (Connection), the driver provides failover protection for new connections only.
If set to 1 (Extended Connection), the driver provides failover protection for new and lost connections, but not
any work in progress.
580 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
If set to 2 (Select), the driver provides failover protection for new and lost connections. In addition, it preserves
the state of work performed by the last Select statement executed.
Notes
• This connection option can affect performance.
Default
0 (Connection)
GUI Tab
Failover tab
See Also
See Performance Considerations on page 607 for details.
Failover Preconnect
Attribute
FailoverPreconnect (FP)
Purpose
Specifies whether the driver tries to connect to the primary and an alternate server at the same time.
This attribute applies only when Failover Mode is set to 1 (Extended Connection) or 2 (Select) and at least one
alternate server is specified.
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
Valid Values
0|1
Behavior
If set to 0 (Disabled), the driver tries to connect to an alternate server only when failover is caused by an
unsuccessful connection attempt or a lost connection. This value provides the best performance, but your
application typically experiences a short wait while the failover connection is attempted.
If set to 1 (Enabled), the driver tries to connect to the primary and an alternate server at the same time. This
can be useful if your application is time-sensitive and cannot absorb the wait for the failover connection to
succeed.
Default
0 (Disabled)
GUI Tab
Failover tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 581
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Attribute
ArraySize (AS)
Purpose
The number of rows the driver retrieves from the server for a fetch. This is not the number of rows given to the
user. This connection option can affect performance.
Valid Values
x
where:
Notes
• This connection option can affect performance.
Default
50
GUI Tab
Performance tab
See Also
See Performance Considerations on page 607 for details.
Attribute
FetchTWFSasTime (FTWFSAT)
Purpose
Determines which ODBC data type the driver uses to return column values with the BIGTIME data type.
Valid Values
0|1
Behavior
If set to 1, the driver returns column values for the BIGTIME data type as the ODBC data type SQL_TYPE_TIME.
The fractional seconds portion of the value is truncated.
582 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
If set to 0, the driver returns column values for the BIGTIME data type as the ODBC data type
SQL_TYPE_TIMESTAMP. When a timestamp is returned for BIGTIME, the Year, Month and Day parts of the
timestamp must be set to zero.
Notes
• The BIGTIME data type is supported in Sybase 15.5 and higher.
Default
1
GUI Tab
Advanced tab
Field Delimiter
Attribute
BulkLoadFieldDelimiter (BLFD)
Purpose
Specifies the character that the driver will use to delimit the field entries in a bulk load data file.
Valid Values
x
where:
For simplicity, avoid using a value that can be in the data, including all alphanumeric characters, the dash(-),
the colon(:), the period (.), the forward slash (/), the space character, the single quote (') and the double quote
("). You can use some of these characters as delimiters if all of the data in the file is contained within double
quotes.
Notes
• The Bulk Load Field Delimiter character must be different from the Bulk Load Record Delimiter.
Default
None
GUI Tab
Bulk tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 583
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Attribute
GSSClient (GSSC)
Purpose
The name of the GSS client library that the driver uses to communicate with the Key Distribution Center (KDC).
The driver uses the path defined by the PATH environment variable for loading the specified client library.
Valid Values
native | client_library
where:
client_library
Behavior
If set to client_library, the driver uses the specified GSS client library.
If set to native, the driver uses the GSS client shipped with the operating system.
Default
native
GUI Tab
Security tab
Attribute
FailoverNetworkAddress (FNA)
Purpose
The network address of the High Availability (HA) Failover server to be used in the event of a connection loss.
The driver detects the dropped connection and automatically reconnects to the specified HA Failover server.
This option is valid only for Sybase 12 and higher servers that have the High Availability Failover feature
enabled.
Valid Values
IP_ address , port_number | pipe_address , port_number | server_name, port_number
where:
IP_ address
584 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
port_number
is the port number assigned to the listener process on the HA Failover server.
server_name
is a name that uniquely identifies the HA Failover server. You can use this format if your environment
supports named servers.
pipe_address
is the pipe address of the HA Failover server. This format is required if using NamedPipes as the
network protocol.
Notes
• The HA Failover Server Connection Information option and the Alternate Servers option are mutually
exclusive.
Example
199.226.224.34, 5000
or
\\machine1\sybase\pipe\query, 5000
or
Sybaseserver, 5000
Default
None
GUI Tab
Failover tab
Attribute
HostNameInCertificate (HNIC)
Purpose
A host name for certificate validation when SSL encryption is enabled (Encryption Method=1) and validation
is enabled (Validate Server Certificate=1). This option provides additional security against man-in-the-middle
(MITM) attacks by ensuring that the server the driver is connecting to is the server that was requested.
Valid Values
host_name | #SERVERNAME#
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 585
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
host_name
is the host name specified in the certificate. Consult your SSL administrator for the correct value.
Behavior
If set to a host name, the driver examines the subjectAltName values included in the certificate. If a dnsName
value is present in the subjectAltName values, then the driver compares the value specified for Host Name In
Certificate with the dnsName value. The connection succeeds if the values match. The connection fails if the
Host Name In Certificate value does not match the dnsName value.
If no subjectAltName values exist or a dnsName value is not in the list of subjectAltName values, then the
driver compares the value specified for Host Name In Certificate with the commonName part of the Subject
name in the certificate. The commonName typically contains the host name of the machine for which the
certificate was created. The connection succeeds if the values match. The connection fails if the Host Name
In Certificate value does not match the commonName. If multiple commonName parts exist in the Subject
name of the certificate, the connection succeeds if the Host Name In Certificate value matches any of the
commonName parts.
If set to #SERVERNAME#, the driver compares the host server name specified as part of a data source or
connection string to the dnsName or the commonName value.
Default
None
GUI Tab
Security tab
IANAAppCodePage
Attribute
IANAAppCodePage (IACP)
Purpose
An Internet Assigned Numbers Authority (IANA) value. You must specify a value for this option if your application
is not Unicode-enabled or if your database character set is not Unicode. The value you specify must match
the database character encoding and the system locale.
The driver uses the specified IANA code page to convert "W" (wide) functions to ANSI.
The driver and Driver Manager both check for the value of IANAAppCodePage in the following order:
• In the connection string
• In the Data Source section of the system information file (odbc.ini)
• In the ODBC section of the system information file (odbc.ini)
If the driver does not find an IANAAppCodePage value, the driver uses the default value of 4 (ISO 8859-1
Latin-1).
Valid Values
IANA_code_page
where:
586 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
IANA_code_page
is one of the valid values listed in "IANAAppCodePage values" in the Progress DataDirect for ODBC
Drivers Reference. The value must match the database character encoding and the system locale.
Notes
Refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers Reference
for details.
Default
4 (ISO 8559-1 Latin-1)
GUI Tab
Advanced tab
Initialization String
Attribute
InitializationString (IS)
Purpose
A SQL command that is issued immediately after connecting to the database to manage session settings.
Valid Values
SQL_command
where:
SQL_command
Notes
• If the statement fails to execute, the connection fails and the driver reports the error returned from the server.
Example
To allow delimited identifiers, specify:
Initialization String=set QUOTED_IDENTIFIER on
Default
None
GUI Tab
Advanced tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 587
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Interfaces File
Attribute
InterfacesFile (IF)
Purpose
The directory to the Interfaces file.
Valid Values
file_dir
where:
file_dir
Behavior
If unspecified and a value is specified for the Server Name option, the driver looks for the path name of the
Interfaces file in the Registry under HKEY_LOCAL_MACHINE\SOFTWARE\DataDirect\InterfacesFile. If this
Registry value is empty, the driver will try to open the SQL.INI file found in the same directory where the driver
is located and use it as the Interfaces file.
Notes
• This option and the Network Address option are mutually exclusive.
Default
None
GUI Tab
General tab
Language
Attribute
Language (LANG)
Purpose
The national character set installed on the Sybase server.
Valid Values
charset
where:
588 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
charset
Default
None (English)
GUI Tab
Connection tab
Attribute
LoadBalanceTimeout (LBT)
Purpose
The number of seconds to keep inactive connections open in a connection pool. An inactive connection is a
database session that is not associated with an ODBC connection handle, that is, a connection in the pool that
is not in use by an application.
Determines whether the driver works with applications using multiple ODBC threads.
Valid Values
0|x
where:
Behavior
If set to 0, inactive connections are kept open.
If set to x, inactive connections are closed after the specified number of seconds passes.
Notes
• The Min Pool Size option may cause some connections to ignore this value.
• This connection option can affect performance.
Default
0 (Disabled)
See also
See Performance Considerations on page 607 for details.
GUI Tab
Pooling tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 589
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Load Balancing
Attribute
LoadBalancing (LB)
Purpose
Determines whether the driver uses client load balancing in its attempts to connect to the database servers
(primary and alternate). You can specify one or multiple alternate servers by setting the Alternate Servers
option.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses client load balancing and attempts to connect to the database servers
(primary and alternate servers) in random order.
If set to 0 (Disabled), the driver does not use client load balancing and connects to each server based on their
sequential order (primary server first, then, alternate servers in the order they are specified).
Notes
• This option has no effect unless alternate servers are defined for the Alternate Servers connection option.
Default
0 (Disabled)
GUI Tab
Failover tab
Login Timeout
Attribute
LoginTimeout (LT)
Purpose
The number of seconds the driver waits for a connection to be established before returning control to the
application and generating a timeout error. To override the value that is set by this connection option for an
individual connection, set a different value in the SQL_ATTR_LOGIN_TIMEOUT connection attribute using
the SQLSetConnectAttr() function.
Valid Values
-1 | 0 | x
where:
590 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
Behavior
If set to -1, the connection request does not time out. The driver silently ignores the
SQL_ATTR_LOGIN_TIMEOUT attribute.
If set to 0, the connection request does not time out, but the driver responds to the SQL_ATTR_LOGIN_TIMEOUT
attribute.
If set to x, the connection request times out after the specified number of seconds unless the application
overrides this setting with the SQL_ATTR_LOGIN_TIMEOUT attribute.
Default
15
GUI Tab
Advanced tab
Attribute
MaxPoolSize (MXPS)
Purpose
The maximum number of connections allowed within a single connection pool. When the maximum number of
connections is reached, no additional connections can be created in the connection pool.
Valid Values
An integer from 1 to 65535
For example, if set to 20, the maximum number of connections allowed in the pool is 20.
Notes
• This connection option can affect performance.
Default
100
GUI Tab
Pooling tab
See Also
See Performance Considerations on page 607 for details.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 591
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Attribute
MinPoolSize (MNPS)
Purpose
The minimum number of connections that are opened and placed in a connection pool, in addition to the active
connection, when the pool is created. The connection pool retains this number of connections, even when
some connections exceed their Load Balance Timeout value.
This connection option can affect performance. See Performance Considerations for details.
Valid Values
0|x
Behavior
If set to 0, no connections are opened in addition to the current existing connection.
Notes
• This connection option can affect performance.
Example
If set to 5, the start-up number of connections in the pool is 5 in addition to the current existing connection.
Default
0
GUI Tab
Pooling tab
See Also
See Performance Considerations on page 607 for details.
Network Address
Attribute
NetworkAddress (NA)
Purpose
A unique identifier assigned to the Sybase server machine.
Valid Values
server_name | IP_address
where:
592 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
server_name
is the Sybase server name specified as: named_server, port_number. For example, you can
enter SSserver, 5000.
IP_address
is the Sybase server address specified as: IP_address, port_number. For example, you can
enter 199.226.224.34, 5000. The IP address can be specified in either IPv4 or IPv6 format, or
a combination of the two. See Using IP Addresses on page 67 for details about these formats.
Notes
This option is mutually exclusive with the Interfaces File and the Server Name option.
Default
None
GUI Tab
General tab
Packet Size
Attribute
PacketSize (PS)
Purpose
Determines the number of bytes for each database protocol packet that is transferred from the database server
to the client machine. Adjusting the packet size can improve performance. The optimal value depends on the
typical size of data that is inserted, updated, or returned by the application and the environment in which it is
running. Typically, larger packet sizes work better for large amounts of data. For example, if an application
regularly returns character values that are 10,000 characters in length, using a value of 32 (16 KB) typically
results in improved performance.
Valid Values
-1 | 0 | x
Behavior
If set to -1, the driver uses the maximum packet size that is set by the database server.
If set to 0, the driver uses the default packet size that is used by the database server.
If set to x, an integer from 1 to 127, the driver uses a packet size that is a multiple of 512 bytes. For example,
PacketSize=8 means to set the packet size to 8 * 512 bytes (4096 bytes).
Notes
• If SSL encryption is used, the driver must use the packet size that is specified by the server. Any value set
for this option or the SQL_PACKET_SIZE connect option is ignored if SSL encryption is used.
• The ODBC connection option SQL_PACKET_SIZE provides the same functionality as the Packet Size
option; however SQL_PACKET SIZE and the Packet Size option are mutually exclusive. If Packet Size is
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 593
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
specified, the driver returns the message Driver Not Capable if an application attempts to call
SQL_PACKET_SIZE. If you do not set the Packet Size option, application calls to SQL_PACKET_SIZE are
accepted by the driver.
• This connection option can affect performance.
Default
0
GUI Tab
Performance tab
See Also
See Performance Considerations on page 607 for details.
Password
Attribute
Password (PWD)
Purpose
The password that the application uses to connect to your database. The Password option cannot be specified
through the driver Setup dialog box and should not be stored in a data source. It is specified through the Logon
dialog box or a connection string.
Valid Values
pwd
where:
pwd
is a valid password.
Default
None
GUI Tab
n/a
Prepare Method
Attribute
OptimizePrepare (OP)
Purpose
Determines whether stored procedures are created on the server for calls to SQLPrepare.
594 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
Valid Values
0|1|2|3
Behavior
If set to 0 - None, stored procedures are created for every call to SQLPrepare. This setting can result in
decreased performance when processing statements that do not contain parameters.
If set to 1 - Partial, the driver creates stored procedures only if the statement contains parameters. Otherwise,
the statement is cached and run directly at the time of SQLExecute.
If set to 2 - Full, stored procedures are never created. The driver caches the statement, executes it directly at
the time of SQLExecute, and reports any syntax or similar errors at the time of SQLExecute.
If set to 3 - Full at Prepare, stored procedures are never created. This is identical to value 2 except that any
syntax or similar errors are returned at the time of SQLPrepare instead of SQLExecute. Use this setting only
if you must have syntax errors reported at the time of SQLPrepare.
Notes
• This connection option can affect performance.
Default
1 (Partial)
GUI Tab
Performance tab
See Also
See Performance Considerations on page 607 for details.
PRNGSeedFile
Attribute
PRNGSeedFile (PSF)
Purpose
Specifies the absolute path for the entropy-source file or device used as a seed for SSL key
generation.
Valid Values
string | RANDFILE
where:
string
is the absolute path for the entropy-source file or device that seeds the random number generator
used for TLS/SSL key generation.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 595
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Behavior
If set to string, the specified entropy-source file or device seeds the random number generator used for
TLS/SSL key generation. Entropy levels and behavior may vary for different files and devices. See the following
section for a list of commonly used entropy sources and their behavior.
If set to RANDFILE, the RAND_file_name() function in your application generates a default path for the
random seed file. The seed file is $RANDFILE if that environment variable is set; otherwise, it is $HOME/.rnd.
If $HOME is not set either, an error occurs.
/dev/random
is a pseudorandom number generator (blocking) that creates a seed from random bits of environmental
noise it collects in an entropy pool. When there is insufficient noise in the pool, the file blocks calls
until enough noise is collected. This provides more secure SSL key generation, but at the expense
of blocked calls.
/dev/urandom
is a pseudorandom number generator (non-blocking) that creates seeds from random bits from
environmental noise it collects in an entropy pool. When there is insufficient noise in the pool, the
file reuses bits from the pool instead of blocking calls. This eliminates potential delays associated
with blocked calls, but may result in less secure TLS/SSL key generation.
/dev/hwrng
is a hardware random number generator. The behavior is dependent on the device used in your
environment.
Notes
• This option is ignored when TLS/SSL is disabled (EncryptionMethod=0) or the seed source is set to Poll
Only (PRNGSeedSource=1).
• For processes that employ multiple TLS/SSL-enabled drivers, the behavior of this option for all drivers is
determined by the values specified for the driver that first connects to the process and loads the OpenSSL
library. Since the OpenSSL library loads only once per process, the values specified for drivers that
subsequently connect are ignored. To ensure that the correct security settings are used, we recommend
configuring this option identically for all drivers used in a process.
Default
/dev/random
GUI tab
NA
See also
PRNGSeedSource on page 597
596 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
PRNGSeedSource
Attribute
PRNGSeedSource (PSS)
Purpose
Specifies the source of the seed the driver uses for TLS/SSL key generation. Seeds are a
pseudorandom or random value used to set the initial state of the random number generator used to generate
TLS/SSL keys. Using seeds with a higher level of entropy, or randomness, provides a more secure transmission
of data encrypted using TLS/SSL.
Valid Values
0|1
Behavior
If set to 0 (File), the driver uses entropy-source file or device specified in the PRNGSeedFile connection option
as the seed used for TLS/SSL key generation.
If set to 1 (Poll Only) , the driver uses the RAND_poll function in TLS/SSL to create the seed used for TLS/SSL
key generation.
Notes
• For processes that employ multiple TLS/SSL-enabled drivers, the behavior of this option for all drivers is
determined by the values specified for the driver that first connects to the process and loads the OpenSSL
library. Since the OpenSSL library loads only once per process, the values specified for drivers that
subsequently connect are ignored. To ensure that the correct security settings are used, we recommend
configuring this option identically for all drivers used in a process.
• This option is ignored when TLS/SSL is disabled (EncryptionMethod=0)
Default
0 (File)
GUI Tab
NA
See also
PRNGSeedFile on page 595
Query Timeout
Attribute
QueryTimeout (QT)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 597
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
The number of seconds for the default query timeout for all statements that are created by a connection. To
override the value set by this connection option for an individual statement, set a different value in the
SQL_ATTR_QUERY_TIMEOUT statement attribute on the SQLSetStmtAttr() function.
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, the query does not time out. The driver silently ignores the SQL_ATTR_QUERY_TIMEOUT attribute.
If set to 0, the query does not time out, but the driver responds to the SQL_ATTR_QUERY_TIMEOUT attribute.
If set to x, all queries time out after the specified number of seconds unless the application overrides this value
by setting the SQL_ATTR_QUERY_TIMEOUT attribute.
Default
0
GUI Tab
Advanced tab
Record Delimiter
Attribute
BulkLoadRecordDelimiter (BLRD)
Purpose
Specifies the character that the driver will use to delimit the record entries in a bulk load data file.
Valid Values
x
where:
For simplicity, avoid using a value that can be in the data, including all alphanumeric characters, the dash(-),
the colon(:), the period (.), the forward slash (/), the space character, the single quote (') and the double quote
("). You can use some of these characters as delimiters if all of the data in the file is contained within double
quotes.
598 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
Notes
• The Bulk Load Record Delimiter character must be different from the Bulk Load Field Delimiter.
Default
None
GUI Tab
Bulk tab
Attribute
ReportCodepageConversionErrors (RCCE)
Purpose
Specifies how the driver handles code page conversion errors that occur when a character cannot be converted
from one character set to another.
An error message or warning can occur if an ODBC call causes a conversion error, or if an error occurs during
code page conversions to and from the database or to and from the application. The error or warning generated
is Code page conversion error encountered. In the case of parameter data conversion errors, the
driver adds the following sentence: Error in parameter x, where x is the parameter number. The standard
rules for returning specific row and column errors for bulk operations apply.
Valid Values
0|1|2
Behavior
If set to 0 (Ignore Errors), the driver substitutes 0x1A for each character that cannot be converted and does
not return a warning or error.
If set to 1 (Return Error), the driver returns an error instead of substituting 0x1A for unconverted characters.
If set to 2 (Return Warning), the driver substitutes 0x1A for each character that cannot be converted and returns
a warning.
Default
0 (Ignore Errors)
GUI Tab
Advanced tab
Select Method
Attribute
SelectMethod (SM)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 599
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
Determines whether database cursors are used for Select statements.
Valid Values
0|1
If set to 0 (Cursor), database cursors are used. In some cases performance degradation can occur when
performing large numbers of sequential Select statements because of the amount of overhead associated with
creating database cursors.
If set to 1 (Direct), Select statements are run directly without using database cursors, and the data source is
limited to one active statement.
Notes
• This connection option can affect performance.
Default
0 (Cursor)
GUI Tab
Performance tab
See Also
See Performance Considerations on page 607 for details.
Server Name
Attribute
InterfacesFileServerName (IFSN)
Purpose
The name of the section in the Interfaces file containing the network connection information for the Sybase
server. Typically, the section name is the host name of the Sybase server.
Valid Values
section_name
where:
section_name
is a section in the Interfaces file containing the network connection information for the Sybase server.
Notes
The Network Address option and the Server Name option are mutually exclusive.
Default
None
600 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
GUI Tab
General tab
Attribute
ServicePrincipalName (SPN)
Purpose
The service principal name to be used by driver for Kerberos authentication.
Valid Values
servicePrincipalName
where:
servicePrincipalName
If unspecified, the value of the Network Address option is used as the service principal name. If Authentication
Method is set to 0 or 1, the value of the Service Principal Name option is ignored.
Default
None
GUI Tab
Security tab
SSLLibName
Attribute
SSLLibName (SLN)
Purpose
The absolute path for the OpenSSL library file containing the TLS/SSL library to be used by the data source
or connection when TLS/SSL is enabled. The SSL library contains the implementations of TLS/SSL protocols
the driver uses for data encryption.
This option allows you to designate a different SSL library if you encounter issues with the default version or
want to use a library that you provide. Common issues that require designating a different library include security
vulnerabilities with specific libraries or compatibility issues with your server or application.
Valid Values
absolute_path\openssl_filename
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 601
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
absolute_path
openssl_filename
is the name of the OpenSSL library file containing the TLS/SSL Library to be used by your data
source or connection.
Example
C:\Program Files\Progress\DataDirect\ODBC_71\
Drivers\OpenSSL\1.0.0r\ddssl27.dll (64-bit Windows)
Notes
• The OpenSSL library files provided by Progress combine the cryptographic and TLS/SSL libraries into a
single file; therefore, when your drivers are using a Progress library file, the values specified for the
CryptoLibName and SSLLibName options should be the same. For non-Progress library files, the libraries
may use separate files, which would require unique values to be specified.
• This option can be used to designate OpenSSL libraries not installed by the product; however, the drivers
are only certified against libraries provided by Progress.
Default
No default value
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
SSLLibName=C:\Program Files\Progress\DataDirect\
Connect64_for_ODBC_71\Drivers\OpenSSL\1.0.0r\ddssl27.dll;
See Advanced tab for details.
See also
CryptoLibName on page 572
Attribute
KeepAlive (KA)
Purpose
Specifies whether the driver enables TCPKeepAlive. TCPKeepAlive maintains idle TCP connections by
periodically passing packets between the client and server. If either the client or server does not respond to a
packet, the connection is considered inactive and is terminated. In addition, TCPKeepAlive prevents valid idle
connections from being disconnected by firewalls and proxies by maintaining network activity.
602 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
Valid Values
0|1
Behavior
If set to 0 (Disabled), the driver does not enable TCPKeepAlive.
If set to 1 (Enabled), the driver enables TCPKeepAlive.
Default
0 (Disabled)
GUI Tab
Advanced tab
Attribute
TightlyCoupledDistributedTransactions (TCDT)
Purpose
Sybase 12 or higher server only. Determines whether the driver ensures that multiple connections within the
same distributed transaction obey other’s locks.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses tightly coupled distributed transactions. Multiple connections within the
same distributed transaction obey other’s locks.
If set to 0 (Disabled), the driver does not use tightly coupled distributed transactions. Multiple connections within
the same distributed transaction may hang each other because the connections do not obey other’s locks. This
value can provide better performance if concurrency of data is not needed.
Default
1 (Enabled)
GUI Tab
Advanced tab
Attribute
TruncateTimeTypeFractions (TTTF)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 603
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
Sybase 12.5.1 and higher only. Determines whether the driver sets fractional seconds to zero (0) when converting
data from the TIME data type to TIMESTAMP, CHAR, or WCHAR data types.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver converts fractional seconds to zero when converting the TIME data type.
If set to 0 (Disabled), the driver does not set fractional seconds to zero when converting the TIME data type.
Default
0 (Disabled)
GUI Tab
Advanced tab
Truststore
Attribute
Truststore (TS)
Purpose
The directory that contains the truststore file and the truststore file name to be used when SSL is enabled
(Encryption Method=1) and server authentication is used. The truststore file contains a list of the valid Certificate
Authorities (CAs) that are trusted by the client machine for SSL server authentication. If you do not specify a
directory, the current directory is used.
Valid Values
truststore_directory\filename
where:
truststore_directory
filename
Notes
• The truststore and keystore files may be the same file.
Default
None
604 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
GUI Tab
Security tab
Truststore Password
Attribute
TruststorePassword (TSP)
Purpose
The password that is used to access the truststore file when SSL is enabled (Encryption Method=1) and server
authentication is used. The truststore file contains a list of the Certificate Authorities (CAs) that the client trusts.
Valid Values
truststore_password
where:
truststore_password
Notes
The truststore and keystore files may be the same file; therefore, they may have the same password.
Default
None
GUI Tab
Security tab
User Name
Attribute
LogonID (UID)
Purpose
The default user ID that is used to connect to your database. Your ODBC application may override this value
or you may override it in the logon dialog box or connection string.
Valid Values
userid
where:
userid
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 605
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Default
None
GUI Tab
Security tab
Attribute
ValidateServerCertificate (VSC)
Purpose
Determines whether the driver validates the certificate that is sent by the database server when SSL encryption
is enabled (Encryption Method=1). When using SSL server authentication, any certificate sent by the server
must be issued by a trusted Certificate Authority (CA). Allowing the driver to trust any certificate returned from
the server even if the issuer is not a trusted CA is useful in test environments because it eliminates the need
to specify truststore information on each client in the test environment.
Truststore information is specified using the Trust Store and Trust Store Password options.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver validates the certificate that is sent by the database server. Any certificate from
the server must be issued by a trusted CA in the truststore file. If the Host Name In Certificate option is specified,
the driver also validates the certificate using a host name. The Host Name In Certificate option provides
additional security against man-in-the-middle (MITM) attacks by ensuring that the server the driver is connecting
to is the server that was requested.
If set to 0 (Disabled), the driver does not validate the certificate that is sent by the database server. The driver
ignores any truststore information specified by the Trust Store and Trust Store Password options.
Default
1 (Enabled)
GUI Tab
Security tab
Workstation ID
Attribute
WorkstationID (WKID)
Purpose
An identifier for the client machine.
606 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
Valid Values
ID
where:
ID
Default
None
GUI Tab
Connection tab
Attribute
XAOpenStringParameters (XAOSP)
Purpose
Determines the name of trace files generated for XA open string parameters.
Valid Values
-Ltrace_ filename
where:
trace_ filename
is a string that identifies trace files generated for XA open string parameters. If specified, two trace
files are created. The first trace file traces all XA call activities and is named exactly as specified.
The second trace file traces any enlistment and unenlistment procedures and is named as specified
with a "driver" extension.
Example
If you specify -LXAtrace, the driver creates two trace files: XAtrace and XAtrace.driver.
Default
None
GUI Tab
Advanced tab
Performance Considerations
The following connection options can enhance driver performance.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 607
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Note: If you are using a multi-threaded application, you must enable the Application Using Threads option.
Connection Pooling (Pooling): If you enable the driver to use connection pooling, you can set additional
options that affect performance:
• Load Balance Timeout (LoadBalanceTimeout ): You can define how long to keep connections in the
pool. The time that a connection was last used is compared to the current time and, if the timespan exceeds
the value of the Load Balance Timeout option, the connection is destroyed. The Min Pool Size option can
cause some connections to ignore this value.
• Connection Reset (ConnectionReset): Resetting a re-used connection to the initial configuration settings
impacts performance negatively because the connection must issue additional commands to the server.
• Max Pool Size (MaxPoolSize): Setting the maximum number of connections that the pool can contain too
low might cause delays while waiting for a connection to become available. Setting the number too high
wastes resources.
• Min Pool Size (MinPoolSize): A connection pool is created when the first connection with a unique
connection string connects to the database. The pool is populated with connections up to the minimum pool
size, if one has been specified. The connection pool retains this number of connections, even when some
connections exceed their Load Balance Timeout value.
Default Buffer Size for Long/LOB Columns (DefaultLongDataBuffLen): To improve performance when
your application fetches images, pictures, or long text or binary data, a buffer size can be set to accommodate
the maximum size of the data. The buffer size should only be large enough to accommodate the maximum
amount of data retrieved; otherwise, performance is reduced by transferring large amounts of data into an
oversized buffer. If your application retrieves more than 1 MB of data, the buffer size should be increased
accordingly.
Enable Bulk Load (EnableBulkLoad): If your application performs bulk loading of data, you can improve
performance by configuring the driver to use the database system's bulk load functionality instead of database
array binding. The trade-off to consider for improved performance is that using the bulk load functionality can
bypass data integrity constraints.
Encryption Method (EncryptionMethod): Data encryption may adversely affect performance because of the
additional overhead (mainly CPU usage) that is required to encrypt and decrypt data.
Failover Mode (FailoverMode): Although high availability that replays queries after a failure provides increased
levels of protection, it can adversely affect performance because of increased overhead.
Fetch Array Size (ArraySize): If the Select Method connection option is set to 0 and your application fetches
more than 50 rows at a time, you should set Fetch Array Size to the approximate number of rows being fetched.
This reduces the number of round trips on the network, thereby increasing performance. For example, if your
application normally fetches 200 rows, it is more efficient for the driver to fetch 200 rows at one time over the
network than to fetch 50 rows at a time during four round trips over the network. You should use Fetch Array
Size in conjunction with Select Method.
NOTE: The ideal setting for your application will vary. To calculate the ideal setting for this option, you must
know the size in bytes of the rows that you are fetching and the size in bytes of your Network Packet. Then,
you must calculate the number of rows that will fit in your Network Packet, leaving space for packet overhead.
For example, suppose your Network Packet size is 1024 bytes and the row size is 8 bytes. Dividing 1024 by
8 equals 128; however, the ideal setting for Fetch Array Size is 127, not 128, because the number of rows
times the row size must be slightly smaller than the Network Packet size.
608 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
Packet Size (PacketSize): Typically, it is optimal for the client to use the maximum packet size that the database
server allows. This reduces the total number of round trips required to return data to the client, thus improving
performance. Therefore, performance can be improved if the PacketSize attribute is set to the maximum packet
size of the Sybase ASE server.
Prepare Method (OptimizePrepare): If your application executes the same SQL statements multiple times,
performance can be improved by creating a stored procedure on the server at prepare time. If your application
executes one of these prepared statements multiple times, performance will improve because the driver created
a stored procedure and executing a stored procedure is faster than executing a single SQL statement; however,
if a prepared statement is only executed once or is never executed, performance can decrease. If your application
executes the same SQL statements multiple times, the Prepare Method option should be set to 1.
Select Method (SelectMethod): If your application often executes a SQL statement before processing or
closing the previous result set, then it uses multiple active statements per connection. The default setting (0)
of this option causes the driver to use database cursors for Select statements and allows an application to
process multiple active statements per connection. An active statement is defined as a statement where all
the result rows or result sets have not been fetched. This can cause high overhead on the server. If your
application does not use multiple active statements, however, setting Select Method to 1 will increase
performance of Select statements by allowing the server to return results without using a database cursor. If
this option is set to 0, it should be used in conjunction with Fetch Array Size (ArraySize). If this option is set to
1, Fetch Array Size (ArraySize) has no effect.
Data Types
The following table shows how the Sybase data types are mapped to the standard ODBC data types. Unicode
Support on page 610 lists Sybase to Unicode data type mappings.
BINARY SQL_BINARY
BIT SQL_BIT
CHAR SQL_CHAR
42
DATE SQL_TYPE_DATE
DATETIME SQL_TYPE_TIMESTAMP
DECIMAL SQL_DECIMAL
FLOAT SQL_FLOAT
40
Sybase 15.5 and higher only.
41
Sybase 15 and higher only.
42
Sybase 12.5.1 and higher only.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 609
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
IMAGE SQL_LONGVARBINARY
INT SQL_INTEGER
MONEY SQL_DECIMAL
NUMERIC SQL_NUMERIC
REAL SQL_REAL
SMALLDATETIME SQL_TYPE_TIMESTAMP
SMALLINT SQL_SMALLINT
SMALLMONEY SQL_DECIMAL
SYSNAME SQL_VARCHAR
TEXT SQL_LONGVARCHAR
42
TIME SQL_TYPE_TIME
TIMESTAMP SQL_VARBINARY
TINYINT SQL_TINYINT
VARBINARY SQL_VARBINARY
VARCHAR SQL_VARCHAR
Note: FOR USERS OF SYBASE 12.5 and higher: The Sybase Wire Protocol driver supports extended new
limits (XNL) for character and binary columns—columns with lengths greater than 255.
See Retrieving Data Type Information on page 72 for information about retrieving data types.
Unicode Support
When connected to a Unicode database, the Sybase Wire Protocol driver supports Unicode data types listed
in the following table, in addition to standard ODBC data types listed in Data Types on page 609.
610 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
For data types that require the UTF-8 character set, set the Charset connection string attribute. See Charset
on page 567 for information about using this connection string attribute.
The driver supports the Unicode ODBC W (Wide) function calls, such as SQLConnectW. This allows the Driver
Manager to transmit these calls directly to the driver. Otherwise, the Driver Manager would incur the additional
overhead of converting the W calls to ANSI function calls, and vice versa.
See UTF-16 Applications on UNIX and Linux on page 137 for related details.
Also, refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers
Reference for a more detailed explanation of Unicode.
Advanced Features
The driver supports the following advanced features:
• Failover
• Security
• Connection Pooling
• DataDirect Bulk Load
Failover
The driver supports failover and its related connection options. Failover connection options are located on the
Failover tab of the driver Setup dialog box. See Using Failover on page 78 for a general description of failover
and its implementation.
43
This data type is available only if the data source is configured to use the UTF-8 character set.
44
On Sybase 12.5 servers, this data type is available only if the data source is configured to use the UTF-8 character set. On
Sybase 12.5.1 and higher servers, this data type is always available, even if the data source is not configured to use the UTF-8
character set.
45
This data type is available on Sybase 15 and higher servers only.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 611
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Security
The driver supports authentication and encryption. Security connection options are located on the Security tab
of the driver Setup dialog box. See Using Security on page 89 for a general description of security and its
implementation. The following security information is specific to the Sybase Wire Protocol Driver.
Authentication
If you are using Kerberos, verify that your environment meets the requirements listed in the following table
before you configure the driver for Kerberos authentication.
Table 39: Kerberos Authentication Requirements for the Sybase Wire Protocol Driver
Component Requirements
Database server The database server must be administered by the same domain controller that
administers the client and must be running Sybase 12.0 or higher. In addition, the
Sybase Security and directory services package, ASE_SECDIR, is required.
Kerberos server The Kerberos server is the machine where the user IDs for authentication are
administered. The Kerberos server is also the location of the Kerberos KDC.
Network authentication must be provided by one of the following methods:
Client The client must be administered by the same domain controller that administers
the database server.
Connection Pooling
The driver supports connection pooling and its related connection options. Connection pooling connection
options are located on the Pooling tab of the driver Setup dialog box. See Using DataDirect Connection Pooling
on page 97 for a general description of connection pooling and its implementation.
This option is required to perform operations that do not keep a complete record of the transaction in the log.
For more information, refer to the Sybase documentation.
Alternatively, you can define an index on the destination table.
612 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
Failure to properly configure the database results in errors such as the following:
"You cannot run the non-logged version of bulk copy in this database. Please check with
the DBO."
Limitations
• The Sybase server ensures the accuracy of Real data type values only up to 6 digits.
• For the Money data type, if an application submits a value with a scale larger than 4, the driver changes
the scale to 4 by truncating the value. Ideally, it should set the scale to 4 and round off the value. For
example, if the value is 100.141592, the driver truncates it to 100.1415. Instead, it should round it off to
100.1416.
• The driver does not support inserting data containing LOB columns. In such cases, the driver throws a
warning and falls back to the native protocol to continue executing the inserts.
• When executing an insert statement, the operation will fail with an error message if non-identity columns
are omitted from a statement.
Performance Considerations
Sybase defines two bulk copy modes, described in the following table. Sybase automatically selects the
appropriate mode at run time. For more information, refer to your Sybase documentation.
Table 40: Summary of Fast and Slow Bulk Copy Mode Characteristics
Logging Performed Page allocations are logged, but Row inserts are logged
row inserts are not
Transaction Log Handling You must dump the database The transaction log can become
before backing up (dumping) the very large. After the bulk copy
transaction log. completes, back up your database
with dump database, then truncate
the log with dump transaction.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 613
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Unexpected Characters
Users are sometimes surprised when they insert a character into a database, only to have a different character
displayed when they fetch it from the database. There are many reasons this can happen, but it most often
involves code page issues, not driver errors.
Client and server machines in a database system each use code pages, which can be identified by a name or
a number, such as Shift_JIS (Japanese) or cp1252 (Windows English). A code page is a mapping that associates
a sequence of bits, called a code point, with a specific character. Code pages include the characters and
symbols of one or more languages. Regardless of geographical location, a machine can be configured to use
a specific code page. Most of the time, a client and database server would use similar, if not identical, code
pages. For example, a client and server might use two different Japanese code pages, such as Shift_JIS and
EUC_JP, but they would still share many Japanese characters in common. These characters might, however,
be represented by different code points in each code page. This introduces the need to convert between code
pages to maintain data integrity. In some cases, no one-to-one character correspondence exists between the
two code points. This causes a substitution character to be used, which can result in displaying an unexpected
character on a fetch.
When the driver on the client machine opens a connection with the database server, the driver determines the
code pages being used on the client and the server. This is determined from the Active Code Page on a
Windows-based machine. If the client machine is UNIX-based, the driver checks the IANAAppCodePage
attribute (see IANAAppCodePage on page 586). If it does not find a specific setting for IACP, it defaults to a
value of ISO_8859_1.
If the client and server code pages are compatible, the driver transmits data in the code page of the server.
Even though the pages are compatible, a one-to-one correspondence for every character may not exist. If the
client and server code pages are completely dissimilar, for example, Russian and Japanese, then many
substitutions occur because very few, if any, of the characters are mapped between the two code pages.
The following is a specific example of an unexpected character:
This effectively inserts the hexadecimal bytes for the numbers 161 (0xA1) and 186 (0xBA) into the text column.
Each of these hexadecimal bytes is treated as the single byte code point for the character it represents. The
problem is that the character representation for these two particular hexadecimal values is different from code
page cp850 to code page cp1252. On cp850, these hexadecimal values represent í (0xA1) and || (0xBA), which
is what you thought you were inserting by using the previously described syntax. When you fetch these
hexadecimal values, however, the characters displayed on your client machine are ¡ (0xA1) and º (0xBA),
because that is what the hexadecimal values represent in code page cp1252. This is not a matter of data
corruption or substitution; these hexadecimal values simply represent different values in the two different code
pages.
This is not a driver error. It occurs because the code points map differently and because some characters do
not exist in a code page. The best way to avoid these problems is to use the same code page on both the client
and server machines.
614 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase Wire Protocol Driver
MTS Support
On Windows, the driver can take advantage of Microsoft Transaction Server (MTS) capabilities, specifically,
the Distributed Transaction Coordinator (DTC) using the XA Protocol. For a general discussion of MTS and
DTC, refer to the help file of the Microsoft Transaction Server SDK.
Note: The DataDirect Connect for ODBC 32-bit drivers can operate in a 64-bit Windows environment; however,
they do not support DTC in this environment. Only the DataDirect Connect64 for ODBC 64-bit drivers support
DTC in a 64-bit Windows environment.
To enable DTC support, you must be accessing Sybase Adaptive Server Enterprise 12.0 or higher. You can
choose either Native OLE and XA protocol distributed transactions. See the Distributed Transaction Model
option documented in Configuring and Connecting to Data Sources on page 543 for details.
To enable distributed transaction in the Sybase server:
1. Assign the dtm_tm_role to each user who will participate in distributed transactions (who will log in to
Adaptive Server). You can do this using the sp_role command. For example:
sp_role "grant", dtm_tm_role, user_name
In the open string for resource managers, the specified username must have the dtm_tm_role.
2. Specify a default database other than the master for each user. Sybase cannot start distributed transactions
in a master database.
NULL Values
When the Sybase Wire Protocol driver establishes a connection, the driver sets the Sybase database option
ansinull to on. Setting ansinull to on ensures that the driver is compliant with the ANSI SQL standard, which
makes developing cross-database applications easier.
By default, Sybase does not evaluate NULL values in SQL equality (=), inequity (<>), or aggregate function
comparisons in an ANSI SQL-compliant manner. For example, the ANSI SQL specification defines that
col1=NULL always evaluates to false:
Using the default database setting (ansinull=off), the same comparison evaluates to true instead of false.
Setting ansinull to on changes the default database behavior so that SQL statements must use IS NULL
instead of =NULL. For example, using the Sybase Wire Protocol driver, if the value of col1 in the following
statement is NULL, the comparison evaluates to true:
SELECT * FROM table WHERE col1 IS NULL
In your application, you can restore the default Sybase behavior for a connection in the following ways:
• Use the Initialization String option to specify the SQL command set ANSINULL off. For example, the
following connection string ensures that the handling of NULL values is restored to the Sybase default for
the current connection:
DSN=SYB TABLES;DB=PAYROLL;IS=set ANSINULL off
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 615
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
• SQLColumnPrivileges
• SQLDescribeParam (if EnableDescribeParam=1)
• SQLForeignKeys
• SQLPrimaryKeys
• SQLProcedureColumns
• SQLProcedures
• SQLTablePrivileges
Refer to "ODBC API and scalar functions" in the Progress DataDirect for ODBC Drivers Reference for a list of
supported API functions.
616 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Driver
Note: The Oracle driver requires Oracle client software. Progress DataDirect also provides an Oracle driver
that does not require any client software to access Oracle databases.
See The Oracle Wire Protocol Driver on page 283 for details.
Driver Requirements
This section provides the system requirements for using the Oracle driver on Windows, UNIX, and Linux.
Important: You must have all components of the Oracle client software installed; otherwise, the driver will not
operate properly. You must have the appropriate DLLs or shared libraries and objects on your path.
Although an earlier version of a client can access a later version of a database, for example, client 9i to server
10g, to ensure that you have access to all of the features of a particular database, you should use the client
that matches the database version, for example, client 10g to server 10g.
Note: The Oracle driver supports Oracle 10g clients; however, the clients are not available for all operating
systems supported by the driver. Consult the Oracle Web site for current client availability.
Windows
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 617
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
ORACLE_HOME=/databases/oracle;export ORACLE_HOME
warning: The $ODBC_HOME/lib directory, containing the correct libclntsh library, must be on the SHLIB_PATH
before $ORACLE_HOME/lib. Otherwise, the original Oracle library will be loaded, resulting in the unresolved
symbol error.
618 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Driver
If you choose to use a connection string, you must use specific connection string attributes. See Using a
Connection String on page 626 and Connection Option Descriptions on page 627 for an alphabetical list of driver
connection string attributes and their initial default values.
On Windows, data sources are stored in the Windows Registry. You can configure and modify data sources
through the ODBC Administrator using a driver Setup dialog box, as described in this section.
On UNIX and Linux, data sources are stored in the odbc.ini file. On Linux, you can configure and
modify data sources through the Linux ODBC Administrator using a driver Setup dialog box, as described in
this section.
Note: This book shows dialog box images that are specific to Windows. If you are using the drivers in the
Linux environment, the dialog box that you see may differ slightly from the Windows version. Windows-only
and UNIX-only connection options are specifically noted by icons in the Setup dialog box descriptions.
When the driver is first installed, the values of its connection options are set by default. These values appear
on the driver Setup dialog box tabs when you create a new data source. You can change these default values
by modifying the data source. In the following procedure, the description of each tab is followed by a table that
lists the connection options for that tab and their initial default values. This table links you to a complete
description of the options and their connection string attribute equivalents. The connection string attributes are
used to override the default values of the data source if you want to change these values at connection time.
To configure an Oracle data source:
• On Windows, start the ODBC Administrator by selecting its icon from the Progress DataDirect
program group.
•
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 619
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
odbcadmin
where install_dir is the path to the product installation directory.
2. Select a tab:
• User DSN: If you are configuring an existing user data source, select the data source name and click
Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the driver
and click Finish to display the driver Setup dialog box.
• System DSN: If you are configuring an existing system data source, select the data source name
and click Configure to display the driver Setup dialog box.
If you are configuring a new system data source, click Add to display a list of installed drivers. Select
the driver and click Finish to display the driver Setup dialog box.
• File DSN: If you are configuring an existing file data source, select the data source file and click Configure
to display the driver Setup dialog box.
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select
a driver. Click Advancedif you want to specify attributes; otherwise, click Next to proceed. Specify a
name for the data source and click Next. Verify the data source information; then, click Finish to display
the driver Setup dialog box.
620 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Driver
Note: The General tab displays only fields that are required for creating a data source. The fields on all
other tabs are optional, unless noted otherwise.
3. On this tab, provide values for the options in the following table; then, click Apply. The table provides links
to descriptions of the connection options.
4. Optionally, click the Advanced tab to specify additional data source settings.
Figure 64: Advanced tab
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 621
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Default Buffer Size for Long/LOB Columns (in Kb) on page 636 1024
Extended Options: Type a semi-colon separated list of connection options and their values. Use this
configuration option to set the value of undocumented connection options that are provided by Progress
DataDirect customer support. You can include any valid connection option in the Extended Options string,
for example:
Database=Server1;UndocumentedOption1=value[;UndocumentedOption2=value;]
If the Extended Options string contains option values that are also set in the setup dialog or data source,
the values of the options specified in the Extended Options string take precedence. However, connection
options that are specified on a connection string override any option value specified in the Extended Options
string.
Note: Do not specify the Extended Options configuration option in a connection string, or the driver will
return an error. Instead, applications should specify the individual undocumented connection options in the
connection string.
Translate: Click Translate to display the Select Translator dialog box, which lists the translators
specified in the ODBC Translators section of the Registry. Progress DataDirect provides a translator named
OEM to ANSI that translates your data from the IBM PC character set to the ANSI character set.
622 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Driver
5. Optionally, click the Performance tab to specify performance data source settings.
Figure 65: Performance tab
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 623
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
6. Optionally, click the Failover tab to specify failover data source settings.
Figure 66: Failover tab
See Using Failover on page 78 for a general description of failover and its related connection options.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
624 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Driver
7. Optionally, click the Pooling tab to specify connection pooling data source settings.
Figure 67: Pooling tab
See Using DataDirect Connection Pooling on page 97 for a general description of connection pooling.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
8. At any point during the configuration process, you can click Test Connect to attempt to connect to the data
source using the connection options specified in the driver Setup dialog box. A logon dialog box appears
(see Using a Logon Dialog Box (Oracle Client) on page 627 for details). Note that the information you enter
in the logon dialog box during a test connect is not saved.
• If the driver can connect, it releases the connection and displays a Connection Established message.
Click OK.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 625
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message. Click OK.
Note: If you are configuring alternate servers for use with the connection failover feature, be aware that
the Test Connect button tests only the primary server, not the alternate servers.
9. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
DSN=data_source_name[;attribute=value[;attribute=value]...]
FILEDSN=filename.dsn[;attribute=value[;attribute=value]...]
The DSN-less connection string specifies a driver instead of a data source. All connection information must be
entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
The following table lists the long and short names for each attribute, as well as the initial default value when
the driver is first installed. You can specify either long or short names in the connection string.
An example of a DSN connection string with overriding attribute values for Oracle Wire Protocol is:
DSN=Accounting;SRVR=QESRVR;UID=JOHN;PWD=XYZZY
626 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Driver
1. In the Server Name field, type the client connection string of the computer containing the Oracle database
tables you want to access. Or, select the string from the Server Name drop-down list, which displays the
names you specified in the ODBC Oracle driver Setup dialog box.
For local servers, use the SQL*Net connection string. If the SQL*Net connection string contains semicolons,
enclose it in quotation marks. Refer to your SQL*Net documentation for more information.
For remote servers, the Oracle TNS Client connection string is the alias name of the Oracle Listener on
your network.
Note: You can also use OS Authentication to connect to an Oracle database. See OS Authentication on
page 658 for details.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 627
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
ConnectionRetryCount (CRC) 0
ConnectionRetryDelay (CRD) 3
LockTimeout (LTO) -1
MinPoolSize (MNPS) 0
628 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Driver
ServerList None
Alternate Servers
Attribute
AlternateServers (ASRV)
Purpose
A list of alternate database servers to which the driver tries to connect if the primary database server is
unavailable. Specifying a value for this option enables connection failover for the driver. The value you specify
must be in the form of a string that defines the physical location of each alternate server. All of the other required
connection information for each alternate server is the same as what is defined for the primary server connection.
Valid Values
(ServerName=servervalue[, . . .])
Example
The following Alternate Servers value defines two alternate database servers for connection failover:
(ServerName=AcctBackup1, ServerName=AcctBackup2)
Default
None
GUI tab
Failover tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 629
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Attribute
ApplicationUsingThreads (AUT)
Purpose
Determines whether the driver works with applications using multiple ODBC threads.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver works with single-threaded and multi-threaded applications.
If set to 0 (Disabled), the driver does not work with multi-threaded applications. If using the driver with
single-threaded applications, this value avoids additional processing required for ODBC thread-safety standards.
Notes
• This connection option can affect performance.
Default
1 (Enabled)
GUI tab
Advanced tab
See Also
See Performance Considerations on page 652 for details.
Array Size
Attribute
ArraySize (AS)
Purpose
The number of bytes the driver can fetch in a single network round trip. Larger values increase throughput by
reducing the number of times the driver fetches data across the network. Smaller values increase response
time, as there is less of a delay waiting for the server to transmit data.
Valid Values
An integer from 1 to 4,294,967,296 (4 GB)
The value 1 does not define the number of bytes but, instead, causes the driver to allocate space for exactly
one row of data.
630 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Driver
Notes
• This connection option can affect performance.
Default
60000
GUI Tab
Performance tab
See Also
See Performance Considerations on page 652 for details.
Attribute
CatalogIncludesSynonyms (CIS)
Purpose
Determines whether synonyms are included in calls to SQLProcedures, SQLStatistics, and
SQLProcedureColumns.
Valid Values
0|1
Behavior
If set to 1 (Enabled), synonyms are included in calls to SQLProcedures, SQLStatistics, and
SQLProcedureColumns.
If set to 0 (Disabled), synonyms are excluded (a non-standard behavior) and performance is thereby improved.
Notes
• This connection option can affect performance.
Default
1 (Enabled)
GUI Tab
Performance tab
See Also
See Performance Considerations on page 652 for details.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 631
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Catalog Options
Attribute
CatalogOptions (CO)
Purpose
Determines whether SQL_NULL_DATA is returned for the result columns REMARKS and COLUMN_DEF.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the result column REMARKS (for the catalog functions SQLTables and SQLColumns)
and the result column COLUMN_DEF (for the catalog function SQLColumns) return actual values. Enabling
this option reduces the performance of your catalog (SQLColumns and SQLTables) queries.
If set to 0 (Disabled), SQL_NULL_DATA is returned for the result columns REMARKS and COLUMN_DEF.
Notes
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Advanced tab
See Also
See Performance Considerations on page 652 for details.
Client Version
Attribute
ClientVersion (CV)
Purpose
A value to specify the Oracle client software version. The driver assumes that it is using the version of Oracle
client software specified by this option to connect to an Oracle server.
Valid Values
8i | 9iR1 | 9iR2 | 10gR1
632 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Driver
Behavior
When set to 10gR1 and later, the driver binds all non-integer numerics as BINARY FLOAT and BINARY
DOUBLE. When set to any Oracle version previous to Oracle10g R1, the driver binds non-integer numerics
as if connected to an Oracle 9i R2 or earlier version of the server (regardless of the actual version of the server
to which it is connected). When connecting to an Oracle 10g server with a pre-10g client, this attribute must
be set to the same version as the actual Oracle client software in use; otherwise, numeric parameter bindings
may fail. Versions of the Oracle client software prior to 10g R1 do not fully support the new features of the
Oracle 10g database server.
Default
9iR2
GUI Tab
General tab
Connection Pooling
Attribute
Pooling (POOL)
Purpose
Specifies whether to use the driver’s connection pooling.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses connection pooling.
If set to 0 (Disabled), the driver does not use connection pooling.
Notes
• This connection option can affect performance.
• The application must be thread-enabled to use connection pooling.
Default
0 (Disabled)
GUI Tab
Pooling tab
See Also
See Performance Considerations on page 652 for details.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 633
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Connection Reset
Attribute
ConnectionReset (CR)
Purpose
Determines whether the state of connections that are removed from the connection pool for reuse by the
application is reset to the initial configuration of the connection.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the state of connections removed from the connection pool for reuse by an application is
reset to the initial configuration of the connection. Resetting the state can negatively impact performance
because additional commands must be sent over the network to the server to reset the state of the connection.
If set to 0 (Disabled), the state of connections is not reset.
Notes
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Pooling tab
See Also
See Performance Considerations on page 652 for details.
Attribute
ConnectionRetryCount (CRC)
Purpose
The number of times the driver retries connection attempts to the primary database server, and if specified,
alternate servers until a successful connection is established.
This option and the Connection Retry Delay connection option, which specifies the wait interval between
attempts, can be used in conjunction with failover.
Valid Values
0|x
where:
634 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Driver
Behavior
If set to 0, the driver does not try to connect after the initial unsuccessful attempt.
If set to x, the driver retries connection attempts the specified number of times. If a connection is not established
during the retry attempts, the driver returns an error that is generated by the last server to which it tried to
connect.
Default
0
GUI Tab
Failover tab
Attribute
ConnectionRetryDelay (CRD)
Purpose
Specifies the number of seconds the driver waits between connection retry attempts when Connection Retry
Count is set to a positive integer.
This option and the Connection Retry Count connection option can be used in conjunction with failover.
Valid Values
0|x
where:
Behavior
If set to 0, there is no delay between retries.
If set to x, the driver waits the specified number of seconds between connection retry attempts.
Default
3
GUI Tab
Failover tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 635
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Attribute
DataSourceName (DSN)
Purpose
Specifies the name of a data source in your Windows Registry or odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Attribute
DefaultLongDataBuffLen (DLDBL)
Purpose
The maximum length of data (in KB) the driver can fetch from long columns in a single round trip and the
maximum length of data that the driver can send using the SQL_DATA_AT_EXEC parameter.
Valid Values
An integer in multiples of 1024
The value must be in multiples of 1024 (for example, 1024, 2048). You need to increase the default value if
the total size of any Long data exceeds 1 MB. This value is multiplied by 1024 to determine the total maximum
length of fetched data. For example, if you enter a value of 2048, the maximum length of data would be 1024
x 2048, or 2097152 (2 MB).
Notes
• If this option is enabled, the Optimize Long Performance option is ignored.
• This connection option can affect performance.
Default
1024
636 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Driver
GUI Tab
Advanced tab
See Also
See Performance Considerations on page 652 for details.
Describe At Prepare
Attribute
DescribeAtPrepare (DAP)
Purpose
Determines whether the driver describes the SQL statement at prepare time.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver describes the SQL statement at prepare time.
If set to 0 (Disabled), the driver does not describe the SQL statement at prepare time.
Notes
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Advanced tab
See Also
See Performance Considerations on page 652 for details.
Description
Attribute
Description (n/a)
Purpose
Specifies an optional long description of a data source. This description is not used as a runtime connection
attribute, but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 637
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Attribute
EnableNcharSupport (ENS)
Purpose
Determines whether the driver provides support for the N-types NCHAR, NVARCHAR2, and NCLOB. These
types are described as SQL_WCHAR, SQL_WVARCHAR, and SQL_WLONGVARCHAR, and are returned
as supported by SQLGetTypeInfo. In addition, the "normal" char types (char, varchar2, long, clob) are described
as SQL_CHAR, SQL_VARCHAR, and SQL_LONGVARCHAR regardless of the character set on the Oracle
server.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver provides support for the N-types NCHAR, NVARCHAR2, and NCLOB.
If set to 0 (Disabled), the driver does not provide support for the N-types NCHAR, NVARCHAR2, and NCLOB.
Notes
• Valid only on Oracle 9i and higher.
Default
0 (Disabled)
GUI Tab
Advanced tab
See Also
See Unicode Support on page 656 for details.
638 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Driver
Attribute
EnableScrollableCursors (ESC)
Purpose
Determines whether scrollable cursors, both Keyset and Static, are enabled for the data source.
Valid Values
0|1
Behavior
If set to 1 (Enabled), scrollable cursors are enabled for the data source.
If set to 0 (Disabled), scrollable cursors are not enabled.
Notes
• This connection option can affect performance.
Default
1 (Enabled)
GUI Tab
Performance tab
See Also
See Performance Considerations on page 652 for details.
Enable SQLDescribeParam
Attribute
EnableDescribeParam (EDP)
Purpose
Determines whether the driver supports the SQLDescribeParam function, which allows an application to describe
parameters in SQL statements and in stored procedure calls.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver supports SQLDescribeParam. If using Microsoft Remote Data Objects (RDO)
to access data, you must use this value.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 639
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
If set to 0 (Disabled), the driver does not support SQLDescribeParam and returns the error: unimplemented
function.
Default
0 (Disabled)
GUI Tab
Advanced tab
Attribute
EnableStaticCursorsForLongData (ESCLD)
Purpose
Determines whether the driver supports Long columns when using a static cursor. Enabling this option causes
a performance penalty at the time of execution when reading Long data.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver supports Long columns when using a static cursor.
If set to 0 (Disabled), the driver does not support Long columns when using a static cursor.
Notes
• You must enable this option if you want to persist a result set that contains Long data into an XML data file.
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Performance tab
See Also
See Performance Considerations on page 652 for details.
Attribute
EnableTimestampwithTimezone (ETWT)
640 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Driver
Purpose
Determines whether the driver exposes timestamps with timezones to the application.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver exposes timestamps with timezones to the application. The driver issues an
ALTER SESSION at connection time to modify NLS_TIMESTAMP_TZ_FORMAT.
NLS_TIMESTAMP_TZ_FORMAT is changed to the ODBC definition of a timestamp literal with the addition of
the timezone literal: 'YYYY-MM-DD HH24:MI:SSXFF TZR'.
If set to 0 (Disabled), timestamps with timezones are not exposed to the application.
Default
0 (Disabled)
GUI Tab
Advanced tab
IANAAppCodePage
Attribute
IANAAppCodePage (IACP)
Purpose
An Internet Assigned Numbers Authority (IANA) value. You must specify a value for this option if your application
is not Unicode-enabled or if your database character set is not Unicode. The value you specify must match
the database character encoding and the system locale.
The driver uses the specified IANA code page to convert "W" (wide) functions to ANSI.
The driver and Driver Manager both check for the value of IANAAppCodePage in the following order:
• In the connection string
• In the Data Source section of the system information file (odbc.ini)
• In the ODBC section of the system information file (odbc.ini)
If the driver does not find an IANAAppCodePage value, the driver uses the default value of 4 (ISO 8859-1
Latin-1).
Valid Values
IANA_code_page
where:
IANA_code_page
is one of the valid values listed in "IANAAppCodePage values" in the Progress DataDirect for ODBC
Drivers Reference. The value must match the database character encoding and the system locale.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 641
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Notes
Refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers Reference
for details.
Default
4 (ISO 8559-1 Latin-1)
GUI Tab
Advanced tab
Attribute
LoadBalanceTimeout (LBT)
Purpose
The number of seconds to keep inactive connections open in a connection pool. An inactive connection is a
database session that is not associated with an ODBC connection handle, that is, a connection in the pool that
is not in use by an application.
Valid Values
0|x
where:
Behavior
If set to 0, inactive connections are kept open.
If set to x, inactive connections are closed after the specified number of seconds passes.
Notes
• The Min Pool Size option may cause some connections to ignore this value.
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Pooling tab
See Also
See Performance Considerations on page 652 for details.
642 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Driver
Load Balancing
Attribute
LoadBalancing (LB)
Purpose
Determines whether the driver uses client load balancing in its attempts to connect to the database servers
(primary and alternate). You can specify one or multiple alternate servers by setting the Alternate Servers
option.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses client load balancing and attempts to connect to the database servers
(primary and alternate servers) in random order.
If set to 0 (Disabled), the driver does not use client load balancing and connects to each server based on their
sequential order (primary server first, then, alternate servers in the order they are specified).
Notes
• This option has no effect unless alternate servers are defined for the Alternate Servers connection option.
Default
0 (Disabled)
GUI Tab
Failover tab
Attribute
LocalTimezoneOffset (LTZO)
Purpose
A value to alter local time zone information. The default is "" (empty string), which means that the driver
determines local time zone information from the operating system. If it is not available from the operating
system, the driver defaults to using the setting on the Oracle server.
Valid Values
Valid values are specified as offsets from GMT as follows: (–)HH:MM. For example, -08:00 equals GMT
minus 8 hours.
The driver uses the value of this option to issue an ALTER SESSION for local time zone at connection time.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 643
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Default
"" (Empty String)
GUI Tab
Advanced tab
Lock Timeout
Attribute
LockTimeout (LTO)
Purpose
Specifies the amount of time, in seconds, the Oracle server waits for a lock to be released before generating
an error when processing a Select...For Update statement on an Oracle 9i or higher server.
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, the server waits indefinitely for the lock to be released.
If set to 0, the server generates an error immediately and does not wait for the lock to time out.
If set to x, the server waits for the specified number of seconds for the lock to be released.
Notes
• If you are connected to an Oracle 8i server, any value greater than 0 is equivalent to the value -1.
• This connection option can affect performance.
Default
-1
GUI Tab
Performance tab
See Also
See Performance Considerations on page 652 for details.
644 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Driver
Attribute
MaxPoolSize (MXPS)
Purpose
The maximum number of connections allowed within a single connection pool. When the maximum number of
connections is reached, no additional connections can be created in the connection pool.
Valid Values
An integer from 1 to 65535
For example, if set to 20, the maximum number of connections allowed in the pool is 20.
Notes
• This connection option can affect performance.
Default
100
GUI Tab
Pooling tab
See Also
See Performance Considerations on page 652 for details.
Attribute
MinPoolSize (MNPS)
Purpose
The minimum number of connections that are opened and placed in a connection pool, in addition to the active
connection, when the pool is created. The connection pool retains this number of connections, even when
some connections exceed their Load Balance Timeout value.
Valid Values
0|x
where:
x is an integer from 1 to 65535.
Behavior
If set to 0, no connections are opened in addition to the current existing connection.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 645
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Notes
• This connection option can affect performance.
Example
If set to 5, the start-up number of connections in the pool is 5 in addition to the current existing connection.
Default
0
GUI Tab
Pooling tab
See Also
See Performance Considerations on page 652 for details.
Attribute
OptimizeLongPerformance (OLP)
Purpose
Allows the driver to fetch Long data directly into the application’s buffers rather than allocating buffers and
making a copy. This option decreases fetch times on Long data; however, it can cause the application to be
limited to one active statement per connection.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver fetches Long data directly into the application’s buffers rather than allocating
buffers and making a copy.
If set to 0 (Disabled), the driver does not fetch Long data directly into the application’s buffers.
Notes
• If this option is enabled, the Default Buffer Size for Long/LOB Columns option is ignored.
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Performance tab
646 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Driver
See Also
See Performance Considerations on page 652 for details.
Password
Attribute
Password (PWD)
Purpose
The password that the application uses to connect to your database. The Password option cannot be specified
through the driver Setup dialog box and should not be stored in a data source. It is specified through the Logon
dialog box or a connection string.
Valid Values
pwd
where:
pwd
is a valid password.
Default
None
GUI Tab
n/a
Attribute
ProcedureRetResults (PRR)
Purpose
Determines whether the driver returns result sets from stored procedures/functions.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver returns result sets from stored procedures/functions. When set to 1 and you
execute a stored procedure that does not return result sets, you will incur a small performance penalty.
If set to 0 (Disabled), the driver does not return result sets from stored procedures.
Default
0 (Disabled)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 647
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
GUI Tab
Advanced tab
See Also
See MTS Support on page 658 for details.
Attribute
ReportCodepageConversionErrors (RCCE)
Purpose
Specifies how the driver handles code page conversion errors that occur when a character cannot be converted
from one character set to another.
An error message or warning can occur if an ODBC call causes a conversion error, or if an error occurs during
code page conversions to and from the database or to and from the application. The error or warning generated
is Code page conversion error encountered. In the case of parameter data conversion errors, the
driver adds the following sentence: Error in parameter x, where x is the parameter number. The standard
rules for returning specific row and column errors for bulk operations apply.
Valid Values
0|1|2
Behavior
If set to 0 (Ignore Errors), the driver substitutes 0x1A for each character that cannot be converted and does
not return a warning or error.
If set to 1 (Return Error), the driver returns an error instead of substituting 0x1A for unconverted characters.
If set to 2 (Return Warning), the driver substitutes 0x1A for each character that cannot be converted and returns
a warning.
Default
0 (Ignore Errors)
GUI Tab
Advanced tab
Attribute
ReportRecycleBin (RRB)
Purpose
Determines whether support is provided for reporting objects that are in the Oracle Recycle Bin.
648 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Driver
On Oracle 10g R1 and higher, when a table is dropped, it is not actually removed from the database, but placed
in the recycle bin instead.
Valid Values
0|1
Behavior
If set to 1 (Enabled), support is provided for reporting objects that are in the Oracle Recycle Bin.
If set to 0 (Disabled), the driver does not return tables contained in the recycle bin in the result sets returned
from SQLTables and SQLColumns. Functionally, this means that the driver filters out any results whose Table
name begins with BIN$.
Default
0 (Disabled)
GUI Tab
Advanced tab
Server List
Attribute
ServerList
Purpose
A list of client connection strings that appear in the logon dialog box. This option applies to GUIs only and is
not a runtime connection string attribute.
Valid Values
string
where:
string
is a list of valid client connection strings. Separate the strings with commas. If the client connection
string contains a comma, enclose it in quotation marks, for example, "Serv,1", "Serv,2",
"Serv,3".
Default
None
GUI Tab
Advanced tab
See Also
See Performance Considerations on page 652 for details about the logon dialog box.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 649
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Server Name
Attribute
ServerName (SRVR)
Purpose
The client connection string of the computer containing the Oracle database tables you want to access.
Valid Values
string
where:
string
For local servers, use the SQL*Net connection string. If the SQL*Net connection string contains semicolons,
enclose it in quotation marks. Refer to your SQL*Net documentation for more information.
For remote servers, the Oracle TNS Client connection string is the alias name of the Oracle Listener on your
network.
Default
None
GUI Tab
General tab
Attribute
TimestampEscapeMapping (TEM)
Purpose
Determines how the driver maps Date, Time, and Timestamp literals.
Valid Values
0|1
Behavior
If set to 0 (Oracle Version Specific), the driver determines whether to use the TO_DATE or TO_TIMESTAMP
function based on the version of the Oracle server to which it is connected. If the driver is connected to an 8.x
server, it maps the Date, Time, and Timestamp literals to the TO_DATE function. If the driver is connected to
a 9.x or higher server, it maps these escapes to the TO_TIMESTAMP function.
If set to 1 (Oracle 8x Compatible), the driver always uses the Oracle 8.x TO_DATE function as if connected to
an Oracle 8.x server.
650 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Driver
Default
0 (Oracle Version Specific)
GUI Tab
Advanced tab
Attribute
UseCurrentSchema (UCS)
Purpose
Determines whether the driver returns only procedures owned by the current user when executing
SQLProcedures.
Valid Values
0|1
Behavior
When set to 1 (Enabled), the call for SQLProcedures is optimized, but only procedures owned by the user are
returned.
When set to 0 (Disabled), the driver does not specify only the current user.
Notes
• This connection option can affect performance.
Default
1 (Enabled)
GUI Tab
Performance tab
See Also
See Performance Considerations on page 652 for details.
User Name
Attribute
LogonID (UID)
Purpose
The default user ID that is used to connect to your database. Your ODBC application may override this value
or you may override it in the logon dialog box or connection string.
You can also use OS Authentication to connect to your Oracle database.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 651
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Valid Values
userid
where:
userid
Default
None
GUI Tab
Advanced tab
See Also
See OS Authentication on page 658 for details.
Performance Considerations
The following connection options can enhance driver performance.
Application Using Threads (ApplicationUsingThreads): The driver coordinates concurrent database
operations (operations from different threads) by acquiring locks. Although locking prevents errors in the driver,
it also decreases performance. If your application does not make ODBC calls from different threads, the driver
has no reason to coordinate operations. In this case, the ApplicationUsingThreads attribute should be disabled
(set to 0).
Note: If you are using a multi-threaded application, you must enable the Application Using Threads option.
Array Size (ArraySize): If this connection string attribute is set appropriately, the driver can improve performance
of your application by reducing the number of round trips on the network. For example, if your application
normally retrieves 200 rows, it is more efficient for the driver to retrieve 200 rows at one time over the network
than to retrieve 50 rows at a time during four round trips over the network.
Catalog Functions Include Synonyms (CatalogIncludesSynonyms): Standard ODBC behavior is to include
synonyms in the result set of calls to the following catalog functions: SQLProcedures, SQLStatistics and
SQLProcedureColumns. Retrieving this synonym information degrades performance. If your ODBC application
does not need to return synonyms when using these catalog functions, the driver can improve performance if
the CatalogIncludesSynonyms attribute is disabled (set to 0).
Catalog Options (CatalogOptions): If your application does not need to access the comments/remarks for
database tables, performance of your application can be improved. In this case, the CatalogOptions attribute
should be disabled (set to 0) because retrieving comments/remarks degrades performance. If this attribute is
enabled (set to 1), result column REMARKS (for the catalog functions SQLTables and SQLColumns) and the
result column COLUMN_DEF (for the catalog function SQLColumns) return actual values.
Default Buffer Size for Long/LOB Columns (DefaultLongDataBuffLen): To improve performance when
your application fetches images, pictures, or long text or binary data, a buffer size can be set to accommodate
the maximum size of the data. The buffer size should only be large enough to accommodate the maximum
amount of data retrieved; otherwise, performance is reduced by transferring large amounts of data into an
oversized buffer. If your application retrieves more than 1 MB of data, the buffer size should be increased
accordingly.
652 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Driver
Describe At Prepare (DescribeAtPrepare): When enabled, this option requires extra network traffic. If your
application does not require result set information at prepare time (for instance, you request information about
the result set using SQLColAttribute(s), SQLDescribeCol, SQLNumResultCols, and so forth, before calling
SQLExecute on a prepared statement), you can increase performance by disabling this option.
Enable Scrollable Cursors (EnableScrollableCursors) and Enable Static Cursors for Long Data
(EnableStaticCursorsForLongData): When your application uses Static or Keyset (Scrollable) cursors, the
EnableScrollableCursors attribute must be enabled (set to 1). Also, if your application retrieves images, pictures,
long text or binary data while using Static cursors, the EnableStaticCursorsForLongData attribute must be
enabled (set to 1). However, this can degrade performance when retrieving long data with Static cursors as
the entire result set is stored on the client. To improve performance, you might consider designing your application
to retrieve long data through forward-only cursors.
Lock Timeout (LockTimeOut): Sometimes users attempt to select data that is locked by another user. Oracle
provides three options when accessing locked data with SELECT … FOR UPDATE statements:
Some applications may benefit by not waiting indefinitely and continuing execution; this keeps the application
from hanging. The application, however, needs to handle lock timeouts properly with an appropriate timeout
value; otherwise, processing time could be wasted handling lock timeouts, and deadlocks could go undetected.
To improve performance, either enter a number of seconds or enter 0 as the value for this option.
Optimize Long Performance (OptimizeLongPerformance): When enabled, this option fetches Long data
directly into the application's buffers rather than allocating buffers and making a copy. Also, when enabled, this
option decreases fetch times on Long data; however, it can cause the application to be limited to one active
statement per connection.
Procedure Returns Results (ProcedureRetResults): The driver can be tuned for improved performance if
your application's stored procedures do not return results. In this case, the ProcedureRetResults attribute
should be disabled (set to 0).
Use Current Schema for SQLProcedures (UseCurrentSchema): If your application needs to access database
objects owned only by the current user, performance of your application can be improved. In this case, the
UseCurrentSchema attribute should be enabled (set to 1). When this attribute is enabled, the driver returns
only database objects owned by the current user when executing catalog functions. Calls to catalog functions
are optimized by grouping queries. Enabling this attribute is equivalent to passing the Logon ID used on the
connection as the SchemaName argument to the catalog functions.
Data Types
The following table shows how the Oracle data types are mapped to the standard ODBC data types. Unicode
Support on page 656 lists Oracle to Unicode data type mappings.
Oracle ODBC
46
BFILE SQL_LONGVARBINARY
46
Read-Only
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 653
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Oracle ODBC
47
BINARY DOUBLE SQL_REAL
47
BINARY FLOAT SQL_DOUBLE
48
BLOB SQL_LONGVARBINARY
49
CHAR SQL_CHAR
48, 50
CLOB SQL_LONGVARCHAR
DATE SQL_TYPE_TIMESTAMP
51
LONG SQL_LONGVARCHAR
NUMBER SQL_DOUBLE
RAW SQL_VARBINARY
Oracle ODBC
53
TIMESTAMP SQL_TIMESTAMP
53
TIMESTAMP WITH LOCAL TIMEZONE SQL_TIMESTAMP
53
TIMESTAMP WITH TIMEZONE SQL_VARCHAR
55
VARCHAR2 SQL_VARCHAR
56
XMLType SQL_LONGVARCHAR
47
Supported only on Oracle 10g and higher.
48
Valid when connecting to Oracle 8 servers; these data types support output parameters to stored procedures
49
If the database character set is set to UTF-8, the Oracle driver maps the CHAR data type to SQL_WCHAR.
50
If the database character set is set to UTF-8, the Oracle driver maps the CLOB data type to SQL_WLONGVARCHAR.
51
If the database character set is set to UTF-8, the Oracle driver maps the LONG data type to SQL_WLONGVARCHAR.
52
Supported only when the EnableNcharSupport connection option is enabled.
53
Supported only on Oracle 9i and higher.
54
If the database character set is set to UTF-8, the Oracle driver maps the VARCHAR2 data type to SQL_WVARCHAR.
55 54
If the database character set is set to UTF-8, the Oracle driver maps the VARCHAR2 data type to SQL_WVARCHAR.
56
XMLType columns with binary or object relational storage are not supported.
654 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Driver
The Oracle driver does not support any object types (also known as abstract data types). When the driver
encounters an object type during data retrieval, it will return an Unknown Data Type error (SQL State HY000).
See Retrieving Data Type Information on page 72 for more information about data types.
XMLType
The driver supports tables containing columns whose data type is specified as XMLType, except those with
binary or object relational storage. The driver supports tables containing columns whose data type is specified
as XMLType.
When inserting or updating XMLType columns, the data to be inserted or updated must be in the form of an
XMLType data type. The database provides functions to construct XMLType data. The xmlData argument to
xmltype( ) may be specified as a string literal.
Examples
If the XMLType column is created with the CLOB storage type, then the driver returns it without use of the
special getClobVal function, that is, you can use:
instead of
SELECT XML_col.getClobVal()...
The next example illustrates how to create a table, insert data, and retrieve data when not using the CLOB
storage type:
CREATE TABLE PURCHASEORDER (PODOCUMENT sys.XMLTYPE);
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 655
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
<CostCenter>S30</CostCenter>
<ShippingInstructions>
<name>David E. Blake</name>
<address>400 Oracle Parkway Redwood Shores, CA, 94065 USA</address>
<telephone>650 999 9999</telephone>
</ShippingInstructions>
<SpecialInstructions>Air Mail</SpecialInstructions>
<LineItems>
<LineItem ItemNumber="1">
<Description>The Birth of a Nation</Description>
<Part Id="EE888" UnitPrice="65.39" Quantity="31"/>
</LineItem>
</LineItems>
</PurchaseOrder>
'));
Unicode Support
The Oracle driver uses the NLS_LANG environment variable setting of the Oracle client to determine how to
transmit data to the client.
On Windows, UNIX, and Linux, a Unicode setting is determined if the NLS_LANG environment variable is set
to:
LANGUAGE_TERRITORY.CHARSET
where CHARSET is either UTF8, AL24UTFFSS, or AL32UTF8. For example:
AMERICAN_AMERICA.UTF8
Alternatively, on Windows, instead of the NLS_LANG environment variable, the value of the
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\oracle_home_key registry key can be set to:
LANGUAGE_TERRITORY.CHARSET
where oracle_home_key is HOME0 for Oracle 9i R2 and earlier, and is the Oracle home name used at the
time of client installation for Oracle 10g.
If the CHARSET is a Unicode setting and a Unicode application is accessing the driver, then no data conversion
is necessary. If an ANSI application is accessing the driver, then the driver must convert the data from the
application from ANSI to Unicode (UTF-8) for the client.
If the CHARSET is ANSI and an ANSI application is accessing the driver, then no data conversion is necessary.
If a Unicode application is accessing the driver, then the driver must convert the data from the application from
Unicode to ANSI for the client.
If NLS_LANG is set to UTF-8, the Oracle driver maps the Oracle data types to Unicode data types as shown
in the following table:
CHAR SQL_WCHAR
CLOB SQL_WLONGVARCHAR
656 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Driver
VARCHAR2 SQL_WVARCHAR
LONG SQL_WLONGVARCHAR
The driver also continues to map these Oracle data types to the normal character data types. See Data Types
on page 653 for these mappings.
The driver supports the Unicode ODBC W (Wide) function calls, such as SQLConnectW. This allows the Driver
Manager to transmit these calls directly to the driver. Otherwise, the Driver Manager would incur the additional
overhead of converting the W calls to ANSI function calls, and vice versa.
See UTF-16 Applications on UNIX and Linux on page 137 for related details.
Also, refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers
Reference for a more detailed explanation of Unicode.
Advanced Features
The driver supports failover and its related connection options. Failover connection options are located on the
Failover tab of the driver Setup dialog box. See Using Failover on page 78 for a general description of failover
and its implementation.
Unexpected Characters
Users are sometimes surprised when they insert a character into a database, only to have a different character
displayed when they fetch it from the database. There are many reasons this can happen, but it most often
involves code page issues, not driver errors.
Client and server machines in a database system each use code pages, which can be identified by a name or
a number, such as Shift_JIS (Japanese) or cp1252 (Windows English). A code page is a mapping that associates
a sequence of bits, called a code point, with a specific character. Code pages include the characters and
symbols of one or more languages. Regardless of geographical location, a machine can be configured to use
a specific code page. Most of the time, a client and database server would use similar, if not identical, code
pages. For example, a client and server might use two different Japanese code pages, such as Shift_JIS and
EUC_JP, but they would still share many Japanese characters in common. These characters might, however,
be represented by different code points in each code page. This introduces the need to convert between code
pages to maintain data integrity. In some cases, no one-to-one character correspondence exists between the
two code points. This causes a substitution character to be used, which can result in displaying an unexpected
character on a fetch.
When the driver on the client machine opens a connection with the database server, the driver determines the
code pages being used on the client and the server. This is determined from the Active Code Page on a
Windows-based machine. If the client machine is UNIX-based, the driver checks the IANAAppCodePage option.
If it does not find a specific setting for IACP, it defaults to a value of ISO_8859_1.
If the client and server code pages are compatible, the driver transmits data in the code page of the server.
Even though the pages are compatible, a one-to-one correspondence for every character may not exist. If the
client and server code pages are completely dissimilar, for example, Russian and Japanese, then many
substitutions occur because very few, if any, of the characters are mapped between the two code pages.
The following is a specific example of an unexpected character:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 657
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Check the returned hexadecimal values to verify whether the data you intended to reside in the table is there.
If it appears that Oracle substituted a different code point, then check the Oracle database code page to see
if your intended character exists. If your character does not exist in the code page, then no error is involved;
Oracle simply does not recognize the original character, and uses its substitution character instead.
MTS Support
On Windows, the driver can take advantage of Microsoft Transaction Server (MTS) capabilities, specifically,
the Distributed Transaction Coordinator (DTC) using the XA Protocol. For a general discussion of MTS and
DTC, refer to the help file of the Microsoft Transaction Server SDK.
Note: The DataDirect Connect for ODBC 32-bit drivers can operate in a 64-bit Windows environment; however,
they do not support DTC in this environment. Only the DataDirect Connect64 for ODBC 64-bit drivers support
DTC in a 64-bit Windows environment.
To enable DTC support, you must be accessing Oracle 8.0.5 or higher servers using Oracle Net8 Client 8.1.6
or higher.
OS Authentication
On Windows, UNIX, and Linux, Oracle has a feature called OS Authentication that allows you to connect to an
Oracle database via the operating system user name and password. To connect, use a forward slash ( / ) for
the user name and leave the password blank. To configure the Oracle server, refer to the Oracle server
documentation. This feature is valid when connecting from a data source, a connection string, or a logon dialog
box.
658 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Oracle Driver
When executing the stored procedures with result sets, do not include the result set arguments (Oracle ref
cursors) in the list of procedure parameters. The result set returned through the ref cursor is returned as a
normal ODBC result set.
{call GEN_PROCEDURE1 (?)}
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 659
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Note: If you are persisting a result set that contains Long data, you must enable the
EnableStaticCursorsforLongData connection string attribute.
SQL Support
The driver supports the core SQL grammar.
• SQLColumnPrivileges
• SQLDescribeParam (if EnableDescribeParam=1)
• SQLForeignKeys
• SQLPrimaryKeys
• SQLProcedures
• SQLProcedureColumns
• SQLSetPos
• SQLTablePrivileges
Refer to "ODBC API and scalar functions" in the Progress DataDirect for ODBC Drivers Reference for a list of
supported API functions.
660 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Legacy Wire Protocol Driver
Driver Requirements
The driver has no client requirements.
Windows
For support of Microsoft SQL Server 7.0, 2000, and 2005, the driver requires the SQL Server 7.0 versions
of Net-Library DLL files, which are installed when you install the SQL Server Legacy Wire Protocol driver. The
driver communicates with network software through the SQL Server Net-Library interface.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 661
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
On Windows, data sources are stored in the Windows Registry. You can configure and modify data sources
through the ODBC Administrator using a driver Setup dialog box, as described in this section.
On UNIX and Linux, data sources are stored in the odbc.ini file. On Linux, you can configure and
modify data sources through the Linux ODBC Administrator using a driver Setup dialog box, as described in
this section.
Note: This book shows dialog box images that are specific to Windows. If you are using the drivers in the
Linux environment, the dialog box that you see may differ slightly from the Windows version. Windows-only
and UNIX-only connection options are specifically noted by icons in the Setup dialog box descriptions.
When the driver is first installed, the values of its connection options are set by default. These values appear
on the driver Setup dialog box tabs when you create a new data source. You can change these default values
by modifying the data source. In the following procedure, the description of each tab is followed by a table that
lists the connection options for that tab and their initial default values. This table links you to a complete
description of the options and their connection string attribute equivalents. The connection string attributes are
used to override the default values of the data source if you want to change these values at connection time.
To configure a Microsoft SQL Server data source:
662 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Legacy Wire Protocol Driver
• On Windows, start the ODBC Administrator by selecting its icon from the Progress DataDirect
program group.
2. Select a tab:
• User DSN: If you are configuring an existing user data source, select the data source name and click
Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the
driver and click Finish to display the driver Setup dialog box.
• System DSN: If you are configuring an existing system data source, select the data source name
and click Configure to display the driver Setup dialog box.
If you are configuring a new system data source, click Add to display a list of installed drivers. Select
the driver and click Finish to display the driver Setup dialog box.
• File DSN: If you are configuring an existing file data source, select the data source file and click Configure
to display the driver Setup dialog box.
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select
a driver. Click Advanced if you want to specify attributes; otherwise, click Next to proceed. Specify a
name for the data source and click Next. Verify the data source information; then, click Finish to display
the driver Setup dialog box.
Note: The General tab displays only fields that are required for creating a data source. The fields on all
other tabs are optional, unless noted otherwise.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 663
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
3. On this tab, provide values for the options in the following table; then, click Apply. The table provides links
to descriptions of the connection options.
4. Optionally, click the Advanced tab to specify additional data source settings.
Figure 70: Advanced tab
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
664 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Legacy Wire Protocol Driver
Translate : Click Translate to display the Select Translator dialog box, which lists the translators
specified in the ODBC Translators section of the Registry. Progress DataDirect provides a translator named
OEM to ANSI that translates your data from the IBM PC character set to the ANSI character set.
Select a translator; then, click OK to close this dialog box.
5. Optionally, click the Failover tab to specify failover data source settings. This tab is available
only on UNIX and Linux.
See Using Failover on page 78 for a general description of failover and its related connection options.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
6. At any point during the configuration process, you can click Test Connect to attempt to connect to the data
source using the connection options specified in the driver Setup dialog box. A Login dialog box appears;
see Using a Connection String on page 666 for details. Note that the information you enter in the Login dialog
box during a test connect is not saved.
• If the driver can connect, it releases the connection and displays a Connection Established message.
Click OK.
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message. Click OK.
7. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 665
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
DSN=data_source_name[;attribute=value[;attribute=value]...]
FILEDSN=filename.dsn[;attribute=value[;attribute=value]...]
The DSN-less connection string specifies a driver instead of a data source. All connection information must be
entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
Connection Option Descriptions on page 667 provides the long and short names for each attribute, as well as
the initial default value when the driver is first installed. You can specify either long or short names in the
connection string.
An example of a DSN connection string with overriding attribute values for Microsoft SQL Server is:
DSN=ACCOUNTING;DATABASE=ACCT
666 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Legacy Wire Protocol Driver
1. Type an IP address in Server in the following format: IP_address, port_number. For example, you can
enter 199.226.224.34,5000. If your network supports named servers, you can specify an address as:
server_name, port_number. For example, you can enter SSserver,5000.
The IP address can be specified in IPv4 on Windows, and in either IPv4 or IPv6 format, or a combination
of the two, on UNIX. See Using IP Addresses on page 67 for details about these formats.
To specify a named instance of Microsoft SQL Server, use the format: server_name\instance_name.
If only a server name is specified with no instance name, the driver uses the default named instance on the
server.
Type the name of a server on your network. It must be an entry on the Alias tab of the SQL Server
Network Client Utility or the network name of a server running Microsoft SQL Server.
You can enter (local) when the driver is on the same computer as the Microsoft SQL Server database.
You can connect to a local copy of Microsoft SQL Server, even when it is a non-networked version. Microsoft
SQL Server 2000 and higher support multiple instances of Microsoft SQL Server running on the same
computer.
2. Select the Use Trusted Connection check box to specify that the SQL Server Legacy Wire Protocol
driver request a secure (or trusted) connection to Microsoft SQL Server. SQL Server uses integrated login
security to establish connections using this data source, regardless of the current login security mode at
the server. Any login ID or password supplied is ignored. The Microsoft SQL Server system administrator
must have associated your Windows network ID with a Microsoft SQL Server login ID.
Clear this box to specify that Microsoft SQL Server use standard login security to establish connections
using this data source. You must specify a login ID and password for all connection requests.
3. Type the Microsoft SQL Server login ID to use for the connection if Use Trusted Connection is not selected.
If Use Trusted Connection is selected, the Login ID field is disabled.
4. Type the password to use for the connection if Use Trusted Connection is not selected. If Use Trusted
Connection is selected, the Password field is disabled.
5. Type the name of the database to which you want to connect. If you do not specify a value, the default
database defined by Microsoft SQL Server is used.
6. Click OK to log on to the Microsoft SQL Server database installed on the server you specified and to update
the values in the Registry.
Note: SQL Server driver connection string attributes do not use short name equivalents.
The following lists the connection string attributes supported by the SQL Server Legacy Wire Protocol driver
on Windows.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 667
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Windows
Table 43: SQL Server Legacy Wire Protocol Attribute Names on Windows
Attribute Default
APP None
AttachDBFileName None
DATABASE None
LANGUAGE None
Network None
QueryLog_On no (Disabled)
QueryLogFile None
QueryLogTime None
QuotedID no (Disabled)
SAVEFILE None
SERVER None
SnapshotSerializable 0 (Disabled)
StatsLog_On no (Disabled)
StatsLogFile None
Trusted_Connection no (Disabled)
668 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Legacy Wire Protocol Driver
Attribute Default
WSID None
Note: SQL Server driver connection string attributes do not use short name equivalents.
Table 44: SQL Server Legacy Wire Protocol Attribute Names on UNIX/Linux
Attribute Default
Address None
AlternateServers None
APP None
ConnectionRetryCount 0
ConnectionRetryDelay 3
DataSourceName None
DATABASE None
LANGUAGE None
QuotedID no (Disabled)
SnapshotSerializable 0 (Disabled)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 669
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Attribute Default
WSID None
Alternate Servers
Attribute
AlternateServers
Purpose
A list of alternate database servers to which the driver tries to connect if the primary database server is
unavailable. Specifying a value for this option enables connection failover for the driver. The value you specify
must be in the form of a string that defines the physical location of each alternate server. All of the other required
connection information for each alternate server is the same as what is defined for the primary server connection.
Valid Values
(Address=addressvalue[, . . .])
Example
The following two Alternate Servers values define two alternate database servers for connection failover:
AlternateServers=(Address=MySQLServer\Instance1,
Address="255.125.1.11, 5002")
In this example, the network address of the last alternate contains commas. In this case, enclose the network
address with double quotation marks as shown.
Notes
• An alternate server address in IPv6 format must be enclosed in double quotation marks.
Default
None
GUI Tab
Failover tab
AnsiNPW
Attribute
AnsiNPW
670 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Legacy Wire Protocol Driver
Purpose
Determines whether ANSI-defined behaviors are exposed.
Valid Values
yes | no
Behavior
When set to yes (Enabled), the driver uses ANSI-defined behaviors for handling NULL comparisons, character
data padding, warnings, and NULL concatenation. If the driver appears to be truncating trailing blank spaces,
this attribute should be set to no.
When set to no (Disabled), ANSI-defined behaviors are not exposed.
Default
yes (Enabled)
GUI Tab
n/a
Application Name
Attribute
APP
Purpose
The name Microsoft SQL Server uses to identify your application.
Valid Values
string
where:
string
Default
None
GUI Tab
Advanced tab
AttachDBFileName
Attribute
AttachDBFileName
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 671
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
The name of the primary file of an attachable database.
Valid Values
string
where:
string
Include the full path and escape any slash ( \ ) characters if using a C character string variable:
AttachDBFileName=C:\\MyFolder\\MyDB.mdf
This database is attached and becomes the default database for the connection. To use AttachDBFileName,
you must also specify the database name in either the SQLDriverConnnect DATABASE parameter or the
SQL_COPT_CURRENT_CATALOG connection attribute. If the database was previously attached,
Microsoft SQL Server will not reattach it; it will use the attached database as the default for the connection.
Default
None
GUI Tab
n/a
AutoTranslate
Attribute
AutoTranslate
Purpose
Determines how ANSI character strings are translated.
Valid Values
yes | no
Behavior
If set to yes (Enabled), ANSI character strings sent between the client and server are translated by converting
through Unicode to minimize problems in matching extended characters between the code pages on the client
and the server.
These conversions are performed on the client by the SQL Server Legacy Wire Protocol driver. This requires
that the same ANSI code page (ACP) used on the server be available on the client.
These settings have no effect on the conversions that occur for the following transfers:
• Unicode SQL_C_WCHAR client data sent to char, varchar, or text on the server.
• Char, varchar, or text server data sent to a Unicode SQL_C_WCHAR variable on the client.
• ANSI SQL_C_CHAR client data sent to Unicode nchar, nvarchar, or ntext on the server.
672 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Legacy Wire Protocol Driver
• Unicode char, varchar, or text server data sent to an ANSI SQL_C_CHAR variable on the client.
If set to no (Disabled), character translation is not performed.
The SQL Server Legacy Wire Protocol driver does not translate client ANSI character SQL_C_CHAR data sent
to char, varchar, or text variables, parameters, or columns on the server. No translation is performed on char,
varchar, or text data sent from the server to SQL_C_CHAR variables on the client. If the client and Microsoft
SQL Server are using different ACPs, then extended characters can be misinterpreted.
Default
yes (Enabled)
GUI Tab
n/a
Attribute
ConnectionRetryCount
Purpose
The number of times the driver retries connection attempts to the primary database server, and if specified,
alternate servers until a successful connection is established.
The Connection Retry Delay option specifies the wait interval, in seconds, to occur between retry attempts.
Valid Values
0|x
where:
Behavior
If set to 0, the driver does not try to connect after the initial unsuccessful attempt.
If set to x, the driver retries connection attempts the specified number of times. If a connection is not established
during the retry attempts, the driver returns an error that is generated by the last server to which it tried to
connect.
Default
0
GUI Tab
Failover tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 673
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Attribute
ConnectionRetryDelay
Purpose
The number of seconds the driver waits between connection retry attempts when Connection Retry Count is
set to a positive integer.
Valid Values
0|x
where:
Behavior
If set to 0, there is no delay between retries.
If set to x, the driver waits between connection retry attempts the specified number of seconds.
Default
3
GUI Tab
Failover tab
Attribute
DataSourceName (DSN)
Purpose
Specifies the name of a data source in your Windows Registry or odbc.ini file.
Valid Values
string
where:
string
674 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Legacy Wire Protocol Driver
Default
None
GUI Tab
General tab
Database Name
Attribute
DATABASE
Purpose
Specifies the name of the database to which you want to connect.
Valid Values
database_name
where:
database_name
Default
None
GUI Tab
General tab
Attribute
UID (use LogonID for odbc.ini file)
Purpose
The default user ID used to connect to your database. Your ODBC application may override this value or you
may override it in the logon dialog box or connection string.
Valid Values
userid
where:
userid
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 675
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Default
None
GUI Tab
Advanced tab
Description
Attribute
Description (n/a)
Purpose
Specifies an optional long description of a data source. This description is not used as a runtime connection
attribute, but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Attribute
QuotedID
Purpose
Determines whether the driver allows the use of quoted identifiers.
Valid Values
yes | no
676 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Legacy Wire Protocol Driver
Behavior
If set to yes (Enabled), Microsoft SQL Server enforces ANSI rules regarding quotation marks. Double quotation
marks can only be used for identifiers, such as column and table names. Character strings must be enclosed
in single quotation marks, for example:
SELECT "au_id"
FROM "authors"
WHERE "au_lname" = 'O''Brien'
If set to no (Disabled), applications that use quoted identifiers encounter errors when they generate SQL
statements with quoted identifiers.
Default
no (Disabled)
GUI Tab
Advanced tab
Attribute
FetchTSWTZasTimestamp (FTSWTZAT)
Purpose
Determines whether the driver returns column values with the timestamp with time zone data type as the ODBC
data type SQL_TYPE_TIMESTAMP or SQL_VARCHAR.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver returns column values with the timestamp with time zone data type as the ODBC
type SQL_TYPE_TIMESTAMP. The time zone information in the fetched value is truncated. Use this value if
your application needs to process values the same way as TIMESTAMP columns.
If set to 0 (Disabled), the driver returns column values with the timestamp with time zone data type as the
ODBC data type SQL_VARCHAR. Use this value if your application requires the time zone information in the
fetched value.
Default
0 (Disabled)
GUI Tab
Advanced tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 677
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Attribute
FetchTWFSasTime (FTWFSAT)
Purpose
Determines whether the driver returns column values with the time data type as the ODBC data type
SQL_TYPE_TIME or SQL_TYPE_TIMESTAMP.
Supported only for Microsoft SQL Server 2008.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver returns column values with the time data type as the ODBC data type
SQL_TYPE_TIME. The fractional seconds portion of the value is truncated.
If set to 0 (Disabled), the driver returns column values with the time data type as the ODBC data type
SQL_TYPE_TIMESTAMP. The fractional seconds portion of the value is preserved. Time columns are not
searchable when they are described and fetched as timestamp.
Notes
• When returning time with fractional seconds data as SQL_TYPE_TIMESTAMP, the Year, Month and Day
parts of the timestamp must be set to zero.
Default
0 (Disabled)
GUI Tab
Advanced tab
IANAAppCodePage
Attribute
IANAAppCodePage
Purpose
An Internet Assigned Numbers Authority (IANA) value. You must specify a value for this option if your application
is not Unicode-enabled or if your database character set is not Unicode. The value you specify must match
the database character encoding and the system locale.
The driver uses the specified IANA code page to convert "W" (wide) functions to ANSI.
The driver and Driver Manager both check for the value of IANAAppCodePage in the following order:
• In the connection string
• In the Data Source section of the system information file (odbc.ini)
678 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Legacy Wire Protocol Driver
Valid Values
IANA_code_page
where:
IANA_code_page
is one of the valid values listed in "IANAAppCodePage values" in the Progress DataDirect for ODBC
Drivers Reference. The value must match the database character encoding and the system locale.
Notes
Refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers Reference
for details.
Default
4 (ISO 8559-1 Latin-1)
GUI Tab
Advanced tab
Language
Attribute
LANGUAGE
Purpose
The national language to use for Microsoft SQL Server system messages.
Valid Values
lang
where:
lang
is the language to use for Microsoft SQL Server system messages. This overrides the default language
specified for the login on the server. If no language is specified, the connection uses the default
language specified for the login on the server.
Default
None
GUI Tab
Advanced tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 679
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Load Balancing
Attribute
LoadBalancing (LB)
Purpose
Determines whether the driver uses client load balancing in its attempts to connect to the database servers
(primary and alternate). You can specify one or multiple alternate servers by setting the Alternate Servers
option.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses client load balancing and attempts to connect to the database servers
(primary and alternate servers) in random order.
If set to 0 (Disabled), the driver does not use client load balancing and connects to each server based on their
sequential order (primary server first, then, alternate servers in the order they are specified).
Default
0 (Disabled)
GUI Tab
Failover tab
Network
Attribute
Network
Purpose
The name of a network library dynamic-link library.
Valid Values
string
where:
string
is the name of a network library dynamic-link library. The name need not include the path and must
not include the .DLL file name extension, for example, Network=dbnmpntw.
680 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Legacy Wire Protocol Driver
Default
None
GUI Tab
n/a
PWD
Attribute
PWD (use Password for odbc.ini file)
Purpose
The password that the application uses to connect to your database. The Password option cannot be specified
through the driver Setup dialog box and should not be stored in a data source. It is specified through the Logon
dialog box or a connection string.
Valid Values
pwd
where:
pwd
is a valid password.
Default
None
GUI Tab
n/a
QueryLogFile
Attribute
QueryLogFile
Purpose
The full path and file name of a file to be used for logging data about long-running queries. The QueryLog_On
option must be set to yes.
Valid Values
string
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 681
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
string
is the full path and file name of the file to be used for logging data.
Default
None
GUI Tab
n/a
QueryLog_On
Attribute
QueryLog_on
Purpose
Determines whether data about long-running queries data is logged.
Valid Values
yes | no
Behavior
When set to yes (Enabled), logging data about long-running queries data is enabled on the connection.
When set to no (Disabled), long-running query data is not logged.
Default
no (Disabled)
GUI Tab
n/a
QueryLogTime
Attribute
QueryLogTime
Purpose
A digit character string specifying the threshold for logging data about long-running queries.
Valid Values
string
where string is a digit character string specifying the threshold in milliseconds, for logging data.
Any query that does not receive a response in the time specified is written to the long-running query log file.
682 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Legacy Wire Protocol Driver
Default
None
GUI Tab
n/a
Regional
Attribute
Regional
Purpose
Determines how currency, date, and time data are converted.
Valid Values
yes | no
Behavior
When set to yes (Enabled), the SQL Server Legacy Wire Protocol driver uses client settings when converting
currency, date, and time data to character data. The conversion is one way only; the driver does not recognize
non-ODBC standard formats for date strings or currency values.
When set to no (Disabled), the driver uses ODBC standard strings to represent currency, date, and time data
that is converted to string data.
Default
yes (Enabled)
GUI Tab
n/a
SAVEFILE
Attribute
SAVEFILE
Purpose
The name of an ODBC data source file into which the attributes of the current connection are saved.
Valid Values
string
where
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 683
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
string
is the name of an ODBC data source file into which the attributes of the current connection are saved
if the connection is successful.
Default
None
GUI Tab
n/a
Server
Attribute
SERVER
Attribute
Address
Purpose
The location of the server.
Valid Values
IP_address | named_server | named_instance | server_name
where:
IP_address
is the IP address of the server to which you want to connect. Specify this address as: IP_address,
port_number. For example, you can enter 199.226.224.34, 5000.
The IP address can be specified in either IPv4 or IPv6 format, or a combination of the two. See Using
IP Addresses on page 67 for details about these formats.
named_server
is the named server address of the server to which you want to connect. Specify this address as:
named_server, port_number. For example, you can enter SSserver, 5000.
named_instance
server_name
is the nameof a server on your network. It must be an entry on the Alias tab of the SQL Server
Network Client Utility or the network name of a server running Microsoft SQL Server. You can enter
(local) when the driver is on the same computer as the Microsoft SQL Server database. You can
connect to a local copy of Microsoft SQL Server, even when it is a non-networked version. Microsoft
684 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Legacy Wire Protocol Driver
SQL Server 2000 and higher support multiple instances of Microsoft SQL Server running on the
same computer.
Default
None
GUI Tab
General tab
StatsLogFile
Attribute
StatsLogFile
Purpose
The full path and file name of a file to be used for recording SQL Server Legacy Wire Protocol driver performance
data. The StatsLog_On option must be set to yes.
Valid Values
string
where:
string
is the full path and file name of the file to be used for recording data.
Default
None
GUI Tab
n/a
StatsLog_On
Attribute
StatsLog_On
Purpose
Determines whether SQL Server Legacy Wire Protocol driver performance data is made available.
Valid Values
yes | no
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 685
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Behavior
When set to yes (Enabled), SQL Server Legacy Wire Protocol driver performance data is captured.
When set to no (Disabled), SQL Server Legacy Wire Protocol driver performance data is not available on the
connection.
Default
no (Disabled)
GUI Tab
n/a
Use NT Authentication
Attribute
Trusted_Connection
Purpose
Specifies that the SQL Server Legacy Wire Protocol driver request a secure (or trusted) connection to Microsoft
SQL Server.
Valid Values
0|1
Behavior
When set to 1 (Enabled), Microsoft SQL Server uses integrated login security to establish connections using
this data source, regardless of the current login security mode at the server. Any login ID or password supplied
is ignored. The Microsoft SQL Server system administrator must have associated your Windows network ID
with a Microsoft SQL Server login ID.
When set to 0 (Disabled), Microsoft SQL Server uses standard login security to establish connections using
this data source. In this case, you must specify a login ID and password for all connection requests.
Default
0 (Disabled)
GUI Tab
Advanced tab
Attribute
SnapshotSerializable
686 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Legacy Wire Protocol Driver
Purpose
Allows your application to use the snapshot isolation level if your Microsoft SQL Server database is configured
for Snapshot isolation. Supported only for Microsoft SQL Server 2005 and higher.
Valid Values
0|1
Behavior
When set to 1 (Enabled) and your application has the transaction isolation level set to serializable, the application
uses the snapshot isolation level.
When set to 0 (Disabled) and your application has the transaction isolation level set to serializable, the application
uses the serializable isolation level.
This option is useful for existing applications that set the isolation level to serializable. Using Snapshot
Transactions in this case allows you to change to the snapshot isolation level with no or minimum code changes.
If developing a new application, you can code it to set the connection attribute SQL_COPT_SS_TXN_ISOLATION
to the value SQL_TXN_SS_SNAPSHOT.
Notes
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Advanced tab
See Also
See Isolation and Lock Levels Supported on page 690 for details about using the snapshot isolation level.
See Performance Considerations on page 688 for details
Workstation ID
Attribute
WSID
Purpose
The workstation ID that is used by the client.
Valid Values
string
where:
string
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 687
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Default
None
GUI Tab
Advanced tab
Performance Considerations
Use Snapshot Transactions (SnapshotSerializable): You must have your Microsoft SQL Server 2005 and
higher database configured for snapshot isolation for this connection option to work. Snapshot Isolation provides
transaction-level read consistency and an optimistic approach to data modifications by not acquiring locks on
data until data is to be modified. This Microsoft SQL Server 2005 and higher feature can be useful if you want
to consistently return the same result set even if another transaction has changed the data and 1) your application
executes many read operations or 2) your application has long running transactions that could potentially block
users from reading data. This feature has the potential to eliminate data contention between read operations
and update operations. When this connection option is enabled, performance is improved due to increased
concurrency.
See Using The Snapshot Isolation Level on page 691 for details.
Data Types
The following table shows how the Microsoft SQL Server data types are mapped to the standard ODBC data
types. Unicode Support on page 690 lists Microsoft SQL Server to Unicode data type mappings.
binary SQL_BINARY
57
bigint SQL_BIGINT
bit SQL_BIT
char SQL_CHAR
58
date SQL_TYPE_DATE
datetime SQL_TYPE_TIMESTAMP
58
datetime2 SQL_TYPE_TIMESTAMP
58 , 59
datetimeoffset SQL_WVARCHAR
decimal SQL_DECIMAL
57
Bigint supported on Windows driver only.
58
Supported only on Microsoft SQL Server 2008 and higher.
59
Datetimeoffset mapping changes based on the setting of the Fetch TSWTZ as Timestamp option.
688 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The SQL Server Legacy Wire Protocol Driver
float SQL_FLOAT
image SQL_LONGVARBINARY
int SQL_INTEGER
money SQL_DECIMAL
numeric SQL_NUMERIC
real SQL_REAL
smalldatetime SQL_TYPE_TIMESTAMP
smallint SQL_SMALLINT
smallmoney SQL_DECIMAL
text SQL_LONGVARCHAR
58, 60
time SQL_TYPE_TIMESTAMP
timestamp SQL_VARBINARY
tinyint SQL_TINYINT
uniqueidentifier SQL_GUID
varbinary SQL_VARBINARY
61
varbinary(max) SQL_LONGVARBINARY
varchar SQL_VARCHAR
61
varchar(max) SQL_LONGVARCHAR
See Retrieving Data Type Information on page 72 for information about retrieving data types.
60
Time mapping changes based on the setting of the Fetch TWFS as Time option.
61
Supported only on Microsoft SQL Server 2005 and higher.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 689
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Unicode Support
The SQL Server Legacy Wire Protocol driver maps the Microsoft SQL Server data types to Unicode data types
as shown in the following table:
nchar SQL_WCHAR
ntext SQL_WLONGVARCHAR
nvarchar SQL_WVARCHAR
62
nvarchar(max) SQL_WLONGVARCHAR
sysname SQL_WVARCHAR
62
xml SQL_WLONGVARCHAR
The driver supports the Unicode ODBC W (Wide) function calls, such as SQLConnectW. This allows the Driver
Manager to transmit these calls directly to the driver. Otherwise, the Driver Manager would incur the additional
overhead of converting the W calls to ANSI function calls, and vice versa.
See UTF-16 Applications on UNIX and Linux on page 137 for related details.
Also, refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers
Reference for a more detailed explanation of Unicode.
Advanced Features
The driver supports failover and its related connection options. Failover connection options are located on the
Failover of the driver Setup dialog box. See Using Failover on page 78 for a general description of failover and
its implementation.
• Snapshot
• Read Committed with Snapshots
• Read Committed with Locks (equivalent to Read Committed in previous Microsoft SQL Server versions)
Refer to "Locking and isolation levels" in the Progress DataDirect for ODBC Drivers Reference for details.
62
Supported only for Microsoft SQL Server 2005 and higher.
690 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Text Driver
SQL Support
The driver supports the core SQL grammar.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 691
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
The 32-bit and 64-bit Text driver is is supported in the Windows, UNIX, and Linux environments. See
Environment-Specific Information on page 58 for detailed information about the environments supported by
this driver.
The Text driver executes SQL statements directly on the text files. The driver supports Insert statements and
inserts the record at the end of the file. You can execute Update and Delete statements conditionally.
The Text driver can access files up to 15 GB in size.
Refer to the readme file shipped with your DataDirect Connect product for the file names for the Text driver.
Driver Requirements
There are no client requirements for the Text driver.
Format Description
Comma-separated values Commas separate column values, and each line is a separate record.
Column values can vary in length. These files often have the .CSV
extension.
Tab-separated values Tabs separate column values, and each line is a separate record. Column
values can vary in length.
Character-separated values Any printable character except single and double quotes can separate
column values, and each line is a separate record. Column values can
vary in length.
Fixed No character separates column values. Instead, values start at the same
position and have the same length in each line. The values appear in
fixed columns if you display the file. Each line is a separate record.
Stream No character separates column values nor records. The table is one
long stream of bytes.
Comma-, tab-, and character-separated files are called character-delimited files because values are separated
by a special character.
692 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Text Driver
If you choose to use a connection string, you must use specific connection string attributes. See Using a
Connection String on page 696 and Connection Option Descriptions on page 697 for an alphabetical list of driver
connection string attributes and their initial default values.
On Windows, data sources are stored in the Windows Registry. You can configure and modify data sources
through the ODBC Administrator using a driver Setup dialog box, as described in this section.
On UNIX and Linux, data sources are stored in the odbc.ini file. On Linux, you can configure and
modify data sources through the Linux ODBC Administrator using a driver Setup dialog box, as described in
this section.
Note: This book shows dialog box images that are specific to Windows. If you are using the drivers in the
Linux environment, the dialog box that you see may differ slightly from the Windows version. Windows-only
and UNIX-only connection options are specifically noted by icons in the Setup dialog box descriptions.
When the driver is first installed, the values of its connection options are set by default. These values appear
on the driver Setup dialog box tabs when you create a new data source. You can change these default values
by modifying the data source. In the following procedure, the description of each tab is followed by a table that
lists the connection options for that tab and their initial default values. This table links you to a complete
description of the options and their connection string attribute equivalents. The connection string attributes are
used to override the default values of the data source if you want to change these values at connection time.
To configure a Text data source:
• On Windows, start the ODBC Administrator by selecting its icon from the Progress DataDirect
program group.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 693
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
2. Select a tab:
• User DSN: If you are configuring an existing user data source, select the data source name and click
Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the driver
and click Finish to display the driver Setup dialog box.
• System DSN: If you are configuring an existing system data source, select the data source name
and click Configure to display the driver Setup dialog box.
If you are configuring a new system data source, click Add to display a list of installed drivers. Select
the driver and click Finish to display the driver Setup dialog box.
• File DSN: If you are configuring an existing file data source, select the data source file and click Configure
to display the driver Setup dialog box.
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select
a driver. Click Advanced if you want to specify attributes; otherwise, click Next to proceed. Specify a
name for the data source and click Next. Verify the data source information; then, click Finish to display
the driver Setup dialog box.
NOTE: The General tab displays the only fields that are required for creating a data source. The fields on
all other tabs are optional, unless noted otherwise.
3. On this tab, provide values for the options in the following table; then, click Apply. The table provides links
to descriptions of the connection options.
694 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Text Driver
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 695
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Define: Click Define to define the structure of your text files as described in Defining Table Structure on
Windows on page 710.
Translate: Click Translate to display the Select Translator dialog box, which lists the translators
specified in the ODBC Translators section of the Registry. Progress DataDirect provides a translator named
OEM to ANSI that translates your data from the IBM PC character set to the ANSI character set.
Select a translator; then, click OK to close this dialog box.
5. At any point during the configuration process, you can click Test Connect to attempt to connect to the data
source using the connection properties specified in the driver Setup dialog box.
• If the driver can connect, it releases the connection and displays a connection established message.
Click OK.
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message. Click OK.
6. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
696 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Text Driver
DSN=data_source_name[;attribute=value[;attribute=value]...]
FILEDSN=filename.dsn[;attribute=value[;attribute=value]...]
The DSN-less connection string specifies a driver instead of a data source. All connection information must be
entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
Connection Option Descriptions on page 697 lists the long and short names for each attribute, as well as the
initial default value when the driver is first installed. You can specify either long or short names in the connection
string.
An example of a DSN connection string with overriding attribute values for Text is:
DSN=Text1;DB=C:\TEXTDATA;TT=Comma
CacheSize (CSZ) 4
CenturyBoundary (CB) 20
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 697
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
FileOpenCache (FOC) 0
ScanRows (SR) 25
Attribute
UndefinedTable (UT)
Purpose
Determines whether the driver prompts the user when it encounters a table for which it has no structure
information.
Valid Values
PROMPT | GUESS
Behavior
Specify PROMPT to prompt the user.
Specify GUESS for the driver to guess the format of the file.
698 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Text Driver
Default
GUESS
GUI Tab
Advanced tab
Attribute
AllowUpdateAndDelete (AUD)
Purpose
Allows Update and Delete statements. Because Update and Delete statements cause immediate changes to
a text file, only one connection at a time can operate on a file. Each update and delete on a text file can cause
significant changes to the file, and performance may be degraded. Consider a more appropriate database form
if performance is a significant factor.
Valid Values
0|1
Behavior
If set to 1 (Enabled), text files are opened exclusively by the current connection.
If set to 0 (Disabled), Update and Delete statements are not allowed.
Default
0 (Disabled)
GUI Tab
Advanced tab
Attribute
ApplicationUsingThreads (AUT)
Purpose
Determines whether the driver works with applications using multiple ODBC threads.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver works with single-threaded and multi-threaded applications.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 699
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
If set to 0 (Disabled), the driver does not work with multi-threaded applications. If using the driver with
single-threaded applications, this value avoids additional processing required for ODBC thread-safety standards.
Default
1 (Enabled)
GUI Tab
Advanced tab
Cache Size
Attribute
CacheSize (CSZ)
Purpose
The number of 64 KB blocks the driver uses to cache database records. The larger the number of blocks, the
better the performance.
Valid Values
0|x
where:
Behavior
If set to 0, no records are cached.
If set to x, the specified number of 64 KB blocks are set aside for caching. The maximum number of blocks
you can set depends on the system memory available. If the cache size is greater than 0, when browsing
backwards, you are not able to see updates made by other users until you run the Select statement again.
Default
4
GUI Tab
Advanced tab
Century Boundary
Attribute
CenturyBoundary (CB)
Purpose
The cutoff year for century inference when converting two-digit dates to four-digit dates.
700 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Text Driver
Valid Values
xx
where:
xx
is a two-digit number.
Behavior
Two-digit dates that are less than the specified year number are converted to 20xx. Two-digit dates greater
than or equal to the number are converted to 19xx. For example, using the default value of 20, a date of 19
will be interpreted as 2019 and a date of 21 is interpreted as 1921.
Default
20
GUI Tab
Advanced tab
Attribute
FirstLineNames (FLN)
Purpose
Determines whether the driver looks for column names in the first line of the file.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver looks for column names in the first line of the file.
If set to 0 (Disabled), the driver does not look for column names in the first line of the file.
Notes
• The Column Names in First Line setting applies only to tables not previously defined. It also determines the
attributes of new tables created with the Create Table statement.
Default
0 (Disabled)
GUI Tab
General tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 701
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Attribute
DataFileExtension (DFE)
Purpose
A one- to three-character file name extension to use for data files.
Valid Values
ext
where:
ext
Behavior
This value is used for all Create Table statements. Sending a Create Table using an extension other than the
value specified for this option causes an error.
In other SQL statements, such as Select or Insert, users can specify an extension other than the one specified
for this connection option. The Data File Extension value is used when no extension is specified.
Default
TXT
GUI Tab
Advanced tab
Attribute
DataSourceName (DSN)
Purpose
Specifies the name of a data source in your Windows Registry or odbc.ini file.
Valid Values
string
where:
string
702 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Text Driver
Default
None
GUI Tab
General tab
Database Directory
Attribute
Database (DB)
Purpose
The directory that contains the data files.
Valid Values
database_directory
where:
database_directory
is the full path name of the directory in which the data files are stored. If no directory is specified,
the current working directory is used.
Default
None
GUI Tab
General tab
Decimal Symbol
Attribute
DecimalSymbol (CS)
Purpose
The decimal separator used when data is stored.
Valid Values
,|.
Behavior
If set to Comma (,), the driver uses a comma as the decimal separator.
If set to Period (.), the driver uses a period as the decimal separator.
The international decimal symbol (.) must be used in DML statements and parameter buffers.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 703
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Default
. (Period)
GUI Tab
Advanced tab
Attribute
TableType (TT)
Purpose
The type of text file (table) that is used when creating a new table and opening an undefined table.
Valid Values
Comma | Tab | Character | Fixed | Stream
The value chosen determines the type of text used for a table: comma-separated, tab-separated,
character-separated, fixed length, or stream.
Notes
• The Default Table Type setting applies only to tables not previously defined. It also determines the attributes
of new tables created with the Create Table statement.
Default
Comma
GUI Tab
General tab
Delimiter Character
Attribute
Delimiter (DC)
Purpose
The character used as a delimiter for character-separated files.
Valid Values
x
where:
704 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Text Driver
Note that it is possible to specify a semicolon if you configure the data source using the Windows ODBC
Administrator.
Notes
• The Delimiter Character setting applies only to tables not previously defined. It also determines the attributes
of new tables created with the Create Table statement.
Default
, (Comma)
GUI Tab
General tab
Description
Attribute
Description (n/a)
Purpose
Specifies an optional long description of a data source. This description is not used as a runtime connection
attribute, but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Extension List
Attribute
ExtraExtensions (EE)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 705
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Purpose
A comma-separated list of file name extensions for the files that you want returned in addition to the extension
specified in the Data File Extension field.
Valid Values
ext | NONE
where:
ext
To have files with no extensions returned, specify NONE. For example, if some of your files have the extensions
TXT and CSV and others have no extension, specify TXT,CSV,NONE.
By default, when an application requests a list of tables, only files that have been defined are returned.
Notes
• You must have also enabled the Files with Matching Extensions option.
Default
None
GUI Tab
Advanced tab
Attribute
FileOpenCache (FOC)
Purpose
The maximum number of used file handles to cache.
Valid Values
0|x
where:
is a positive integer.
Behavior
If set to 0, no file open caching is performed.
706 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Text Driver
If set to x, when a user opens and closes x tables, the tables are not actually closed. The driver keeps them
open so that if another query uses one of these tables, the driver does not have to perform another open, which
is expensive. The advantage of file open caching is improved performance. The disadvantage is that a user
who tries to open the file exclusively may get a file locking conflict even though no one appears to have the
file open.
Default
0 (No File Open Caching)
GUI Tab
Advanced tab
IANAAppCodePage
Attribute
IANAAppCodePage (IACP)
Purpose
An Internet Assigned Numbers Authority (IANA) value. You must specify a value for this option if your application
is not Unicode-enabled or if your database character set is not Unicode. The value you specify must match
the database character encoding and the system locale.
The Driver Manager checks for the value of IANAAppCodePage in the following order:
• In the connection string
• In the Data Source section of the system information file (odbc.ini)
• In the ODBC section of the system information file (odbc.ini)
Valid Values
IANA_code_page
where:
IANA_code_page
is one of the valid values listed in "IANAAppCodePage values" in the Progress DataDirect for ODBC
Drivers Reference. The value must match the database character encoding and the system locale.
Notes
Refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers Reference
for details.
Default
4 (ISO 8559-1 Latin-1)
GUI Tab
Advanced tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 707
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Attribute
n/a
Purpose
On Windows, enables the driver to return files with a given file name extension in addition to the extension
specified through the Data File Extension option. After enabling this option, specify the file name extensions
through the Extension List option.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver returns files with the file name extensions specified through the Extension List
and Data File Extension options.
If set to 0 (Disabled), the driver returns only files with the file name extension specified through the Data File
Extension option.
Default
0 (Disabled)
GUI Tab
Advanced tab
International Sort
Attribute
IntlSort (IS)
Purpose
Uses international sort order as defined by your operating system when you issue a Select statement with an
Order By clause.
Valid Values
0|1
Behavior
If set to 1 (Enabled), this order is always alphabetic, regardless of case; the letters are sorted as "A, b, C."
Refer to your operating system documentation concerning the sorting of accented characters.
If set to 0 (Disabled), ASCII sort order is used. This order sorts items alphabetically with uppercase letters
preceding lowercase letters. For example, "A, b, C" is sorted as "A, C, b."
708 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Text Driver
Default
0 (Disabled)
GUI Tab
Advanced tab
Rows to Scan
Attribute
ScanRows (SR)
Purpose
The number of rows in a text file that the driver scans to determine the data types in the file.
Valid Values
0|x
where:
is a positive integer.
Behavior
If set to 0, all rows in the file are scanned.
If set to x, x rows are scanned to determine the data types in a file.
Notes
• The Rows to Scan setting applies only to tables not previously defined. It also determines the attributes of
new tables created with the Create Table statement.
Default
25
GUI Tab
Advanced tab
Attribute
UseLongQualifiers (ULQ)
Purpose
Determines whether the driver uses long path names.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 709
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Valid Values
0|1
Behavior
If set to 1 (Enabled), path names can be a maximum of 255 characters.
If set to 0 (Disabled), path names can be a maximum of 128 characters.
Default
0 (Disabled)
GUI Tab
Advanced tab
1. Display the ODBC Text Driver Setup dialog box through the ODBC Administrator. Click the Advanced tab;
then, click Define to display the Define File dialog box.
2. Select the correct file and click Open to display the Define Table dialog box.
Database Name: This field displays the name of the database directory that you selected in the Define File
dialog box.
File: This field displays the name of the file that you selected in the Define File dialog box.
Table: Type a table name in the Table field. This name specifies the table name associated with the text
file you selected earlier. The name can be a maximum of 32 characters and must be unique. This name is
returned by SQLTables. By default, it is the file name without its extension (for example, Trc_read).
710 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Text Driver
Column Names in First Line: Select this check box if the first line of the file contains column names;
otherwise, do not select this box.
Table Type: Select the type of text file, either comma, tab, fixed, character, or stream.
Delimiter Character: If the table type is Character, type the delimiter used in character-separated files.
The value can be any printable character except single and double quotes.
Decimal Symbol: Type the decimal separator used when data is stored. Valid values are a comma or a
period. The international decimal symbol (.) must be used in DML statements and parameter buffers.
3. If you specified a comma-separated, tab-separated, or character-separated type in the Table Type field,
the Guess/Parse button displays Guess. Click Guess to have the driver guess at the column names and
display them in the list box of the Column Information pane.
If you specified a fixed-length or stream type in the Table Type field, the Guess/Parse button displays Parse.
Click Parse to have the driver display the Parse Table dialog box and define the table columns.
This dialog box displays the first line of the file. You must mark where each field begins and ends by enclosing
it in square brackets [ ]. These brackets indicate the position and length of each field value in the record.
Click OK to close the Parse Table dialog box. The driver will suggest column names in the list box of the
Column Information pane.
4. If you do not want the driver to guess or parse, enter values in the following fields to define each column.
Click Add to add the column name to the Column Information box.
Name: Type the name of the column.
Type: Select the data type of the column. If the field type is Date, the Mask field is enabled and you must
select a date mask or type one in. See Date Masks on page 713 for more information.
Mask: Select a date mask. If you selected Date for the Type field, you must select a date mask for the field
or type one in. See Date Masks on page 713 for more information.
Precision: Type the precision of the column. The precision of numeric data types is defined as the maximum
number of digits used by the data type of the column. For character types, this is the length in characters
of the data. Note that the precision and scale values determine how numeric data is to be returned.
Scale: Type the scale of the column. The scale of numeric data types is defined as the maximum number
of digits to the right of the decimal point. Note that the precision and scale values determine how numeric
data is to be returned.
Length: If you specified a fixed-length table type, type the length, which is the number of bytes the data
takes up in storage.
Offset: If you specified a fixed-length table type, type the offset, which is the number of bytes from the start
of the table to the start of the field.
5. To modify an existing column definition, select the column name in the Column Information box. Modify the
values for that column name; then, click Modify.
6. To delete an existing column definition, select a column name in the Column Information box and click
Remove.
7. Click OK to define the table.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 711
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Because text files do not all have the same structure, the driver provides the option to define the
structure of an existing file. Although defining the structure is not mandatory, because the driver can attempt
to guess the names and types of the columns, this feature is extremely useful.
To define the structure of a text file, you create a QETXT.INI file using any plain text editor, such as vi. The file
name must be in uppercase. All of the tables you want to define are specified in the QETXT.INI file. When you
specify table attributes in QETXT.INI, you override the attributes specified in the system information file (odbc.ini)
or in the connection string.
To define the QETXT.INI file:
1. Create a [Defined Tables] section and list all of the tables you are defining. Specify the text file name (in
either upper or lowercase, depending on the file) followed by the name you want to give the table, for
example:
emptext.txt=EMP
Table names can be up to 32 characters in length and cannot be the same as another defined table in the
database. This name is returned by SQLTables. By default, it is the file name without its extension.
2. For each table listed in the [Defined Tables] section, you must specify the text file (FILE=), the table type
(TT=), whether the first line of the file contains column names (FLN=), and the delimiter character (DC=).
• To define the table type, specify how the fields are separated (comma, tab, fixed, or character). For
example:
TT=COMMA
• If the table type is CHARACTER, specify the delimiter character. The value can be any printable character
except single and double quotes. For example, if the fields are separated by comma:
DC=,
• Specify whether the first line of the file contains column names, using 1 for yes and 0 for no. For example:
FLN=0
3. Define the fields in the table, beginning with FIELD1. For each field, specify the field name, field type,
precision, scale, length, offset (for fixed tables), and date/time mask. See Date Masks on page 713 for
information about masks.
Separate the values with commas. For example, to define two fields:
FIELD1=EMP_ID,VARCHAR,6,0,6,0,
FIELD2=HIRE_DATE,DATE,10,0,10,0,m/d/yy
4. Save the file as QETXT.INI. The driver looks for this file in the directory specified by the Database attribute
in odbc.ini, or in the current directory.
712 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Text Driver
Example of QETXT.INI
The following is an example of a QETXT.INI file. This file defines the structure of the emptext.txt file, which is
a sample data file shipped with the DataDirect ODBC Text file.
[Defined Tables]
emptext.txt=EMP
[EMP]
FILE=emptext.txt
FLN=1
TT=Comma
FIELD1=FIRST_NAME,VARCHAR,10,0,10,0,
FIELD2=LAST_NAME,VARCHAR,9,0,9,0,
FIELD3=EMP_ID,VARCHAR,6,0,6,0,
FIELD4=HIRE_DATE,DATE,10,0,10,0,m/d/yy
FIELD5=SALARY,NUMERIC,8,2,8,0,
FIELD6=DEPT,VARCHAR,4,0,4,0,
FIELD7=EXEMPT,VARCHAR,6,0,6,0,
FIELD8=INTERESTS,VARCHAR,136,0,136,0,
Date Masks
Date masks tell the driver how a date is stored in a text file. When a value is inserted into a text file, the date
is formatted so that it matches the mask. When reading a text file, the driver converts the formatted date into
a date data type.
The following table lists the symbols to use when specifying the date mask.
Symbol Description
mmm, Mmm, MMM Output the three-letter abbreviation for the month depending on the case
of the Ms (for example, jan, Jan, JAN).
mmmm, Mmmm, MMMM Output the name of the full month depending on the case of the Ms (for
example, january, January, JANUARY).
ddd, Ddd, DDD Output the three-letter day abbreviation depending on the case of the Ds
(for example, mon, Mon, MON).
dddd, Dddd, DDDD Output the name of the full day depending on the case of the Ds (for
example, monday, Monday, MONDAY).
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 713
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
Symbol Description
J Output the Julian value for the date. The Julian value is the number of
days since 4712 BC.
\ Output the next character. For example, if the mask is mm/dd/yyyy \A\D,
the value appears as 10/01/2003 AD in the text file.
The following table shows some example date values, masks, and how the date appears in the text file.
m/d/yy 10/1/03
Data Types
The following table shows how the text file data types are mapped to the standard ODBC data types.
Text ODBC
Numeric SQL_NUMERIC
Date SQL_TYPE_DATE
Varchar SQL_VARCHAR
See Retrieving Data Type Information on page 72 for information about retrieving data types.
Select Statement
You use a SQL Select statement to specify the columns and records to be read. All of the Select statement
clauses described in SQL Statements for Flat-File Drivers are supported by the Text driver.
714 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Text Driver
table_name is the name of the table to which you are adding or dropping columns.
column_name assigns a name to the column you are adding or specifies the column you are dropping.
data_type specifies the native data type of each column you add.
For example, to add two columns to the emp table:
ALTER TABLE emp (ADD startdate date, dept varchar(10))
You cannot add columns and drop columns in a single statement, and you can drop only one column at a time.
For example, to drop a column:
ALTER TABLE emp DROP startdate
The Alter Table statement fails when you attempt to drop a column upon which other objects, such as indexes
or views, are dependent.
SQL Support
The driver supports the minimum SQL grammar.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 715
Chapter 6: Drivers for 32-Bit and 64-Bit Platforms
716 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
7
Drivers Only Available for 32-Bit Platforms
This following sections describe the drivers that are available only in 32-bit versions. See Drivers for 32-Bit and
64-Bit Platforms on page 139 and The Connect XE Drivers on page 827 for information on additional Connect
Series drivers.
• Pervasive.SQL
• Btrieve
The driver executes SQL statements directly on Btrieve files.
For the latest support information, visit the Progress DataDirect Supported Configurations page:
https://www.progress.com/supported-configurations/datadirect.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 717
Chapter 7: Drivers Only Available for 32-Bit Platforms
The Btrieve driver is 32-bit only and is supported in the Windows environments. See Environment-Specific
Information on page 58 for detailed information about the environments supported by this driver.
Refer to the readme file shipped with your DataDirect Connect product for the file name of the Btrieve driver.
Driver Requirements
To access a Btrieve database, you must be using the appropriate client software for the version of the Btrieve
database to which you are connecting:
Btrieve 6.15 for Windows 9x Btrieve Developer’s Kit orBtrieve WorkStation Client Engine
Btrieve 6.15 for Windows NT Btrieve Developer’s Kit, Btrieve WorkStation Client Engine, or
Btrieve Client/Server Database Engine
Note: The Btrieve driver may experience problems if the Btrieve Microkernel Engine’s communication buffer
size is smaller than that of the Btrieve driver’s Array Size option. You can increase the communication buffer
size with the Pervasive Software Setup Utility, or you can decrease the value of Array Size option through the
ODBC Btrieve Driver setup dialog box or through the ArraySize connection string attribute.
Before you attempt to access Btrieve files, you must incorporate existing Btrieve files into a Scalable SQL
database. See Managing Databases on page 718 for information about Scalable SQL databases.
Managing Databases
If you already use Scalable SQL, the Btrieve driver can access your Scalable SQL databases directly. If not,
your Btrieve files must be incorporated into a Scalable SQL database.
A Scalable SQL database is composed of data files that contain your records and data dictionary files that
describe the database. The data files are Btrieve files. The data dictionary files are special Btrieve files that
contain descriptions of the data files, views, fields, and indexes in your database.
All Btrieve files in a Scalable SQL database must reside in the same directory. In addition to the Btrieve data
files, the three data dictionary files (FILE.DDF, FIELD.DDF, and INDEX.DDF) also must be in the directory.
Incorporating a Btrieve file into a Scalable SQL database does not change the Btrieve file in any way. You can
continue to access the file directly with any existing Btrieve application.
718 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Btrieve (Pervasive.SQL) Driver
Transactions
The Btrieve driver supports transactions. A transaction is a series of database changes that is treated as a
single unit. In applications that so not use transactions, the Btrieve driver immediately executes Insert, Update,
and Delete statements on the database files and the changes are automatically committed when the SQL
statement is executed. You cannot undo these changes. In applications that use transactions, the Btrieve driver
holds inserts, updates, and deletes until you issue a Commit or Rollback. A Commit saves the changes to the
database file; a Rollback undoes the changes.
Transactions affect the removal of record locking. All locks are removed when SQLTransact is called with the
Commit or Rollback option to end the active transaction.
To use the Btrieve driver’s transaction processing capabilities, consult the Pervasive documentation.
1. Start the ODBC Administrator by selecting its icon from the DataDirect Connect program group; then, select
a tab:
• User DSN: If you are configuring an existing user data source, select the data source name on the User
DSN tab and click Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add on the User DSN tab to display a list of installed
drivers. Select the driver and click Finish to display the driver Setup dialog box.
• System DSN: To configure a new system data source, click Add on the System DSN tab to display a
list of installed drivers. Select the driver and click Finish to display the driver Setup dialog box.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 719
Chapter 7: Drivers Only Available for 32-Bit Platforms
• File DSN: If you are configuring an existing file data source, select the data source name on the File
DSN tab and click Configure to display the driver Setup dialog box.
If you are configuring a new file data source, click Add on the File DSN tab to display a list of installed
drivers. Select the driver and click Next. Specify a name for the data source and click Next. Verify the
data source information; then, click Finish to display the driver Setup dialog box.
Note: The General tab displays only fields that are required for creating a data source. The fields on all
other tabs are optional, unless noted otherwise.
2. On this tab, provide values for the options in the following table; then, click Apply. The table provides links
to descriptions of the connection options.
720 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Btrieve (Pervasive.SQL) Driver
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
Define: Click Define to define table structure as described in Defining Table Structure on page 731.
Translate: Click Translate to display the Select Translator dialog box, which lists the translators specified
in the ODBC Translators section of the Registry. DataDirect provides a translator named OEM to ANSI that
translates your data from the IBM PC character set to the ANSI character set.
Select a translator; then, click OK to close this dialog box.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 721
Chapter 7: Drivers Only Available for 32-Bit Platforms
4. At any point during the configuration process, you can click Test Connect to attempt to connect to the data
source using the connection properties specified in the driver Setup dialog box.
• If the driver can connect, it releases the connection and displays a Connection established!
message. Click OK.
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message.
Verify that all required client software is properly installed. If it is not, you will see the message:
Specified driver could not be loaded due to system error [xxx].
Click OK.
5. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
DSN=data_source_name[;attribute=value[;attribute=value]...]
FILEDSN=filename.dsn[;attribute=value[;attribute=value]...]
The DSN-less connection string specifies a driver instead of a data source. All connection information must be
entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
Connection Option Descriptions on page 723 lists the long and short names for each attribute, as well as the
initial default value when the driver is first installed. You can specify either long or short names in the connection
string.
An example of a DSN connection string with overriding attribute values for Btrieve is:
DSN=BTRIEVE FILES;DB=J:\Btrvdata
722 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Btrieve (Pervasive.SQL) Driver
DSN=data_source_name[;attribute=value[;attribute=value]...]
FILEDSN=filename.dsn[;attribute=value[;attribute=value]...]
The DSN-less connection string specifies a driver instead of a data source. All connection information must be
entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
Connection Option Descriptions on page 723 lists the long and short names for each attribute, as well as the
initial default value when the driver is first installed. You can specify either long or short names in the connection
string.
An example of a DSN connection string with overriding attribute values for Btrieve is:
DSN=BTRIEVE FILES;DB=J:\Btrvdata
Attribute
ApplicationUsingThreads (AUT)
In most cases, the GUI name and the attribute name are the same; however, some exceptions exist. If you
need to look up an option by its connection string attribute name, please refer to the alphabetical table of
connection string attribute names.
Also, a few connection string attributes, for example, Password, do not have equivalent options that appear
on the GUI. They are in the list of descriptions alphabetically by their attribute names.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 723
Chapter 7: Drivers Only Available for 32-Bit Platforms
The following table lists the connection string attributes supported by the Btrieve driver.
Attribute
UndefinedTable (UT)
Purpose
Determines whether the driver prompts the user when it encounters a table for which it has no structure
information.
Valid Values
PROMPT | ERROR
Specify PROMPT to prompt the user.
Specify ERROR to return an error.
Default
ERROR (driver returns an error)
GUI Tab
Advanced tab
724 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Btrieve (Pervasive.SQL) Driver
Attribute
ApplicationUsingThreads (AUT)
Purpose
Determines whether the driver works with applications using multiple ODBC threads.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver works with single-threaded and multi-threaded applications.
If set to 0 (Disabled), the driver does not work with multi-threaded applications. If using the driver with
single-threaded applications, this value avoids additional processing required for ODBC thread-safety standards.
Default
1 (Enabled)
GUI Tab
Advanced tab
Array Size
Attribute
ArraySize (AS)
Purpose
The number of bytes in the array. This connection option enables the driver to retrieve an array of records from
the Btrieve database and, in most cases, results in improved performance for the application.
Valid Values
A positive integer from 1 to 65535
Default
4096
GUI Tab
Advanced tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 725
Chapter 7: Drivers Only Available for 32-Bit Platforms
Attribute
DataFileExtension (DFE)
Purpose
A one- to three-character file name extension to use for data files.
Valid Values
ext
where:
ext
Behavior
This value is used for all Create Table statements. Sending a Create Table using an extension other than the
value specified for this option causes an error.
In other SQL statements, such as Select or Insert, users can specify an extension other than the one specified
for this connection option. The Data File Extension value is used when no extension is specified.
Default
DTA
GUI Tab
Advanced tab
Attribute
DataSourceName (DSN)
Purpose
Specifies the name of a data source in your Windows Registry or odbc.ini file.
Valid Values
string
where:
string
726 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Btrieve (Pervasive.SQL) Driver
Default
None
GUI Tab
General tab
Database Directory
Attribute
Database (DB)
Purpose
The directory that contains the data files.
Valid Values
database_directory
where:
database_directory
is the full path name of the directory in which the data files are stored. If no directory is specified,
the current working directory is used.
This includes both Btrieve files and the data dictionary files (.DDF). Data dictionary files describe the structure
of Btrieve data.
Default
None
GUI Tab
General tab
Default Logon ID
Attribute
LogonID (UID)
Purpose
The default user ID that is used to connect to your database. Your ODBC application may override this value
or you may override it in the logon dialog box or connection string.
Valid Values
userid
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 727
Chapter 7: Drivers Only Available for 32-Bit Platforms
userid
Default
None
GUI Tab
Advanced tab
Description
Attribute
Description (n/a)
Purpose
Specifies an optional long description of a data source. This description is not used as a runtime connection
attribute, but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Attribute
FileOpenCache (FOC)
Purpose
The maximum number of used file handles to cache.
Valid Values
0|x
where:
728 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Btrieve (Pervasive.SQL) Driver
is a positive integer.
Behavior
If set to 0, no file open caching is performed.
If set to x, when a user opens and closes x tables, the tables are not actually closed. The driver keeps them
open so that if another query uses one of these tables, the driver does not have to perform another open, which
is expensive. The advantage of file open caching is improved performance. The disadvantage is that a user
who tries to open the file exclusively may get a file locking conflict even though no one appears to have the
file open.
Default
0 (No File Open Caching)
GUI Tab
Advanced tab
International Sort
Attribute
IntlSort (IS)
Purpose
Uses international sort order as defined by your operating system when you issue a Select statement with an
Order By clause.
Valid Values
0|1
Behavior
If set to 1 (Enabled), this order is always alphabetic, regardless of case; the letters are sorted as "A, b, C."
Refer to your operating system documentation concerning the sorting of accented characters.
If set to 0 (Disabled), ASCII sort order is used. This order sorts items alphabetically with uppercase letters
preceding lowercase letters. For example, "A, b, C" is sorted as "A, C, b."
Default
0 (Disabled)
GUI Tab
Advanced tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 729
Chapter 7: Drivers Only Available for 32-Bit Platforms
Password
Attribute
Password (PWD)
Purpose
The password that you must enter if your Scalable SQL data dictionary files have security restrictions set. The
Password option cannot be specified through the Administrator GUI.
Valid Values
pwd
where:
pwd
is a valid password.
Default
None
GUI Tab
n/a
Attribute
UseLongQualifiers (ULQ)
Purpose
Determines whether the driver uses long path names.
Valid Values
0|1
Behavior
If set to 1 (Enabled), path names can be a maximum of 255 characters.
If set to 0 (Disabled), path names can be a maximum of 128 characters.
Default
0 (Disabled)
GUI Tab
Advanced tab
730 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Btrieve (Pervasive.SQL) Driver
1. Display the ODBC Btrieve Driver Setup dialog box through the ODBC Administrator. Click the Advanced
tab; then, click Define to display the Define File dialog box.
2. In the Define File dialog box, select the file you want to define and click Open to display the Define Table
dialog box.
Database Name: This field displays the directory in which the file you selected in the Define File dialog box
is located.
File: This field displays the name of the file that you selected in the Define File dialog box.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 731
Chapter 7: Drivers Only Available for 32-Bit Platforms
Table: Type the name of the table to be returned by SQLTables. The name can be a maximum of 20
characters and cannot be the same as another defined table in the database. This field is required.
3. Specify values in the following fields to define each column. Click Add to add the column name to the list
box.
Name: Type the name of the column.
Type: Select the data type of the column.
Length: Type the length of the column, if applicable.
Scale: Type the scale of the column, if applicable.
4. To modify an existing column definition, select the column name in the list box. Modify the values for that
column name; then, click Modify.
5. To delete an existing column definition, select a column name in the list box and click Remove.
6. Click OK to define the table.
Data Types
The following table shows how the Btrieve data types map to the standard ODBC data types. The Btrieve data
types are used when you incorporate Btrieve files into a Scalable SQL database.
Btrieve ODBC
Autoincrement(2) SQL_SMALLINT
Autoincrement(4) SQL_INTEGER
Bfloat(4) SQL_REAL
Bfloat(8) SQL_DOUBLE
Bit SQL_BIT
Blob SQL_LONGVARGBINARY
Char SQL_CHAR
Currency SQL_DECIMAL
Date SQL_TYPE_DATE
Decimal SQL_DECIMAL
Float(4) SQL_REAL
Float(8) SQL_DOUBLE
Integer(1) SQL_TINYINT
732 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Btrieve (Pervasive.SQL) Driver
Btrieve ODBC
Integer(2) SQL_SMALLINT
Integer(4) SQL_INTEGER
Integer(8) SQL_BIGINT
Logical(1) SQL_BIT
Logical(2) SQL_BIT
Lstring SQL_VARCHAR
Money SQL_DECIMAL
Note SQL_LONGVARCHAR
Numeric SQL_NUMERIC
Numericsts SQL_NUMERIC
Time SQL_TYPE_TIME
Timestamp SQL_TYPE_TIMESTAMP
Unsigned(1) SQL_TINYINT
Unsigned(8) SQL_BIGINT
Zstring SQL_VARCHAR
See Retrieving Data Type Information on page 72 for information about retrieving data types.
Indexes
Note: If you define an index using the Btrieve driver, the index will not have the restrictions discussed here.
For query optimization, the Btrieve driver does not use the following:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 733
Chapter 7: Drivers Only Available for 32-Bit Platforms
Column Names
Column names in SQL statements (such as Select and Insert) can be up to 20 characters long. If column names
are in all lowercase, a combination of upper and lowercase, contain blank spaces, or are reserved words, they
must be surrounded by the grave character ( ` ) (ASCII 96). For example:
SELECT `name` FROM emp
Select Statement
You use the SQL Select statement to specify the columns and records to be read. Btrieve Select statements
support all the Select statement clauses described in SQL Statements for Flat-File Drivers. This section describes
the information that is specific to Btrieve.
Rowid Pseudo-Column
Each Btrieve record contains a special column named Rowid. This field contains a unique number that indicates
the record’s sequence in the database. You can use Rowid in Where and Select clauses.
Rowid is particularly useful when you are updating records. You can retrieve the Rowid of the records in the
database along with the other field values. For example:
SELECT last_name, first_name, salary, rowid FROM emp
Then, you can use the Rowid of the record that you want to update to ensure that you are updating the correct
record and no other. For example:
UPDATE emp set salary = 40000 FROM emp WHERE rowid=21
The fastest way of updating a single row is to use a Where clause with the Rowid. You cannot update the
Rowid column.
Select statements that use the Rowid pseudo-column in the Where clause achieve maximum performance
only for exact equality matches. If you use range scans instead of exact equality matches, a full table scan is
performed. For example:
SELECT * FROM emp WHERE rowid=21 //fast search
SELECT * FROM emp WHERE rowid <=25 //full table scan
table_name is the name of the table to which you are adding or dropping columns.
column_name assigns a name to the column you are adding or specifies the column you are dropping.
data_type specifies the native data type of each column you add.
734 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Btrieve (Pervasive.SQL) Driver
You cannot add columns and drop columns in a single statement, and you can drop only one column at a time.
For example, to drop a column:
ALTER TABLE emp DROP startdate
The Alter Table statement fails when you attempt to drop a column upon which other objects, such as indexes
or views, are dependent.
Create Index
The Create Index statement for Btrieve files has the form:
[ASC | DESC]]...)
Unique means that Btrieve does not let you insert two records with the same index values.
index_name is the name of the index.
table_name is the name of the table on which the index is to be created.
ASC tells Btrieve to create the index in ascending order. DESC tells Btrieve to create the index in descending
order. By default, indexes are created in ascending order. For example:
CREATE INDEX lname ON emp (last_name)
Drop Index
The form of the Drop Index statement is:
table_name is the name of the table from which the index is to be dropped.
index_name is the name of the index.
For example:
DROP INDEX emp.lname
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 735
Chapter 7: Drivers Only Available for 32-Bit Platforms
SQL Support
The driver supports the minimum SQL grammar with several core extensions.
• dBASE
• Clipper
• FoxPro
• FoxPro database container (DBC)
For the latest support information, visit the Progress DataDirect Supported Configurations page:
https://www.progress.com/supported-configurations/datadirect.
The dBASE driver runs the SQL statements directly on dBASE- and FoxPro-compatible files. You do not need
to own dBASE or FoxPro products to access these files. The dBASE driver cannot access files that are larger
than 2 GB.
The dBASE driver is 32-bit only and is supported in the Windows, UNIX, and Linux environments. See
Environment-Specific Information on page 58 for detailed information about the environments supported by
this driver.
Refer to the readme file shipped with your DataDirect Connect product for the file name of the dBASE driver.
Driver Requirements
There are no client requirements for the dBASE driver.
736 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The dBASE Driver
On Windows, data sources are stored in the Windows Registry. You can configure and modify data sources
through the ODBC Administrator using a driver Setup dialog box, as described in this section.
On UNIX and Linux, data sources are stored in the odbc.ini file. On Linux, you can configure and
modify data sources through the Linux ODBC Administrator using a driver Setup dialog box, as described in
this section.
Note: This book shows dialog box images that are specific to Windows. If you are using the drivers in the
Linux environment, the dialog box that you see may differ slightly from the Windows version. Windows-only
and UNIX-only connection options are specifically noted by icons in the Setup dialog box descriptions.
When the driver is first installed, the values of its connection options are set by default. These values appear
on the driver Setup dialog box tabs when you create a new data source. You can change these default values
by modifying the data source. In the following procedure, the description of each tab is followed by a table that
lists the connection options for that tab and their initial default values. This table links you to a complete
description of the options and their connection string attribute equivalents. The connection string attributes are
used to override the default values of the data source if you want to change these values at connection time.
To configure a dBASE data source:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 737
Chapter 7: Drivers Only Available for 32-Bit Platforms
• On Windows, start the ODBC Administrator by selecting its icon from the Progress DataDirect
program group.
2. Select a tab:
• User DSN: If you are configuring an existing user data source, select the data source name and click
Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the driver
and click Finish to display the driver Setup dialog box.
• System DSN: If you are configuring an existing system data source, select the data source name
and click Configure to display the driver Setup dialog box.
If you are configuring a new system data source, click Add to display a list of installed drivers. Select
the driver and click Finish to display the driver Setup dialog box.
• File DSN: If you are configuring an existing file data source, select the data source file and click Configure
to display the driver Setup dialog box.
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select
a driver. Click Advanced if you want to specify attributes; otherwise, click Next to proceed. Specify a
name for the data source and click Next. Verify the data source information; then, click Finish to display
the driver Setup dialog box.
Note: The General tab displays the only fields that are required for creating a data source. The fields on
all other tabs are optional, unless noted otherwise.
738 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The dBASE Driver
3. On this tab, provide values for the options in the following table; then, click Apply. The table provides links
to descriptions of the connection options.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 739
Chapter 7: Drivers Only Available for 32-Bit Platforms
Translate: Click Translate to display the Select Translator dialog box, which lists the translators
specified in the ODBC Translators section of the Registry. Progress DataDirect provides a translator named
OEM to ANSI that translates your data from the IBM PC character set to the ANSI character set.
Select a translator; then, click OK to close this dialog box.
5. If you use index files that have different names than their corresponding data files and you have not defined
this association, click the Define tab. See Defining Index Attributes on Windows on page 754 for step-by-step
instructions.
6. At any point during the configuration process, you can click Test Connect to attempt to connect to the data
source using the connection properties specified in the driver Setup dialog box.
• If the driver can connect, it releases the connection and displays a connection established message.
Click OK.
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message. Click OK.
7. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
On Windows, data sources are stored in the Windows Registry. You can configure and modify data sources
through the ODBC Administrator using a driver Setup dialog box, as described in this section.
On UNIX and Linux, data sources are stored in the odbc.ini file. On Linux, you can configure and
modify data sources through the Linux ODBC Administrator using a driver Setup dialog box, as described in
this section.
Note: This book shows dialog box images that are specific to Windows. If you are using the drivers in the
Linux environment, the dialog box that you see may differ slightly from the Windows version. Windows-only
and UNIX-only connection options are specifically noted by icons in the Setup dialog box descriptions.
When the driver is first installed, the values of its connection options are set by default. These values appear
on the driver Setup dialog box tabs when you create a new data source. You can change these default values
by modifying the data source. In the following procedure, the description of each tab is followed by a table that
lists the connection options for that tab and their initial default values. This table links you to a complete
description of the options and their connection string attribute equivalents. The connection string attributes are
used to override the default values of the data source if you want to change these values at connection time.
To configure a FoxPro 3.0 database container data source :
740 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The dBASE Driver
• On Windows, start the ODBC Administrator by selecting its icon from the Progress DataDirect
program group.
2. Select a tab:
• User DSN: If you are configuring an existing user data source, select the data source name and click
Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the driver
and click Finish to display the driver Setup dialog box.
• System DSN: If you are configuring an existing system data source, select the data source name
and click Configure to display the driver Setup dialog box.
If you are configuring a new system data source, click Add to display a list of installed drivers. Select
the driver and click Finish to display the driver Setup dialog box.
• File DSN: If you are configuring an existing file data source, select the data source file and click Configure
to display the driver Setup dialog box.
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select
a driver. Click Advanced if you want to specify attributes; otherwise, click Next to proceed. Specify a
name for the data source and click Next. Verify the data source information; then, click Finish to display
the driver Setup dialog box.
Note: The General tab displays only fields that are required for creating a data source. The fields on all
other tabs are optional, unless noted otherwise.
3. On this tab, provide values for the options in the following table; then, click Apply. The table provides links
to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 741
Chapter 7: Drivers Only Available for 32-Bit Platforms
Click Select to choose the directory and .DBC file that you want to use.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
742 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The dBASE Driver
Translate: Click Translate to display the Select Translator dialog box, which lists the translators
specified in the ODBC Translators section of the Registry. Progress DataDirect provides a translator named
OEM to ANSI that translates your data from the IBM PC character set to the ANSI character set.
Select a translator; then, click OK to close this dialog box.
5. At any point during the configuration process, you can click Test Connect to attempt to connect to the data
source using the connection properties specified in the driver Setup dialog box.
• If the driver can connect, it releases the connection and displays a connection established
message. Click OK.
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message. Click OK.
6. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
DSN=data_source_name[;attribute=value[;attribute=value]...]
FILEDSN=filename.dsn[;attribute=value[;attribute=value]...]
The DSN-less connection string specifies a driver instead of a data source. All connection information must be
entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
The following table lists the long and short names for each attribute, as well as the initial default value when
the driver is first installed. You can specify either long or short names in the connection string.
An example of a DSN connection string with overriding attribute values for dBASE is:
DSN=DBASE FILES;LCK=NONE;IS=0
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 743
Chapter 7: Drivers Only Available for 32-Bit Platforms
CacheSize (CSZ) 4
744 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The dBASE Driver
Attribute
ApplicationUsingThreads (AUT)
Purpose
Determines whether the driver works with applications using multiple ODBC threads.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver works with single-threaded and multi-threaded applications.
If set to 0 (Disabled), the driver does not work with multi-threaded applications. If using the driver with
single-threaded applications, this value avoids additional processing required for ODBC thread-safety standards.
Default
1 (Enabled)
GUI tab
Advanced tab [dBASE]
Advanced tab [FoxPro]
Cache Size
Attribute
CacheSize (CSZ)
Purpose
The number of 64 KB blocks the driver uses to cache database records. The larger the number of blocks, the
better the performance.
Valid Values
0|x
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 745
Chapter 7: Drivers Only Available for 32-Bit Platforms
x
is a positive integer that specifies the number of 64 KB blocks for caching.
Behavior
If set to 0, no records are cached.
If set to x, the specified number of 64 KB blocks are set aside for caching. The maximum number of blocks
you can set depends on the system memory available. If the cache size is greater than 0, when browsing
backwards, you are not able to see updates made by other users until you run the Select statement again.
Default
4
GUI tab
Advanced tab [dBASE]
Advanced tab [FoxPro]
Attribute
CreateType (CTS) [dBASE]
Purpose
The type of table or index to be created on a Create Table or Create Index statement.
Valid Values
dBASE4 | dBASE5 | Clipper | FoxPro25 | FoxPro30
Default
dBASE5
GUI tab
General tab [dBASE]
Attribute
CreateType (CT)) [FoxPro]
Purpose
The type of table or index to be created on a Create Table or Create Index statement.
Valid Value
FoxPro30 Database
746 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The dBASE Driver
Default
FoxPro30 Database
GUI tab
General tab [FoxPro]
Attribute
DataFileExtension (DFE)
Purpose
A one- to three-character file name extension to use for data files.
Valid Values
ext
where:
ext
is the name of the one- to three-character file name extension.
Behavior
This value is used for all Create Table statements. Sending a Create Table using an extension other than the
value specified for this option causes an error.
In other SQL statements, such as Select or Insert, users can specify an extension other than the one specified
for this connection option. The Data File Extension value is used when no extension is specified.
The file extension cannot be one the driver already uses, such as MDX or CDX.
Default
DBF
GUI tab
General tab [dBASE]
General tab [FoxPro]
Attribute
DataSourceName (DSN)
Purpose
Specifies the name of a data source in your Windows Registry or odbc.ini file.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 747
Chapter 7: Drivers Only Available for 32-Bit Platforms
Valid Values
string
where:
string
Default
None
GUI Tab
General tab [dBASE]
General tab [FoxPro]
Database Directory
Attribute
Database (DB) [dBASE]
Purpose
The directory that contains the data files.
Valid Values
database_directory
where:
database_directory
is the full path name of the directory in which the data files are stored. If no directory is specified, the current
working directory is used.
Default
None
GUI Tab
General tab [dBASE]
Database Name
Attribute
Database (DB) [FoxPro]
Purpose
The directory that contains the database container (.DBC) files.
748 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The dBASE Driver
Valid Values
database_directory
where:
database_directory
is the full path name of the directory and .DBC file that you want to use.
Default
None
GUI Tab
General tab [FoxPro]
Description
Attribute
Description (n/a)
Purpose
Specifies an optional long description of a data source. This description is not used as a runtime connection
attribute, but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab [dBASE]
General tab [FoxPro]
Extension Case
Attribute
ExtensionCase (EC)
Purpose
This option determines whether uppercase or lowercase file extensions are accepted.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 749
Chapter 7: Drivers Only Available for 32-Bit Platforms
Valid Values
LOWER | UPPER
Behavior
When set to UPPER, uppercase extensions are accepted.
When set to LOWER, lowercase extensions are accepted.
Default
UPPER
GUI tab
Advanced tab [dBASE]
Advanced tab [FoxPro]
Attribute
FileOpenCache (FOC)
Purpose
The maximum number of used file handles to cache.
Valid Values
0|x
where:
is a positive integer.
Behavior
If set to 0, no file open caching is performed.
If set to x, when a user opens and closes x tables, the tables are not actually closed. The driver keeps them
open so that if another query uses one of these tables, the driver does not have to perform another open, which
is expensive. The advantage of file open caching is improved performance. The disadvantage is that a user
who tries to open the file exclusively may get a file locking conflict even though no one appears to have the
file open.
Default
0 (No File Open Caching)
GUI tab
Advanced tab [dBASE]
Advanced tab [FoxPro]
750 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The dBASE Driver
IANAAppCodePage
Attribute
IANAAppCodePage (IACP)
Purpose
An Internet Assigned Numbers Authority (IANA) value. You must specify a value for this option if your application
is not Unicode-enabled or if your database character set is not Unicode. The value you specify must match
the database character encoding and the system locale.
The Driver Manager checks for the value of IANAAppCodePage in the following order:
• In the connection string
• In the Data Source section of the system information file (odbc.ini)
• In the ODBC section of the system information file (odbc.ini)
Valid Values
IANA_code_page
where:
IANA_code_page
is one of the valid values listed in "IANAAppCodePage values" in the Progress DataDirect for ODBC
Drivers Reference. The value must match the database character encoding and the system locale.
Notes
Refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers Reference
for details.
Default
4 (ISO 8559-1 Latin-1)
GUI tab
Advanced tab [dBASE]
Advanced tab [FoxPro]
International Sort
Attribute
IntlSort (IS)
Purpose
Uses international sort order as defined by your operating system when you issue a Select statement with an
Order By clause.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 751
Chapter 7: Drivers Only Available for 32-Bit Platforms
Valid Values
0|1
Behavior
If set to 1 (Enabled), this order is always alphabetic, regardless of case; the letters are sorted as "A, b, C."
Refer to your operating system documentation concerning the sorting of accented characters.
If set to 0 (Disabled), ASCII sort order is used. This order sorts items alphabetically with uppercase letters
preceding lowercase letters. For example, "A, b, C" is sorted as "A, C, b."
Default
0 (Disabled)
GUI tab
Advanced tab [dBASE]
Advanced tab [FoxPro]
Lock Compatibility
Attribute
LockCompatibility (LCOMP)
Purpose
The locking scheme the driver uses when locking records.
Valid Values
Clipper | dBASE | Fox | Q+E | Q+EVirtual
• Clipper specifies Clipper-compatible locking.
• dBASE specifies Borland-compatible locking.
• Fox specifies FoxPro-compatible locking.
• Q+E specifies that locks be placed on the actual bytes occupied by the record. Only applications that use
the dBASE driver can read and write to the database. Other applications are locked out of the table completely
(they cannot even read other records). This locking is compatible with earlier versions of Q+E products.
• Q+EVirtual specifies that locks be placed on bytes beyond the physical end-of-file. Q+EVirtual is the same
as Q+E except that other applications can open the table and read the data.
The advantage of using a Q+E locking scheme over dBASE locking is that, on Inserts and Updates, Q+E locks
only individual index tags, while dBASE locks the entire index. The following values determine locking support
as described:
If you are accessing a table with an application that uses the dBASE driver, your locking scheme does not
have to match the Create Type. If you access a table with two applications, however, and only one uses the
dBASE driver, set your locking scheme to match the other application. For example, you do not have to set
this value to Fox to work with a FoxPro table. But if you are using a FoxPro application simultaneously with an
application using the dBASE driver on the same set of tables, set this value to Fox to ensure that your data
does not become corrupted.
752 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The dBASE Driver
Default
dBASE
GUI tab
Advanced tab [dBASE]
Advanced tab [FoxPro]
Locking
Attribute
Locking (LCK)
Purpose
The level of locking for the database file.
Valid Values
NONE | RECORD | FILE
• NONE offers the best performance, but is intended only for single-user environments. See Locking on page
761 for details.
• RECORD locks only the records affected by the statement.
• FILE locks all of the records in the table.
Default
RECORD
GUI tab
Advanced tab [dBASE]
Advanced tab [FoxPro]
Attribute
UseLongNames (ULN)
Purpose
Specifies whether to use long file names as table names.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses long file names as table names. The maximum table name length is specific
to the environment in which you are running.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 753
Chapter 7: Drivers Only Available for 32-Bit Platforms
If set to 0 (Disabled), the driver does not long file names as table names.
Default
0 (Disabled)
GUI tab
Advanced tab [dBASE]
Advanced tab [FoxPro]
Attribute
UseLongQualifiers (ULQ)
Purpose
Determines whether the driver uses long path names.
Valid Values
0|1
Behavior
If set to 1 (Enabled), path names can be a maximum of 255 characters.
If set to 0 (Disabled), path names can be a maximum of 128 characters.
Default
0 (Disabled)
GUI tab
Advanced tab [dBASE]
Advanced tab [FoxPro]
The Define tab of the ODBC dBASE Driver Setup dialog box allows you to define the attributes of index
files. With the exception of Clipper, the family of databases that includes dBASE and FoxPro uses a multiple
index file associated with a particular table (database file). This index file has a .MDX or .CDX extension and
is automatically maintained by the driver. Tags within this index can be marked as unique.
Clipper uses single index files that are not automatically associated with a particular table. You can choose to
have the driver maintain an index and choose whether or not the index is unique.
To define index file attributes:
754 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The dBASE Driver
3. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
Index files for dBASE contain index tags for each index that exists for a database file. These index
tags can be marked as unique, that is, the driver will ensure that no duplicate values exist for the columns that
define the index tag. The unique attribute is not natively supported by the dBASE or FoxPro products. The
enforcement and recognition of the unique attribute is an extension of the dBASE driver. The driver must be
notified that index tags are unique. No configuration is needed for unique indexes that were created using the
DataDirect Connect for ODBC dBASE driver. When using files that were not created with the dBASE driver,
you must define unique index tags as outlined in the following procedure.
In the directory where the database and index files are located, use any text editor, such as vi, to define or edit
the QEDBF.INI as follows:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 755
Chapter 7: Drivers Only Available for 32-Bit Platforms
1. Create a [filename] section where filename is the name of the database file. This entry is case-sensitive
and the file extension must be included, for example, [accts.dbf].
2. In the [filename] section, specify the number of unique indexes on the file (NUMUNIQUE=) and the index
specifications (UNIQUE#=index_filename,index_tag). The index_tag can be determined by calling
the ODBC function SQLStatistics and examining the INDEX_NAME result column.
For example, to define two unique indexes on the accts.dbf database file, the QEDBF.INI would be
defined as:
[accts.dbf]
NUMUNIQUE=2
UNIQUE0=accts.mdx,ACCT_NAME
UNIQUE1=accts.mdx,ACCT_ID
Data Types
The following table shows how dBASE data types map to the standard ODBC data types. These dBASE data
types can be used in a Create Table statement.
The following table shows how the additional FoxPro 3.0 data types map to the ODBC data types.
NOTE: A few products can create dBASE files with numbers that do not conform to the precision and scale of
the Number column. For example, these products can store 100000 in a column declared as NUMBER(5,2).
When this occurs, the dBASE driver displays error 1244, Unsupported decimal format. To remedy this
situation, multiply the nonconforming column by 1, which converts it to the Float data type. For example:
SELECT BADCOL * 1 FROM BADFILE
dBASE ODBC
63
Binary SQL_LONGVARBINARY
64
Char SQL_CHAR
Date SQL_TYPE_DATE
65
Float SQL_DECIMAL
66
General SQL_LONGVARBINARY
Logical SQL_BIT
Memo SQL_LONGVARCHAR
Numeric SQL_DECIMAL
63
dBASE V only.
64
254 characters maximum (1024 for Clipper).
65
dBASE IV and V only.
66
FoxPro and dBASE V only.
756 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The dBASE Driver
Currency SQL_DOUBLE
Datetime SQL_TYPE_TIMESTAMP
Double SQL_DOUBLE
Integer SQL_INTEGER
See Retrieving Data Type Information on page 72 for information about retrieving data types.
Column Names
Column names in SQL statements (such as Select and Insert, for example) can be up to ten characters long.
A column name can contain alphanumeric characters and the hyphen character (-). The first character must
be a letter (a through z).
Select Statement
You use a SQL Select statement to specify the columns and records to be read. All of the Select statement
clauses described in SQL Statements for Flat-File Drivers are supported by dBASE Select statements. This
section describes the information that is specific to dBASE, which is Rowid.
Rowid Pseudo-Column
Each dBASE record contains a special column named Rowid. This field contains a unique number that indicates
the record’s sequence in the database. For example, a table that contains 50 records has Rowid values from
1 to 50 (if no records are marked deleted). You can use Rowid in Where and Select clauses.
Rowid is particularly useful when you are updating records. You can retrieve the Rowid of the records in the
database along with the other field values. For example:
SELECT last_name, first_name, salary, rowid FROM emp
Then, you can use the Rowid of the record that you want to update to ensure that you are updating the correct
record and no other. For example:
UPDATE emp set salary = 40000 FROM emp WHERE rowid=21
The fastest way of updating a single row is to use a Where clause with the Rowid. You cannot update the
Rowid column.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 757
Chapter 7: Drivers Only Available for 32-Bit Platforms
Select statements that use the Rowid pseudo-column in the Where clause achieve maximum performance
only for exact equality matches. If you use range scans instead of exact equality matches, a full table scan is
performed. For example:
SELECT * FROM emp WHERE rowid=21 //fast search
SELECT * FROM emp WHERE rowid <=25 //full table scan
table_name is the name of the table to which you are adding or dropping columns.
column_name assigns a name to the column you are adding or specifies the column you are dropping.
data_type specifies the native data type of each column you add.
For example, to add two columns to the emp table:
ALTER TABLE emp (ADD startdate date, dept char (10))
You cannot add columns and drop columns in a single statement, and you can drop only one column at a time.
For example, to drop a column:
ALTER TABLE emp DROP startdate
The Alter Table statement fails if you attempt to drop a column upon which other objects, such as indexes or
views, are dependent.
Create Index
The type of index you create is determined by the value of the CreateType attribute, which you set in the driver
Setup dialog box (for UNIX and Linux, edit the system information file) or as a connection string attribute. The
index can be:
• dBASE IV or V (.MDX)
• Clipper (.NTX)
• FoxPro (.CDX)
The syntax for creating an index is:
758 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The dBASE Driver
Unique means that the driver creates an ANSI-style unique index over the column and ensures uniqueness of
the keys. Use of unique indexes improves performance. ANSI-style unique indexes are different from dBASE-style
unique indexes. With ANSI-style unique indexes, you receive an error message when you try to insert a duplicate
value into an indexed field. With dBASE-style unique indexes, you do not see an error message when you
insert a duplicate value into an indexed field. This is because only one key is inserted in the index file.
index_name is the name of the index file. For FoxPro and dBASE IV or V, this is a tag, which is required to
identify the indexes in an index file. Each index for a table must have a unique name.
base_table_name is the name of the database file whose index is to be created. The .DBF extension is not
required; the driver automatically adds it if it is not present. By default, dBASE IV or V index files are named
base_table_name.MDX and FoxPro indexes are named base_table_name.CDX.
field_name is a name of a column in the dBASE table. You can substitute a valid dBASE-style index expression
for the list of field names.
ASC tells dBASE to create the index in ascending order. DESC tells dBASE to create the index in descending
order. By default, indexes are created in ascending order. You cannot specify both ASC and DESC orders
within a single Create Index statement. For example, the following statement is invalid:
CREATE INDEX emp_i ON emp (last_name ASC, emp_id DESC)
The following table shows the attributes of the different index files supported by the dBASE driver. For each
type supported, it provides the following details:
Drop Index
The syntax for dropping an index is as follows:
67
Compact IDX indexes have the same internal structure as a tag in a CDX file. These indexes can be created if the IDX extension
is included with the index name in the Create Index statement.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 759
Chapter 7: Drivers Only Available for 32-Bit Platforms
For FoxPro and dBASE IV or V, index_name is the tag. Otherwise, index_name is the name of the index
file without the extension.
To drop the index EMPHIRE.MDX, issue the following statement:
DROP INDEX emp.emphire
Pack Statement
When records are deleted from a dBASE file, they are not removed from the file. Instead, they are marked as
having been deleted. Also, when memo fields are updated, space may be wasted in the files. To remove the
deleted records and free the unused space from updated memo fields, you must use the Pack statement. It
has the following form:
PACK filename
filename is the name of the dBASE file to be packed. The .DBF extension is not required; the driver
automatically adds the extension if it is not present. For example:
PACK emp
You cannot pack a file that is opened by another user, and you cannot use the Pack statement in manual
commit mode.
For the specified file, the Pack statement performs the following actions:
• Create Database
• Add Table
• Remove Table
• Use
To create a new FoxPro 3.0 database container, use:
To remove a table from the database container (not delete the table, but unlink it from the database container),
use:
760 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The dBASE Driver
USE database_name
To add or delete columns from a table in a database container, use the Alter Table statement (see Alter Table
Statement on page 758).
Locking
With the dBASE driver, you can build and run applications that share dBASE database files on a network.
Whenever more than one user is running an application that accesses a shared database file, the applications
should lock the records that are being changed. Locking a record prevents other users from locking, updating,
or deleting the record.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 761
Chapter 7: Drivers Only Available for 32-Bit Platforms
SQL Support
The driver supports the minimum SQL grammar.
Note: The Informix driver requires Informix client software. Progress DataDirect also provides an Informix
driver that does not require any client software to access Informix databases. See The Informix Wire Protocol
Driver on page 220 for details.
Driver Requirements
This section provides the system requirements for using the Informix driver on all supported platforms.
762 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Informix Driver
Windows
To access supported remote Informix databases through the Informix driver, you need one of the following:
• On AIX: Informix Client Software Development Kit version 2.2 or higher; or Informix Connect version 2.2 or
higher
• On HP-UX and Solaris: Informix Connect version 2.x
• On HP-UX and Solaris: Informix Client Software Development Kit version 2.x
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 763
Chapter 7: Drivers Only Available for 32-Bit Platforms
Data sources for UNIX and Linux are stored in the system information file (by default, odbc.ini). If you have a
Motif GUI environment on Linux, you can configure and modify data sources through the DataDirect ODBC
Data Source Administrator for Linux (the Linux ODBC Administrator) using a driver Setup dialog box. (See
Configuration Through the Administrator on page 115 for a detailed explanation of the Administrator.)
If you do not have a GUI environment, you can configure and modify data sources directly by editing the odbc.ini
file and storing default connection values there. See Configuration Through the Administrator on page 115 and
Configuration Through the System Information (odbc.ini) File on page 117 for detailed information about the
specific steps necessary to configure a data source.
Connection Option Descriptions on page 769 lists driver connection string attributes that must be used in the
odbc.ini file to set the value of the attributes. Note that only the long name of the attribute can be used in the
file. The default listed in the table is the initial default value when the driver is installed.
On Windows, data sources are stored in the Windows Registry. You can configure and modify data sources
through the ODBC Administrator using a driver Setup dialog box, as described in this section.
On UNIX and Linux, data sources are stored in the odbc.ini file. On Linux, you can configure and
modify data sources through the Linux ODBC Administrator using a driver Setup dialog box, as described in
this section.
Note: This book shows dialog box images that are specific to Windows. If you are using the drivers in the
Linux environment, the dialog box that you see may differ slightly from the Windows version. Windows-only
and UNIX-only connection options are specifically noted by icons in the Setup dialog box descriptions.
When the driver is first installed, the values of its connection options are set by default. These values appear
on the driver Setup dialog box tabs when you create a new data source. You can change these default values
by modifying the data source. In the following procedure, the description of each tab is followed by a table that
lists the connection options for that tab and their initial default values. This table links you to a complete
description of the options and their connection string attribute equivalents. The connection string attributes are
used to override the default values of the data source if you want to change these values at connection time.
To configure an Informix data source:
• On Windows, start the ODBC Administrator by selecting its icon from the Progress DataDirect
program group.
2. Select a tab:
• User DSN: If you are configuring an existing user data source, select the data source name and click
Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the driver
and click Finish to display the driver Setup dialog box.
764 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Informix Driver
• System DSN: If you are configuring an existing system data source, select the data source name
and click Configure to display the driver Setup dialog box.
If you are configuring a new system data source, click Add to display a list of installed drivers. Select
the driver and click Finish to display the driver Setup dialog box.
• File DSN: If you are configuring an existing file data source, select the data source file and click Configure
to display the driver Setup dialog box.
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select
a driver. Click Advancedif you want to specify attributes; otherwise, click Next to proceed. Specify a
name for the data source and click Next. Verify the data source information; then, click Finish to display
the driver Setup dialog box.
The General tab of the ODBC Informix Driver Setup dialog box appears by default.
Figure 79: General tab
Note: The General tab displays only fields that are required for creating a data source. The fields on all
other tabs are optional, unless noted otherwise.
3. On this tab, provide values for the options in the following table; then, click Apply. The table provides links
to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 765
Chapter 7: Drivers Only Available for 32-Bit Platforms
4. Optionally, click the Connection tab to specify connection information. If you want to configure the data
source so that the logon dialog box does not appear during connection, you must specify the connection
information on this tab.
Figure 80: Connection tab
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
766 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Informix Driver
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
Translate : Click Translate to display the Select Translator dialog box, which lists the translators
specified in the ODBC Translators section of the Registry. Progress DataDirect provides a translator named
OEM to ANSI that translates your data from the IBM PC character set to the ANSI character set.
Select a translator; then, click OK to close this dialog box.
6. At any point during the configuration process, you can click Test Connect to attempt to connect to the data
source using the connection properties specified in the driver Setup dialog box. A logon dialog box appears
(see Using a Logon Dialog Box (Informix Client) on page 768 for details). The information you enter in the
logon dialog box during a test connect is not saved.
• If the driver can connect, it releases the connection and displays a "connection established" message.
Click OK.
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 767
Chapter 7: Drivers Only Available for 32-Bit Platforms
Verify that all required client software is properly installed. If it is not, you will see the message:
Specified driver could not be loaded due to system error [xxx]
Click OK.
7. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
DSN=data_source_name[;attribute=value[;attribute=value]...]
FILEDSN=filename.dsn[;attribute=value[;attribute=value]...]
The DSN-less connection string specifies a driver instead of a data source. All connection information must be
entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
Connection Option Descriptions on page 769 lists the long and short names for each attribute, as well as the
initial default value when the driver is first installed. You can specify either long or short names in the connection
string.
An example of a DSN connection string with overriding attribute values for Informix is:
DSN=INFORMIX TABLES;DB=PAYROLL
768 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Informix Driver
1. Type the name of the database you want to access, or, on Windows, select the name from the Database
Name drop-down list.
On Windows, the names on the list are determined by the status of the Get DB List From Informix
check box on the Advanced tab of the ODBC Informix driver Setup dialog box. If the check box is selected,
the names displayed are returned from the Informix server. If cleared, the names displayed are returned
from the user-entered list, which you specify in the Database List field on the Connection tab of the driver
Setup dialog box.
2. Type the name of the host machine on which the Informix server resides.
3. If required, type your user name as specified on the Informix server.
4. If required, type your password.
5. On Windows, click Options to display the Informix Server Options dialog box, where you can change
the Service Name, Server Name, and Protocol Type that you specified in the ODBC Informix Driver Setup
dialog box. Click OK to save your changes.
6. Click OK to complete the logon and to update these values in the Registry.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 769
Chapter 7: Drivers Only Available for 32-Bit Platforms
The following table lists the connection string attributes supported by the Informix driver.
Attribute
ApplicationUsingThreads (AUT)
Purpose
Determines whether the driver works with applications using multiple ODBC threads.
Valid Values
0|1
770 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Informix Driver
Behavior
If set to 1 (Enabled), the driver works with single-threaded and multi-threaded applications.
If set to 0 (Disabled), the driver does not work with multi-threaded applications. If using the driver with
single-threaded applications, this value avoids additional processing required for ODBC thread-safety standards.
Notes
• This connection option can affect performance.
Default
1 (Enabled)
GUI Tab
Advanced tab
See Also
See Performance Considerations on page 780 for details.
Attribute
CancelDetectInterval (CDI)
Purpose
Determines whether long-running queries in threaded applications can be cancelled if the application issues
a SQLCancel.
Valid Values
0|x
where:
x
is the number of seconds the driver waits before checking for SQLCancel calls.
Behavior
If set to 0 (None), the driver does not allow long-running queries in threaded applications to be canceled, even
if the application issues a SQLCancel.
If set to x (seconds), for every pending query, the driver checks for SQLCancel calls at the specified interval.
If the driver determines that a SQLCancel has been issued, the driver cancels the query.
Notes
• This connection option can affect performance.
Example
If you specify 5, for every pending query, the driver checks every five seconds to see whether the application
has issued a SQLCancel call. If it detects a SQLCancel call, the driver cancels the query.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 771
Chapter 7: Drivers Only Available for 32-Bit Platforms
Default
0 (None)
GUI Tab
Advanced tab
See Also
See Performance Considerations on page 780 for details.
Cursor Behavior
Attribute
CursorBehavior (CB)
Purpose
Determines whether cursors will be preserved or closed at the end of transactions.
Valid Values
0|1
Behavior
If set to 1 (Enabled), cursors are held at their current position when transactions end. This value may slow the
performance of your database operations.
If set to set to 0 (Disabled), cursors are closed at the end of transactions.
Default
0 (Disabled)
GUI Tab
Advanced tab
Database List
Attribute
Databases (DL)
Purpose
A list of database names that will be displayed in the Logon dialog box if Get DB List From Informix on the
Advanced tab is not selected.
Valid Values
database_name[,database_name][...]
where:
772 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Informix Driver
database_name
is a database name you want to appear in the Logon dialog box. Separate multiple values with
commas.
Example
db1, db2, db3
Default
None
GUI Tab
Connection tab
Database Name
Attribute
Database (DB)
Purpose
Specifies the name of the database to which you want to connect.
Valid Values
database_name
where:
database_name
Default
None
GUI Tab
General tab
Attribute
DataSourceName (DSN)
Purpose
Specifies the name of a data source in your Windows Registry or odbc.ini file.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 773
Chapter 7: Drivers Only Available for 32-Bit Platforms
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Attribute
LogonID (UID)
Purpose
The default user ID that is used to connect to your database. Your ODBC application may override this value
or you may override it in the logon dialog box or connection string.
Valid Values
userid
where:
userid
Default
None
GUI Tab
Connection tab
Description
Attribute
Description (n/a)
Purpose
Specifies an optional long description of a data source. This description is not used as a runtime connection
attribute, but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
774 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Informix Driver
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Attribute
EnableInsertCursors (EIC)
Purpose
Determines whether the driver can use Insert cursors during inserts governed by parameters.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses Insert cursors.
If set to 0 (Disabled), the driver does not use Insert cursors.
Default
1 (Enabled)
GUI Tab
Advanced tab
Attribute
GetDBListFromInformix (GDBLFI)
Purpose
Determines whether the driver requests the database list to be returned from the Informix server or from the
database list that the user entered at driver setup.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 775
Chapter 7: Drivers Only Available for 32-Bit Platforms
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver requests the database list from the Informix server.
If set to 0 (Disabled), the driver uses the list that was entered by the user at driver setup.
Default
1 (Enabled)
GUI Tab
Advanced tab
Host Name
Attribute
HostName (HOST)
Purpose
The name of the server to which you want to connect.
Valid Values
server_name
where:
server_name
Default
None
GUI Tab
General tab
IANAAppCodePage
Attribute
IANAAppCodePage (IACP)
Purpose
An Internet Assigned Numbers Authority (IANA) value. You must specify a value for this option if your application
is not Unicode-enabled or if your database character set is not Unicode. The value you specify must match
the database character encoding and the system locale.
776 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Informix Driver
The Driver Manager checks for the value of IANAAppCodePage in the following order:
• In the connection string
• In the Data Source section of the system information file (odbc.ini)
• In the ODBC section of the system information file (odbc.ini)
Valid Values
IANA_code_page
where:
IANA_code_page
is one of the valid values listed in "IANAAppCodePage values" in the Progress DataDirect for ODBC
Drivers Reference. The value must match the database character encoding and the system locale.
Notes
Refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers Reference
for details.
Default
4 (ISO 8559-1 Latin-1)
GUI Tab
Advanced tab
Password
Purpose
The password that the application uses to connect to your database. The Password option cannot be specified
through the driver Setup dialog box and should not be stored in a data source. It is specified through the Logon
dialog box or a connection string.
Valid Values
pwd
where:
pwd
is a valid password.
Default
None
GUI Tab
n/a
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 777
Chapter 7: Drivers Only Available for 32-Bit Platforms
Protocol Type
Attribute
Protocol (PRO)
Purpose
Determines the protocol used by the driver to communicate with the server.
Valid Values
olsocspx | olsoctcp | onsocspx | onsoctcp | seipcpip | sesocspx | sesoctcp
Specify the appropriate Informix protocol.
Default
None
GUI Tab
Connection tab
Server Name
Attribute
ServerName (SRVR)
Purpose
The name of the Informix server.
Valid Values
server_name
where:
server_name
Default
None
GUI Tab
Connection tab
778 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Informix Driver
Service Name
Attribute
Service (SERV)
Purpose
The name of the Informix service. The service name is assigned by the system administrator.
Valid Values
service_name
where:
service_name
is the a name that uniquely identifies the Informix service. This name must be specified as it appears
in the services file on the server machine.
Default
None
GUI Tab
Connection tab
Attribute
TrimBlankFromIndexName (TBFIN)
Purpose
Determines whether the driver trims leading spaces from system-generated index names. Some applications
cannot process a leading space in index names.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver trims leading spaces from system-generated index names.
If set to 0 (Disabled), the driver does not trim leading spaces from system-generated index names.
Default
1 (Enabled)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 779
Chapter 7: Drivers Only Available for 32-Bit Platforms
GUI Tab
Advanced tab
Attribute
UseDefaultLogin (UDL)
Purpose
Determines where the driver reads login credentials.
Valid Values
0|1
Behavior
If set to 0 (Disabled), login credentials are read from the Windows Registry, the connection string, or the Logon
to Informix dialog box.
If set to 1 (Enabled), login credentials are read directly from the Informix registry.
Default
0 (Disabled)
GUI Tab
Connection tab
Performance Considerations
The following connection options can enhance driver performance.
Application Using Threads (ApplicationUsingThreads): The driver coordinates concurrent database
operations (operations from different threads) by acquiring locks. Although locking prevents errors in the driver,
it also decreases performance. If your application does not make ODBC calls from different threads, the driver
has no reason to coordinate operations. In this case, the ApplicationUsingThreads attribute should be disabled
(set to 0).
Note: If you are using a multi-threaded application, you must enable the Application Using Threads option.
Cancel Detect Interval (CancelDetectInterval): If your application uses threads, it may allow canceling of
long running queries (may issue synchronous SQLCancel calls). If your application does not issue synchronous
SQLCancel calls, the driver can improve performance if Cancel Detect Interval is disabled (set to 0). In this
case, the driver does not incur the overhead of periodically checking for SQLCancel. In the case where your
application does issue synchronous SQLCancel calls, this option should be set to a value that specifies how
often the driver checks to see if a long running query has been canceled.
780 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Informix Driver
Data Types
The following table shows how the Informix data types map to the standard ODBC data types.
Informix ODBC
BLOB SQL_LONGVARBINARY
BOOLEAN SQL_BIT
68
BYTE SQL_LONGVARBINARY
CHAR SQL_CHAR
CLOB SQL_LONGVARCHAR
DATE SQL_TYPE_DATE
69
DATETIME YEAR TO FRACTION(f) SQL_TYPE_TIMESTAMP
DECIMAL SQL_DECIMAL
FLOAT SQL_DOUBLE
INT8 SQL_BIGINT
INTEGER SQL_INTEGER
68
Not supported for Standard Engine databases.
69
(f) can have a value of 1, 2, 3, 4, or 5. The precision is type-dependent and the scale is 5.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 781
Chapter 7: Drivers Only Available for 32-Bit Platforms
Informix ODBC
MONEY SQL_DECIMAL
NCHAR SQL_CHAR
NVARCHAR SQL_VARCHAR
SERIAL SQL_INTEGER
SERIAL8 SQL_BIGINT
SMALLFLOAT SQL_REAL
SMALLINT SQL_SMALLINT
68
TEXT SQL_LONGVARCHAR
68
VARCHAR SQL_VARCHAR
The Informix driver does not support any complex data types (for example, set, multiset, list, and named/unnamed
abstract types). When the driver encounters a complex type it will return an Unknown Data Type error (SQL
State HY000).
See Retrieving Data Type Information on page 72 for information about retrieving data types.
782 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Informix Driver
MTS Support
On Windows, the driver can take advantage of Microsoft Transaction Server (MTS) capabilities, specifically,
the Distributed Transaction Coordinator (DTC) using the XA Protocol. For a general discussion of MTS and
DTC, refer to the help file of the Microsoft Transaction Server SDK.
Note: The DataDirect Connect for ODBC 32-bit drivers can operate in a 64-bit Windows environment; however,
they do not support DTC in this environment. Only the DataDirect Connect64 for ODBC 64-bit drivers support
DTC in a 64-bit Windows environment.
To enable DTC support, you must be using Informix Connect version 2.20 or higher clients.
To enable support for the DTC:
• The INFORMIXDIR environment variable, which identifies the location of the client programs, library
files, message files, header files, and other Informix software components
• The INFORMIXSERVER environment variable, which identifies the default database server
• An Informix server, which identifies either an existing Informix database server or a new one
• A host name, which identifies the host computer with the database server you want to use
• A user name, which identifies a user name for an account on the currently selected host computer
• A password for the specified user name, if required
When enlisting in a distributed transaction, the Informix clients only use the defaults specified in Setnet32.
2. Run the regcopy utility provided with INFORMIX-Connect to copy the registry entries created by Setnet32
to an area in the registry that is accessible by the DTC. The DTC is a service, and services do not search
for configuration information in the Windows registry where Setnet32 stores client products environment
variables. Therefore, if you do not run regcopy after setting the defaults in Setnet32, enlistment in a distributed
transaction will fail.
For information on using the Setnet32 and regcopy utilities, see the Informix documentation.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 783
Chapter 7: Drivers Only Available for 32-Bit Platforms
Refer to "Locking and isolation levels" in the Progress DataDirect for ODBC Drivers Reference for details.
SQL Support
The driver supports the core SQL grammar.
• SQLProcedures
• SQLColumnPrivileges
• SQLTablePrivileges
• SQLPrimaryKeys
• SQLForeignKeys
• SQLProcedureColumns
The driver also supports scrollable cursors with SQLFetchScroll or SQLExtendedFetch.
Refer to "ODBC API and scalar functions" in the Progress DataDirect for ODBC Drivers Reference for a list of
supported API functions.
784 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The XML Driver
Tabular, DataDirect X X X X X
Hierarchical X
Driver Requirements
You must have Internet Explorer 5 or higher installed. You must also have the Microsoft XML parser, msxml4.dll,
not a higher version, installed. If you need to download the file, go to the site:
http://www.microsoft.com
On the Microsoft site, search on "msxml4.dll". Select the link for downloading the parser.
Format Description
ADO 2.5 persisted files These files are identified by a unique schema namespace URL. Although ADO uses the
same data types defined by XML-Data, the data types use extensions, such as adding a
maximum column width for string columns. ADO 2.5 persisted files are identified by the
following unique XML element:
<xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-
00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset"
xmlns:z="#RowsetSchema">
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 785
Chapter 7: Drivers Only Available for 32-Bit Platforms
Format Description
DataDirect Format This XML format conforms to the W3C recommendation for XML schema, Working Draft
April 07, 2000. These files are identified by the following unique XML element (schema
namespace URL):
<table targetNamespace=
"http://www.merant.com/namespaces/datadirect/xmlrecordset"
xsi:schemaLocation=
"<http://www.merant.com/namespaces/datadirect/xmlrecordset/EMP.xml>"
xmlns="http://www.w3.org/1999/XMLSchema" xmlns:xsi=
"http://www.w3.org/1999/XMLSchema-instance" xmlns:rs=
"http://www.merant.com/namespaces/datadirect/xmlrecordset"><table
xmlns="http://www.w3.org/1999/XMLSchema"
xmlns:xsi= "http://www.w3.org/1999/XMLSchema-instance"
xmlns:rs= "http://www.datadirect-technologies.com/namespaces
/datadirect/xmlrecordset">
Microsoft Data Islands These islands are identified by the <XML> tag in an HTML document. The Data Island
can be embedded in the HTML document. Data Islands can include the following Schema
definition and namespace:
<Schema xmlns="urn:schemas-microsoft-com:xml-data"
xmlns:dt="urn:schemas-microsoft-com:datatypes">
786 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The XML Driver
<quantity>1</quantity>
<USPrice>39.98</USPrice>
<shipDate>1999-05-21</shipDate>
</item>
</items>
</purchaseOrder>
First, the XML driver returns two tables: "purchaseOrder" and "items." Two tables are returned because two
items are found for a single purchase order. The XML driver found commonality of child elements.
Second, the XML driver determines which columns are in a specific table. An _ID column, which is essentially
a primary key, is automatically generated for each table. If a table is determined to be a child of another table,
then it is given a second generated column. The name of this column is prefixed with the parent table’s name
and ends with _ID, for example, _purchaseOrder_ID.
Consider the previous example document. The items table will receive two generated columns, _ID and
_purchaseOrder_ID, which are assigned an integer data type. The purchaseOrder table receives only the
_ID column, because it does not have a parent table.
The tables returned from the example file include the following columns:
Table Columns
varbinary "27AB2F9C"
int "34","-7000"
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 787
Chapter 7: Drivers Only Available for 32-Bit Platforms
long "-12345678012345"
unsignedlong "123456789012345"
date 1963-12-19
time 10:09:58
timeinstant 1963-12-19T10:09:58
decimal 1245.678
Defining Locations
When configuring an XML data source, you must define the location of the XML or HTML documents that the
driver will access. The locations can be either from a local file system or from a Web server.
The following table describes the types of locations:
Folder Implies that each XML file is a single table. When defining a Folder location, you
specify only a directory as the location (not a directory and a file name), for
example, C:\xmlsample.
XML Document Implies that the full path to the XML document, including the XML file name, is the
location. Using this type of location, each document can have one or more tables
and can be a hierarchical-formatted XML document. When defining an XML
Document location, you specify a path and an XML file name as the location, for
example:
C:\xmlsample\file.xmlYou can also specify a web service through a URL, for
example:
http://xxx.company.com/search=XML&mode=books
HTML Document Implies the use of an HTML document with embedded XML Data Islands. Using
this type of location, each document can have one or more tables. When defining
an HTML Document location, you specify a path and an HTML file name, for
example, C:\htmlsample\file.html, as the location.
788 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The XML Driver
c:\xmldata\xmlsample as LOC1
The XML Document location: http://www.acme.com/xmldata/doc.xml as LOC2
For complete information about how to configure locations in an XML data source, see Data Source Configuration
through a GUI (XML) on page 790.
If you are connected to this data source and the data source had the "Show Manufactured Schemas" option
set as the Schema Mode (see the Schema Mode option under Data Source Configuration through a GUI (XML)
on page 790) and then you performed an unqualified SQLTables operation, you would get the following results.
LOC1# FILE1
LOC1# FILE2
LOC2# TABLE1
LOC2# TABLE2
Location names are fabricated into the schema name by adding a # symbol to the end of the location name.
Note: If you had the "Show Virtual Schemas" option set, the above table would have "XML" listed in the Schema
name column.
To fully qualify a table name in a SQL statement, you could use the following:
LOC1#.FILE1
or
XML.FILE1
LOC2#.TABLE2
or
XML.TABLE2
This design gives you a simpler table name qualifier. This is an important advantage given the complexity of
URL names, and the requirement to double quote them in SQL statements. For example, the following query
uses a fully qualified table name for an XML Document location:
SELECT * FROM "http://www.acme.com/xmldata/doc.xml#TABLE2" WHERE productName=’lawnmower’
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 789
Chapter 7: Drivers Only Available for 32-Bit Platforms
1. Start the ODBC Administrator by selecting its icon from the DataDirect Connect program group; then, select
a tab:
• User DSN: If you are configuring an existing user data source, select the data source name on the User
DSN tab and click Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add on the User DSN tab to display a list of installed
drivers. Select the driver and click Finish to display the driver Setup dialog box.
• System DSN: To configure a new system data source, click Add on the System DSN tab to display a
list of installed drivers. Select the driver and click Finish to display the driver Setup dialog box.
• File DSN: If you are configuring an existing file data source, select the data source name on the File
DSN tab and click Configure to display the driver Setup dialog box.
If you are configuring a new file data source, click Add on the File DSN tab to display a list of installed
drivers. Select the driver and click Next. Specify a name for the data source and click Next. Verify the data
source information; then, click Finish to display the driver Setup dialog box.
790 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The XML Driver
Note: The General tab displays only fields that are required for creating a data source. The fields on all
other tabs are optional, unless noted otherwise.
2. On the General tab, provide the following information; then, click Apply.
3. If you want to edit or delete a location name, or change its position in the list, select it; then, click Edit,
Delete, Up, or Down as appropriate.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 791
Chapter 7: Drivers Only Available for 32-Bit Platforms
4. If you want to define a location, click Add. The Configure Location dialog box appears.
Figure 83: Configure Location: General tab
5. On the General tab of the Configure Location dialog box, provide the following required information; then,
click Apply.
Location: Either type the full path to the location you are defining or click the select button: to select a
path.
792 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The XML Driver
6. Optionally, click the Advanced tab of the Configure Location dialog box to specify additional information
about the location you are defining.
Figure 84: Configure Location: Advanced tab
On this tab, provide any of the following optional information; then, click Apply.
• If the driver can connect, it releases the connection and displays a connection established message.
Click OK.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 793
Chapter 7: Drivers Only Available for 32-Bit Platforms
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message. Click OK.
8. Click OK to return to the ODBC XML driver Setup dialog box or Cancel. If you click OK, the values you
have specified become the defaults for this location.
9. Optionally, click the Advanced tab of the ODBC XML driver Setup dialog box to specify data source settings.
Figure 85: Driver Setup: Advanced tab
On this tab, provide any of the following optional information; then, click Apply.
794 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The XML Driver
10. Optionally, click the Options tab to specify data source connection values.
Figure 86: Driver Setup: Options tab
Warning: The properties you set in the Options tab override other properties for this session only and can
adversely affect the operation of the XML driver. Use only authorized entries. For information about authorized
entries for the Options tab, contact Progress DataDirect customer support.
11. At any point during the configuration process, you can click Test Connect to attempt to connect to the data
source using the connection options specified in the driver Setup dialog box. A logon dialog box appears
(see Using a Logon Dialog Box (XML) on page 795 for details). Note that the information you enter in the
logon dialog box during a test connect is not saved.
• If the driver can connect, it releases the connection and displays a connection established message.
Click OK.
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message. Click OK.
12. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 795
Chapter 7: Drivers Only Available for 32-Bit Platforms
This dialog box appears for each password-protected location that you have defined for the data source.
In this dialog box, provide the following information:
1. Type your user ID and password in the appropriate fields for the Location that appears in the Location field.
2. Click OK to connect to the data source.
The DSN-less connection string specifies a driver instead of a data source. All connection information must be
entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
Connection Option Descriptions on page 797 and Configure Location Dialog Box Descriptions on page 804 give
the names and descriptions of the attributes, as well as the initial default value when the driver is first installed.
An example of a DSN connection string with overriding attribute values for XML is:
DSN=XML FILES;LOC1.Create Type=ADO25;Logging=1
796 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The XML Driver
Note: XML driver connection string attributes do not use short name equivalents.
The following table lists the connection string attributes associated with General, Advanced, and Options tabs
of the XML driver Setup dialog box. The descriptions themselves are listed below the table.
Attribute Default
DataSourceName None
Description None
InternationalSort Disabled
Location None
Logging Disabled
ReadOnly Disabled
ShowManufacturedSchemas 0 (Disabled)
ShowVirtualSchemas 1 (Enabled)
Attribute
DataSourceName
Purpose
Specifies the name of a data source in your Windows Registry or odbc.ini file.
Valid Values
string
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 797
Chapter 7: Drivers Only Available for 32-Bit Platforms
string
Default
None
GUI Tab
Driver Setup: General tab
Description
Attribute
Description
Purpose
Specifies an optional long description of a data source. This description is not used as a runtime connection
attribute, but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
Driver Setup: General tab
Driver Options
Attribute
n/a
Purpose
Type configuration options specific to the XML driver.
Valid Values
WARNING: The properties you set in the Options tab override other properties for this session only and can
adversely affect the operation of the XML driver. Use only authorized entries. For information about authorized
entries for the Options tab, contact Progress DataDirect customer support.
798 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The XML Driver
Default
None
GUI Tab
Driver Setup: Options tab
Attribute
InternationalSort
Purpose
Uses international sort order as defined by your operating system when you issue a Select statement with an
Order By clause.
Valid Values
0|1
Behavior
If set to 1 (Enabled), this order is always alphabetic, regardless of case; the letters are sorted as "A, b, C."
Refer to your operating system documentation concerning the sorting of accented characters.
If set to 0 (Disabled), ASCII sort order is used. This order sorts items alphabetically with uppercase letters
preceding lowercase letters. For example, "A, b, C" is sorted as "A, C, b."
Default
0 (Disabled)
GUI Tab
Driver Setup: Advanced tab
Location Names
Attribute
Location
Purpose
A display of all existing location names defined for the data source you are configuring.
Valid Values
string
where:
string
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 799
Chapter 7: Drivers Only Available for 32-Bit Platforms
The location names listed in the text box are used for connections according to the order that they are displayed.
If you want to change the order or precedence, use the Up and Down buttons.
Default
None
GUI Tab
Driver Setup: General tab
Logging
Attribute
Logging
Purpose
Creates a log file that logs the SQL execution plan. A value of 0 means no logging is performed.
Valid Values
0|1
Behavior
If set to 1 (Enabled), a log file is created in the current directory. The default log file name is \Integrator.txt.
If set to 0 (Disabled), no logging is performed.
Default
0 (Disabled)
GUI Tab
Driver Setup: Advanced tab
Read Only
Attribute
ReadOnly
Purpose
Controls whether the driver opens files for Read-Write access or Read-Only access
Valid Values
0|1
800 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The XML Driver
Behavior
If set to 1 (Enabled), the driver opens XML files for Read-Only access. In this case, the XML driver opens XML
files with a Shared Read lock. This allows other connections and applications to read the same XML file that
the XML driver has open; however, they cannot write to the XML file.
If set to 0 (Disabled), the XML driver opens XML files for Read-Write access. Opening an XML file for Read-Write
access places an exclusive lock on the file. No other connections or applications can open the XML file while
the driver has the file open.
Default
0 (Disabled)
GUI Tab
Driver Setup: Advanced tab
Attribute
ReportCodepageConversionErrors
Purpose
Specifies how the driver handles code page conversion errors that occur when a character cannot be converted
from one character set to another.
An error message or warning can occur if an ODBC call causes a conversion error, or if an error occurs during
code page conversions to and from the database or to and from the application. The error or warning generated
is Code page conversion error encountered. In the case of parameter data conversion errors, the
driver adds the following sentence: Error in parameter x, where x is the parameter number. The standard
rules for returning specific row and column errors for bulk operations apply.
Valid Values
0|1|2
Behavior
If set to 0 (Ignore Errors), the driver substitutes 0x1A for each character that cannot be converted and does
not return a warning or error.
If set to 1 (Return Error), the driver returns an error instead of substituting 0x1A for unconverted characters.
If set to 2 (Return Warning), the driver substitutes 0x1A for each character that cannot be converted and returns
a warning.
Default
0 (Ignore Errors)
GUI Tab
Driver Setup: Advanced tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 801
Chapter 7: Drivers Only Available for 32-Bit Platforms
Schema Mode
Attribute
n/a
Purpose
Specifies whether to show virtual schemas, manufactured schemas, or both.
Valid Values
Choose one of the following options:
• Show Virtual Schemas Only. This option returns "XML" in the Schema Name column when a SQLTables
or SQLColumns operation is performed when connected to a data source. See Show Virtual Schemas on
page 803.
• Show Manufactured Schemas Only. This option returns the manufactured schema names in the Schema
Name column when a SQLTables or SQLColumns operation is performed when connected to a data source.
See Show Manufactured Schemas on page 802.
• Show Both Virtual and Manufactured Schemas. This option returns both virtual and manufactured schema
names when a SQLTables or SQLColumns operation is performed when connected to a data source.
Default
Show Virtual Schemas Only
GUI Tab
Driver Setup: Advanced tab
Attribute
ShowManufacturedSchemas
Purpose
Returns the manufactured schema names in the Schema Name column when a SQLTables or SQLColumns
operation is performed when connected to a data source. The Location names you define for a data source
are manufactured into a schema name by adding a # symbol after the Location names. For example:
LOC1# TAB1A
LOC1# TAB1B
LOC2# TAB2A
LOC2# TAB2B
802 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The XML Driver
Valid Values
0|1
Behavior
If set to 1 (Enabled), manufactured schema names are returned.
If set to 0 (Disabled), manufactured schema names are not returned.
To return both manufactured and virtual schema names, set this option to 1 (Enabled) and the Show Virtual
Schemas option to 1 (Enabled).
Default
0 (Disabled)
GUI Tab
Driver Setup: Advanced tab
Attribute
ShowVirtualSchemas
Purpose
Returns "XML" in the Schema Name column when a SQLTables or SQLColumns operation is performed when
connected to a data source. For example:
XML TAB1A
XML TAB1B
XML TAB2A
XML TAB2B
Valid Values
0|1
Behavior
If set to 1 (Enabled), virtual schema names are returned.
If set to 0 (Disabled), virtual schema names are not returned.
To return both virtual and manufactured schema names, set this option to 1 (Enabled) and the Show
Manufactured Schemas option to 1 (Enabled).
Default
1 (Enabled)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 803
Chapter 7: Drivers Only Available for 32-Bit Platforms
GUI Tab
Advanced tab
Note: XML driver connection string attributes do not use short name equivalents.
The names of all connection options in this section are preceded by location_name, where location_name
represents the name of a specific location that you have defined, for example, LOC1. See the description of
the Location Names on page 799 option for details.
Attribute Default
location_name None
location_name.Password None
location_name.Scan Rows 0
location_name.User ID None
Attribute
location_name.Delete Schema
804 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The XML Driver
Purpose
Specifies whether an externally-linked schema file is deleted when a table is deleted. This option is valid only
for Folder location types. The XML document for the table contains a link to this external schema file. By default,
this check box is not selected.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the externally-linked schema file is deleted when the table is deleted. If multiple XML
documents are linked to the same schema file, the schema file is not deleted when a table is deleted.
If set to 0 (Disabled), the externally-linked schema file is not deleted when the table is deleted.
Default
0 (Disabled)
GUI Tab
Configure Location: Advanced tab
Attribute
location_name.Flush Every Change
Purpose
Writes the data document to disk after every insert, update, or delete operation. This option is valid only for
Folder location types.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver writes the data document to disk after every change.
If set to 0 (Disabled), the driver does not write the data document to disk after every change. Disabling this
option can improve performance.
Default
1 (Enabled)
GUI Tab
Configure Location: Advanced tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 805
Chapter 7: Drivers Only Available for 32-Bit Platforms
Location
Attribute
location_name.Initial Catalog
Purpose
The full path name to the location you are defining.
Valid Values
location_directory
where location_directory is the full path name of the directory in which the data files are stored. For example:
LOC1.Initial Catalog=C:\Documents\filesml
Default
None
GUI Tab
Configure Location: General tab
Location Name
Attribute
location_name
Purpose
A unique name for the location you are defining, for example, LOC1.
Valid Values
location_name={DataDirect Closed XML ADO Provider}
where location_name is the unique name of the location you are defining. For example, if you choose the
location name LOC1, then:
LOC1={DataDirect Closed XML ADO Provider}
Default
None
GUI Tab
Configure Location: General tab
806 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The XML Driver
Location Type
Attribute
location_name.Catalog Type Hint
Purpose
Specifies the type of location you are defining for the connection.
Valid Values
Folder | XML Document | HTML Document
For example:
LOC1.Catalog Type Hint=XML Document
Default
Folder
GUI Tab
Configure Location: General tab
See also
See Defining Locations on page 788 for the definition of each type.
Attribute
location_name.Scan Rows
Purpose
An integer that represents the maximum number of rows to scan when the XML driver is determining the data
type of each column. This option is valid only for XML Document location types.
Valid Values
0|x
where:
Behavior
If set to x, the driver scans a maximum of x rows in the table. During the scan, the driver inspects each column
value in the row of a table and adjusts the data type determination for each column based on the corresponding
value. The more sample column values it encounters, the more accurate the determination.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 807
Chapter 7: Drivers Only Available for 32-Bit Platforms
If set to 0, the driver scans all rows in the table. Disabling this option can improve performance because limiting
the number of rows can reduce the amount of time it takes to determine the column information on very large
documents. Because less information is available, however, the determination of the data types can be incorrect.
Default
0
GUI Tab
Configure Location: Advanced tab
Password
Attribute
location_name.Password
Purpose
The password used to establish a connection to the location specified by location_name. A password is required
only if the location to which you are connecting is password-protected.
This option is not available unless the Require User ID/Password option is enabled.
Valid Values
pwd
where:
pwd
is a valid password.
Default
None
GUI Tab
Configure Location: Advanced tab
Attribute
location_name.Require Passwd
Purpose
Specifies whether a User ID and password are required to establish a connection to the location you are
defining.
808 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The XML Driver
Valid Values
0|1
Behavior
If set to 1 (Enabled), a User ID and password are required to establish a connection to the location. You must
enable this option if the location you are defining is password-protected; otherwise, the connection will fail.
Enabling this option causes a Logon dialog box to appear when connecting with the driver.
If set to 0 (Disabled), no user ID and password are required to establish a connection to the location.
Default
0 (Disabled)
GUI Tab
Configure Location: Advanced tab
Attribute
location_name.Resolve External
Purpose
Determines whether external references such as DTDs, Schemas, Entities, and Notations are resolved for the
XML documents contained within the location specified by location_name.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the documents are not processed if the XML parser cannot locate the external references.
If set to 0 (Disabled), the document is processed, even if the XML parser cannot locate the external references.
Default
0 (Disabled)
GUI Tab
Configure Location: Advanced tab
Row Hint
Attribute
location_name.Row Hint
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 809
Chapter 7: Drivers Only Available for 32-Bit Platforms
Purpose
A string that specifies an Extensible Stylesheet Language (XSL) pattern to identify the nodes that make up the
rows in the rowset of a tabular-formatted XML document contained within the location specified by location_name.
See Using Hints for Tabular-Formatted XML Documents on page 812 for details.
This option is valid only for Folder and HTML Document location types.
Valid Values
row_hint
where:
row_hint
is an XSL pattern.
Default
None
GUI Tab
Configure Location: Advanced tab
Table Creation
Attribute
location_name.Create Type
Purpose
Determines the style of XML that is generated when a new table is created. This option is valid only for Folder
location types.
Valid Values
IE5DataIsland | ADO25 | DataDirect
• Data Island Format (IE5DataIsland): New tables are created with the Internet Explorer 5 Data Island XML
style.
• ADO Format (ADO25): New tables are created with the ADO 2.5 XML style.
• DataDirect Format (DataDirect): New tables are created with the DataDirect format. This format conforms
to the W3C recommendation for XML schema, working draft April 07, 2000.
Default
DataDirect
GUI Tab
Configure Location: Advanced tab
See also
See Supported Tabular Formats for XML Documents on page 785 for a description of each of these formats.
810 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The XML Driver
Table Hint
Attribute
location_name.Table Hint
Purpose
A string that specifies an Extensible Stylesheet Language (XSL) pattern to identify the table or rowset nodes
in a tabular-formatted XML document contained within the location specified by location_name. See Using
Hints for Tabular-Formatted XML Documents on page 812 for details.
This option is valid only for Folder and HTML Document location types.
Valid Values
table_hint
where:
table_hint
is an XSL pattern.
Default
None
GUI Tab
Configure Location: Advanced tab
User ID
Attribute
location_name.User ID
Purpose
The User ID (user name) used to establish a connection to the location specified by location_name. A password
is required only if the location to which you are connecting is password-protected.
This option is not available unless the Require User ID/Password option is enabled.
Valid Values
userid
where:
userid
Default
None
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 811
Chapter 7: Drivers Only Available for 32-Bit Platforms
GUI Tab
Configure Location: Advanced tab
Validate Schema
Attribute
location_name.Validate Schema
Purpose
Determines whether the XML documents contained within the location specified by location_name are validated
against their schema.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the XML documents are validated against their schema. This allows a well-formed XML
document to be processed, even if the document is not valid.
If set to 0 (Disabled), the XML documents are not validated against their schema.
Default
0 (Disabled)
GUI Tab
Configure Location: Advanced tab
• If only a table hint is specified, the row nodes are the children of the node to which the hint resolves. It is
assumed that all of the child nodes have the same name.
• If only a row hint is specified, the table node is the parent of the node to which the hint resolves. If the row
hint resolves to a set of nodes, the nodes in that set must all have the same parent.
812 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The XML Driver
• If both a table hint and a row hint are specified, the row hint is taken to be relative to the node to which the
table hint resolves.
The column mode identifier has the format:
\column mode
Example 1
Table Hint:
Row Hint: //Item
The row nodes are the nodes named Item. The table node is the parent of the row nodes. Use this form only
when all of the Item nodes reside under one parent.
If some Item nodes have different parents, use a table hint or a more specific row hint to select the set of Item
nodes.
Example 2
Table Hint:
Row Hint: /Bookstore/Books/Item
The row nodes are the nodes named Item. The table node is Books, which is a child of the Bookstore node.
Example 3
Table Hint: /Bookstore/Books
Row Hint:
The table node is Books, which is a child of the Bookstore node. The row nodes are the children of the Books
node. It is assumed that all of the child nodes under the Books nodes have the same name. If the child nodes
do not all have the same name, the name of the first child node encountered is used as the row node name.
In that case, it would be better to specify both a table and row hint.
Example 4
Table Hint: /Bookstore [@location = "Raleigh"]/Books
Row Hint: ./Item
The table node is Books, which is a child of the Bookstore node. Bookstore has a "location" attribute with the
value Raleigh. The row nodes are the Item nodes that are children of the Books node.
Example 5
Table Hint:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 813
Chapter 7: Drivers Only Available for 32-Bit Platforms
Example 6
Table Hint:
Row Hint: //Item \column child
The row nodes are the nodes named Item. The table node is the parent of the row nodes. The columns are
attributes of the row node.
Data Types
This section provides three tables that show how the data types for each supported tabular-formatted XML
document map to the standard ODBC data types.
i1 i1 SQL_TINYINT SIGNED
i2 i2 SQL_SMALLINT SIGNED
i4 i4 SQL_INTEGER SIGNED
r4 r4 SQL_REAL
r8 r8 SQL_DOUBLE
814 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The XML Driver
i1 i1 SQL_TINYINT SIGNED
i2 i2 SQL_SMALLINT SIGNED
i4 i4 SQL_INTEGER SIGNED
i8 i8 SQL_BIGINT SIGNED
r4 r4 SQL_REAL
r8 r8 SQL_DOUBLE
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 815
Chapter 7: Drivers Only Available for 32-Bit Platforms
816 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The XML Driver
See Retrieving Data Type Information on page 72 for information about retrieving data types.
Unicode Support
The driver supports the Unicode ODBC W (Wide) function calls, such as SQLConnectW. This allows the Driver
Manager to transmit these calls directly to the driver. Otherwise, the Driver Manager would incur the additional
overhead of converting the W calls to ANSI function calls, and vice versa.
See UTF-16 Applications on UNIX and Linux on page 137 for related details.
Also, refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers
Reference for a more detailed explanation of Unicode.
SQL Support
This section provides information about the SQL statements that the XML driver processes, and about SQL
standards and conventions that the driver supports:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 817
Chapter 7: Drivers Only Available for 32-Bit Platforms
SQL Statements
The SQL Engine included with the XML driver supports the following SQL statements:
• Select
• Create and Drop Table
• Insert
• Update
• Delete
Note: See the table at the beginning of this chapter for the SQL statements that the XML driver supports for
the different types of supported file formats.
ANSI date, time, and timestamp literals Intermediate level ANSI SQL-92
818 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The XML Driver
Regular Identifiers
A regular identifier must begin with a letter and may not exceed 128 characters. In addition, all ASCII characters
are converted to uppercase.
The following are examples of regular identifiers:
• FOO
• COLUMN_NAME
• SCHEMA#NAME
• Col3 (legal, but converted to COL3)
Delimited Identifiers
Delimited identifiers may not exceed 128 characters. A double quotation character can be embedded within
the string by specifying two consecutive double quotation mark characters. A delimited identifier can span
multiple lines. The body of a delimited identifier can contain any character except the newline character.
The following examples show delimited identifiers:
• "$ % ^ ( $"
• "This is a delimited variable name"
Integer Numbers
Examples of integer numbers are:
• 5
• 1004
Real Numbers
Examples of real numbers are:
• .10
• 12.01
• 10.
• .01e-10
• 12E+10
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 819
Chapter 7: Drivers Only Available for 32-Bit Platforms
• 12.01e2
• 12.01e-10
• 12.e-10
• '$%^($'
• 'This is a character string literal’
GUID Literals
A GUID uses the following format, where x is a hexadecimal digit:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Hex Literals
Hex literal values are introduced with an uppercase X followed by a single quoted string of hexadecimal
characters.
Examples are:
• X’39FA’
• X’B0F00D’
820 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The XML Driver
Date Literal
{d ’1999-09-19’} date ’1999-09-19’
Time Literal
{t ’11:11:11.225’} time ’11:11:11.225’
Timestamp Literal
{ts ’1999-09-19 11:11:11.225’} timestamp ’1999-09-19
11:11:11.225’
Timestamp Literal
{ts ’1999-09-19’} timestamp ’1999-09-19’
Note: ODBC 1.x style ODBC escape sequences such as the following are not supported:
--(*VENDOR(Microsoft), PRODUCT(ODBC) ...*)--
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 821
Chapter 7: Drivers Only Available for 32-Bit Platforms
You can, however, enclose a keyword in double quotation marks to form a delimited identifier. For example,
the following statement is valid:
SELECT "INDICATOR" FROM T1
The following table lists all of the keywords that are reserved for use in SQL statements or designated as
potential future reserved words.
ANY ARE AS
AT AUTHORIZATION AVG
BOTH BREADTH BY
822 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The XML Driver
GO GOTO GRANT
IDENTIFY IF IFNULL
IGNORE IMMEDIATE IN
INTO IS ISOLATION
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 823
Chapter 7: Drivers Only Available for 32-Bit Platforms
NEXT NO NONE
OCTET_LENGTH OF OFF
OID OLD ON
OPERATORS OPTION OR
824 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The XML Driver
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 825
Chapter 7: Drivers Only Available for 32-Bit Platforms
SQL Comments
ANSI SQL-92 standard comments (--) and C++ standard comments (/*...*/, //) are supported. Comments can
be nested.
For example, in the following query columns col2, col3, and col4 are ignored:
SELECT col1 /* col1 comment */
/*
col2,-- col2 comment
col3,// col3 comment
col4,/* col4 comment */
*/
FROM t1
826 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
8
The Connect XE Drivers
This part describes the Progress DataDirect Connect XE drivers. See Drivers Only Available for 32-Bit Platforms
on page 717 and Drivers for 32-Bit and 64-Bit Platforms on page 139 for information on additional Connect Series
drivers.
• Greenplum
• Pivotal HAWQ
For the latest support information, visit the Progress DataDirect Supported Configurations page:
https://www.progress.com/supported-configurations/datadirect.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 827
Chapter 8: The Connect XE Drivers
The Greenplum Wire Protocol driver is supported in the Windows, UNIX, and Linux environments. See
Environment-Specific Information on page 58 for detailed information about the Windows, UNIX, and Linux
environments supported by this driver.
Refer to the readme file shipped with your DataDirect Connect XE product for the file name of the Greenplum
Wire Protocol driver.
Driver Requirements
The driver has no client requirements.
On Windows, data sources are stored in the Windows Registry. You can configure and modify data sources
through the ODBC Administrator using a driver Setup dialog box, as described in this section.
On UNIX and Linux, data sources are stored in the odbc.ini file. On Linux, you can configure and
modify data sources through the Linux ODBC Administrator using a driver Setup dialog box, as described in
this section.
828 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
Note: This book shows dialog box images that are specific to Windows. If you are using the drivers in the
Linux environment, the dialog box that you see may differ slightly from the Windows version. Windows-only
and UNIX-only connection options are specifically noted by icons in the Setup dialog box descriptions.
When the driver is first installed, the values of its connection options are set by default. These values appear
on the driver Setup dialog box tabs when you create a new data source. You can change these default values
by modifying the data source. In the following procedure, the description of each tab is followed by a table that
lists the connection options for that tab and their initial default values. This table links you to a complete
description of the options and their connection string attribute equivalents. The connection string attributes are
used to override the default values of the data source if you want to change these values at connection time.
To configure a Greenplum data source:
• On Windows, start the ODBC Administrator by selecting its icon from the Progress DataDirect
program group.
2. Select a tab:
• User DSN: If you are configuring an existing user data source, select the data source name and click
Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the driver
and click Finish to display the driver Setup dialog box.
• System DSN: If you are configuring an existing system data source, select the data source name
and click Configure to display the driver Setup dialog box.
If you are configuring a new system data source, click Add to display a list of installed drivers. Select
the driver and click Finish to display the driver Setup dialog box.
• File DSN: If you are configuring an existing file data source, select the data source file and click Configure
to display the driver Setup dialog box.
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select
a driver. Click Advanced if you want to specify attributes; otherwise, click Next to proceed. Specify a
name for the data source and click Next. Verify the data source information; then, click Finish to display
the driver Setup dialog box.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 829
Chapter 8: The Connect XE Drivers
Note: The General tab displays only fields that are required for creating a data source. The fields on all
other tabs are optional, unless noted otherwise.
3. On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
830 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
4. Optionally, click the Advanced tab to specify additional data source settings.
Figure 88: Advanced tab
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 831
Chapter 8: The Connect XE Drivers
Extended Options: Type a semi-colon separated list of connection options and their values. Use this
configuration option to set the value of undocumented connection options that are provided by Progress
DataDirect customer support. You can include any valid connection option in the Extended Options string,
for example:
Database=Server1;UndocumentedOption1=value[;UndocumentedOption2=value;]
If the Extended Options string contains option values that are also set in the setup dialog or data source,
the values of the options specified in the Extended Options string take precedence. However, connection
options that are specified on a connection string override any option value specified in the Extended Options
string.
Note: Do not specify the Extended Options configuration option in a connection string, or the driver will
return an error. Instead, applications should specify the individual undocumented connection options in the
connection string.
Translate: Click Translate to display the Select Translator dialog box, which lists the translators
specified in the ODBC Translators section of the Registry. Progress DataDirect provides a translator named
OEM to ANSI that translates your data from the IBM PC character set to the ANSI character set.
Select a translator; then, click OK to close this dialog box.
5. Optionally, click the Security tab to specify security data source settings.
832 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
See Using Security on page 89 for a general description of authentication and encryption and their
configuration requirements.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 833
Chapter 8: The Connect XE Drivers
6. Optionally, click the Failover tab to specify failover data source settings.
Figure 89: Failover tab
See Using Failover on page 78 for a general description of failover and its related connection options.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
834 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
7. Optionally, click. the Pooling tab to specif pooling data source settings.
Figure 90: Pooling tab
See Using DataDirect Connection Pooling on page 97 for a general description of connection pooling.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 835
Chapter 8: The Connect XE Drivers
8. At any point during the configuration process, you can click Test Connect to attempt to connect to the data
source using the connection options specified in the driver Setup dialog box. A logon dialog box appears
(see Using a Logon Dialog Box (Greenplum) on page 837 for details). Note that the information you enter in
the logon dialog box during a test connect is not saved.
• If the driver can connect, it releases the connection and displays a Connection Established message.
Click OK.
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message. Click OK.
Note: If you are configuring alternate servers for use with the connection failover feature, be aware that
the Test Connect button tests only the primary server, not the alternate servers.
9. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
DSN=data_source_name[;attribute=value[;attribute=value]...]
FILEDSN=filename.dsn[;attribute=value[;attribute=value]...]
The DSN-less connection string specifies a driver instead of a data source. All connection information must be
entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
Greenplum Connection Option Descriptions on page 838 lists the long and short names for each attribute, as
well as the initial default value when the driver is first installed. You can specify either long or short names in
the connection string.
An example of a DSN connection string with overriding attribute values for Greenplum Wire Protocol is:
DSN=Accounting;UID=JOHN;PWD=XYZZY
836 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
1. In the Host Name field, type either the name or the IP address of the server to which you want to connect.
The IP address must be in IPv4 format.
2. In the Port Number field, type the number of your Greenplum listener. Check with your database administrator
for the correct number.
3. In the Database Name field, type the name of the database to which you want to connect.
4. If required, type your Greenplum user name.
5. If required, type your Greenplum password.
6. Click OK to log on to the Greenplum database installed on the server you specified and to update the values
in the Registry.
1. Navigate to the \tools\Power BI subdirectory of the Progress DataDirect installation directory; then,
locate the Power BI connector file DataDirectGreenPlum.pqx, and the installation batch file
install.bat.
2. Run the install.bat file. The following operations are executed by running the install.batfile.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 837
Chapter 8: The Connect XE Drivers
• Data Source: Enter a name for the data source. For example, Greenplum ODBC DSN.
• SQL Statement: If desired, provide a SQL command.
• Data Connectivity mode:
• Select Import to import data to Power BI.
• Select DirectQuery to query live data. (For details, including limitations, refer to the Microsoft Power
BI article Use DirectQuery in Power BI Desktop.)
6. Enter authentication information when prompted. Once connected, the Navigator window displays schema
and table information.
7. Select and load tables. Then, prepare your Power BI dashboard as desired.
Results:
You have successfully accessed your data and are now ready to create reports with Power BI. For more
information, refer to the Power BI product documentation at Power BI documentation.
838 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
ConnectionRetryCount (CRC) 0
ConnectionRetryDelay (CRD) 3
CryptoLibName (CLN)
Empty string
EnableKeysetCursors (EKC 0
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 839
Chapter 8: The Connect XE Drivers
LoadBalanceTimeout (LBT) 0
LoginTimeout (LT) 15
MinPoolSize (MNPS) 0
QueryTimeout (QT) 0
SSLLibName (SLN)
Empty string
UnboundedNumericScale (UNS) 6
840 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
AllowedOpenSSLVersions
Attribute
AllowedOpenSSLVersions (AOV)
Purpose
Important: Version 1.0.2 of the OpenSSL library has reached the end of its product life cycle and is no longer
receiving security updates. Best security practices dictate that you use the latest version of the library.
Determines which version of the OpenSSL library file the driver uses for data encryption. Although the latest
version of the OpenSSL library is the most secure, some characteristics of the library can cause connections
to certain databases to fail. This option allows you to continue using older versions of the OpenSSL library
while you transition your environment to support the latest version.
Valid Values
latest | openssl_version_number[[,openssl_version_number]...]
where:
openssl_version_number
is the version number for the OpenSSL library file to be loaded by the driver, for example, 1.0.2.
When more than one version is specified, the driver will first attempt to load the first version listed.
If the driver is unable to locate and load this file, it will attempt to load the next version in the value.
The driver currently supports versions 1.1.1 and 1.0.2. Refer to the installed readme for latest
supported versions.
Behavior
If set to latest, the driver loads the latest installed version of the OpenSSL library file provided by Progress.
If set to openssl_version_number, the driver loads the specified version of the OpenSSL library file. This
value is used to specify a version other than the latest.
Notes
• This option is ignored if OpenSSL library files are specified using the CryptoLibName and SSLLibName
options.
• This option works only with OpenSSL library files provided by Progress and user supplied OpenSSL library
files that match Progress's naming convention and installation location.
• This option works only for installations using the default directory structure.
• Consult your database administrator concerning the security settings of your server.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 841
Chapter 8: The Connect XE Drivers
Default
1.1.1,1.0.2
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
AllowedOpenSSLVersions=1.0.2
See also
Advanced tab
Alternate Servers
Attribute
AlternateServers (ASRV)
Purpose
A list of alternate database servers to which the driver tries to connect if the primary database server is
unavailable. Specifying a value for this option enables connection failover for the driver. The value you specify
must be in the form of a string that defines the physical location of each alternate server. All of the other required
connection information for each alternate server is the same as what is defined for the primary server connection.
Valid Values
(HostName=hostvalue:PortNumber=portvalue:Database=databasevalue[, . . .])
You must specify the host name, port number, and database name of each alternate server.
Example
The following Alternate Servers value defines two alternate database servers for connection failover:
AlternateServers=(HostName=GreenplumServer:PortNumber=5431:
Database=Pgredb1, HostName=255.201.11.24:PortNumber=5432:Database=Pgredb2)
Default
None
GUI Tab
Failover tab
Attribute
ApplicationUsingThreads (AUT)
842 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
Purpose
Determines whether the driver works with applications using multiple ODBC threads.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver works with single-threaded and multi-threaded applications.
If set to 0 (Disabled), the driver does not work with multi-threaded applications. If using the driver with
single-threaded applications, this value avoids additional processing required for ODBC thread-safety standards.
Default
1 (Enabled)
GUI Tab
Advanced tab
See also
Performance Considerations
Authentication Method
Attribute
AuthenticationMethod (AM)
Purpose
Specifies the method the driver uses to authenticate the user to the server when a connection is established.
If the specified authentication method is not supported by the database server, the connection fails and the
driver generates an error.
Important: When Kerberos is enabled, if the database user name differs from the domain user name, you are
required to pass the database user name via the User Name (LogonID) option in the datasource or connection
string.
Valid Values
0|4
Behavior
If set to 0 (No Encryption), the driver sends the user ID and password in clear text to the server for authentication.
If set to 4 (Kerberos Authentication), the driver uses Kerberos authentication. This method supports both
Windows Active Directory Kerberos and MIT Kerberos environments.
Default
0 (No Encryption)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 843
Chapter 8: The Connect XE Drivers
GUI Tab
Security tab
Batch Mechanism
Attribute
BatchMechanism (BM)
Purpose
Determines the mechanism that is used to execute batch operations.
Valid Values
1|2|3
Behavior
If set to 1 (SingleRowInsert), the driver executes an insert statement for each row contained in a parameter
array. Specify this value if you are experiencing out-of-memory errors when performing batch inserts.
If set to 2 (MultiRowInsert), the driver attempts to execute a single insert statement for all the rows contained
in a parameter array. If the size of the insert statement exceeds the available buffer memory of the driver, the
driver executes multiple statements. Specify this value for substantial performance gains over 1 (SingleRowInsert)
when performing batch inserts.
If set to 3 (Copy), the driver uses the Greenplum COPY command to insert rows into the target table. Specify
this value for substantial performance gains over 1 (SingleRowInsert) when performing batch inserts.
Default
1 (SingleRowInsert)
Notes
• Batch Mechanism determines the mechanism used to perform batch inserts only. For update and delete
batch operations, the driver uses the native batch mechanism to handle the request.
• When BatchMechanism=3, substantial performance gains can be made. However, the following limitations
apply:
• Individual update counts are not returned. However, the total number of inserted rows is returned upon
the execution of a batch operation.
• The entire batch insert is ATOMIC. If any issues are encountered, the entire operation fails and no rows
are inserted.
GUI Tab
Advanced tab
See Also
See Performance Considerations on page 879 for details.
844 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
Connection Pooling
Attribute
Pooling (POOL)
Purpose
Specifies whether to use the driver’s connection pooling.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses connection pooling.
If set to 0 (Disabled), the driver does not use connection pooling.
Notes
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Pooling tab
See also
Performance Considerations on page 879
Connection Reset
Attribute
ConnectionReset (CR)
Purpose
Determines whether the state of connections that are removed from the connection pool for reuse by the
application is reset to the initial configuration of the connection.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the state of connections removed from the connection pool for reuse by an application is
reset to the initial configuration of the connection. Resetting the state can negatively impact performance
because additional commands must be sent over the network to the server to reset the state of the connection.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 845
Chapter 8: The Connect XE Drivers
Notes
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Pooling tab
See also
Performance Considerations on page 879
Attribute
ConnectionRetryCount (CRC)
Purpose
The number of times the driver retries connection attempts to the primary database server, and if specified,
alternate servers until a successful connection is established.
This option and the Connection Retry Delay connection option, which specifies the wait interval between
attempts, can be used in conjunction with failover.
Valid Values
0|x
where:
Behavior
If set to 0, the driver does not try to connect after the initial unsuccessful attempt.
If set to x, the driver retries connection attempts the specified number of times. If a connection is not established
during the retry attempts, the driver returns an error that is generated by the last server to which it tried to
connect.
Default
0
GUI Tab
Failover tab
846 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
Attribute
ConnectionRetryDelay (CRD)
Purpose
Specifies the number of seconds the driver waits between connection retry attempts when Connection Retry
Count is set to a positive integer.
This option and the Connection Retry Count connection option can be used in conjunction with failover.
Valid Values
0|x
where:
Behavior
If set to 0, there is no delay between retries.
If set to x, the driver waits the specified number of seconds between connection retry attempts.
Default
3
GUI Tab
Failover tab
Attribute
CryptoProtocolVersion (CPV)
Purpose
Specifies a comma-separated list of the cryptographic protocols to use when SSL is enabled using the Encryption
Method connection option (EncryptionMethod=1 | 6). When multiple protocols are specified, the driver uses
the highest version supported by the server. If none of the specified protocols are supported by the database
server, behavior is determined by the setting of the EncryptionMethod connection option.
Valid Values
cryptographic_protocol [[, cryptographic_protocol ]...]
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 847
Chapter 8: The Connect XE Drivers
cryptographic_protocol
Caution: Good security practices recommend using TLSv1 or higher, due to known vulnerabilities in the SSLv2
and SSLv3 protocols.
Example
If your security environment is configured to use TLSv1.2 and TLSv1.1, specify the following values:
CryptoProtocolVersion=TLSv1.2, TLSv1.1
Notes
• This option is ignored if Encryption Method is set to 0 - No Encryption.
• Consult your database administrator concerning the data encryption settings of your server.
Default
TLSv1.2,TLSv1.1,TLSv1
GUI Tab
Security tab
See also
Encryption Method on page 852
CryptoLibName
Attribute
CryptoLibName (CLN)
Purpose
The absolute path for the OpenSSL library file containing the cryptographic library to be used by the data source
or connection when TLS/SSL is enabled. The cryptograpic library contains the implementations of cryptographic
algorithms the driver uses for data encryption.
This option allows you to designate a different cryptographic library if you encounter issues with the default
version or want to use a library that you provide. Common issues that require designating a different library
include security vulnerabilities with specific libraries or compatibility issues with your server or application.
Valid Values
absolute_path\openssl_filename
where:
848 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
absolute_path
openssl_filename
is the name of the OpenSSL library file containing the cryptographic library to be used by your data
source or connection.
Example
C:\Progress\DataDirect\Connect64_for_ODBC_71\
Drivers\OpenSSL\1.0.0r\ddssl27.dll (64-bit Windows)
Notes
• The OpenSSL library files provided by Progress combine the cryptographic and TLS/SSL libraries into a
single file; therefore, when your drivers are using a Progress library file, the values specified for the
CryptoLibName and SSLLibName options should be the same. For non-Progress library files, the libraries
may use separate files, which would require unique values to be specified.
• This option can be used to designate OpenSSL libraries not installed by the product; however, the drivers
are only certified against libraries provided by Progress.
Default
Empty string
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
CryptoLibName=C:\Program Files\Progress\DataDirect\
Connect64_for_ODBC_71\Drivers\OpenSSL\1.0.0r\ddssl27.dll;
See Advanced tab for details.
See also
SSLLibName on page 872
Attribute
DataSourceName (DSN)
Purpose
Specifies the name of a data source in your Windows Registry or odbc.ini file.
Valid Values
string
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 849
Chapter 8: The Connect XE Drivers
string
Default
None
GUI Tab
General tab
Database Name
Attribute
Database (DB)
Purpose
Specifies the name of the database to which you want to connect.
Valid Values
database_name
where:
database_name
Default
None
GUI Tab
General tab
Description
Description (n/a)
Purpose
Specifies an optional long description of a data source. This description is not used as a runtime connection
attribute, but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
Valid Values
string
where:
string
850 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
Default
None
GUI Tab
General tab
Attribute
EnableKeysetCursors (EKC)
Purpose
Determines whether the driver emulates keyset cursors to provide scrollable keyset cursors to an ODBC
application.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver emulates keyset cursors.
If set to 0 (Disabled), the driver does not emulate keyset cursors. If an application requests a keyset cursor
and this option is set to 0, the driver uses a static cursor and returns a message that a different value was used.
Default
0 (Disabled)
GUI Tab
Advanced tab
Enable SQLDescribeParam
Attribute
EnableDescribeParam (EDP)
Purpose
Determines whether SQLDescribeParam returns the Datatype, ParameterSize, DecimalDigits, and Nullable
information for parameters in a prepared statement.
Valid Values
0|1
Behavior
If set to 1 (Enabled), SQLDescribeParam returns the Datatype, ParameterSize, DecimalDigits, and Nullable
information for parameters in a prepared statement.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 851
Chapter 8: The Connect XE Drivers
If set to 0 (Disabled), the driver does not support SQLDescribeParam and returns the message: Driver does
not support this function.
Default
1 (Enabled)
GUI Tab
Advanced tab
Encryption Method
Attribute
EncryptionMethod (EM)
Purpose
The method the driver uses to encrypt data sent between the driver and the database server. If the specified
encryption method is not supported by the database server, the connection fails and the driver returns an error.
Valid Values
0|1|6
Behavior
If set to 0 (No Encryption), data is not encrypted.
If set to 1 (SSL), data is encrypted using the SSL protocols specified in the Crypto Protocol Version connection
option.
If set to 6 (RequestSSL), the login request and data are encrypted using SSL if the server is configured for
SSL. If the server is not configured for SSL, an unencrypted connection is established. The SSL protocol used
is determined by the setting of the Crypto Protocol Version connection option.
Notes
• This connection option can affect performance.
• Supported by Greenplum 4.2 and higher.
Default
0 (No Encryption)
GUI Tab
Security tab
See also
Performance Considerations on page 1038
852 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
Attribute
ExtendedColumnMetaData (ECMD)
Purpose
Determines how the driver returns column metadata when using SQLDescribeCol and SQLColAttribute.
Valid Values
0|1
Behavior
If set to 1 (Enabled), SQLDescribeCol returns the actual values for Data Type, Column Size, Decimal Digits,
and Nullable. SQLColAttribute returns the actual values for:
• SQL_DESC_CATALOG_NAME: catalog_name
• SQL_DESC_TABLE_NAME: table_name
• SQL_DESC_BASE_COLUMN_NAME: base_column_name
• SQL_DESC_LOCAL_TYPE_NAME: local_type_name
• SQL_DESC_NULLABLE: nullable
• SQL_DESC_AUTO_UNIQUE_VALUE: auto_unique_value
If set to 0 (Disabled), SQLDescribeCol returns the Data Type, Column Size, and Decimal Digits for the column.
The value SQL_NULLABLE_UNKNOWN is returned for Nullable. SQLColAttribute returns the following attribute
values:
• SQL_DESC_CATALOG_NAME: empty string
• SQL_DESC_TABLE_NAME: empty string
• SQL_DESC_BASE_COLUMN_NAME: empty string
• SQL_DESC_LOCAL_TYPE_NAME: empty string
• SQL_DESC_NULLABLE: SQL_NULLABLE_UNKNOWN
• SQL_DESC_AUTO_UNIQUE_VALUE: SQL_FALSE
Default
0 (Disabled)
GUI Tab
Advanced tab
Failover Granularity
Attribute
FailoverGranularity (FG)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 853
Chapter 8: The Connect XE Drivers
Purpose
Determines whether the driver fails the entire failover process or continues with the process if errors occur
while trying to reestablish a lost connection.
This option applies only when Failover Mode is set to 1 (Extended Connection) or 2 (Select).
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
Valid Values
0|1|2|3
Behavior
If set to 0 (Non-Atomic), the driver continues with the failover process and posts any errors on the statement
on which they occur.
If set to 1 (Atomic) the driver fails the entire failover process if an error is generated as the result of anything
other than executing and repositioning a Select statement. If an error is generated as a result of repositioning
a result set to the last row position, the driver continues with the failover process, but generates a warning that
the Select statement must be reissued.
If set to 2 (Atomic Including Repositioning), the driver fails the entire failover process if any error is generated
as the result of restoring the state of the connection or the state of work in progress.
If set to 3 (Disable Integrity Check), the driver does not verify that the rows that were restored during the failover
process match the original rows. This value applies only when Failover Mode is set to 2 (Select).
Default
0 (Non-Atomic)
GUI Tab
Failover tab
Failover Mode
Attribute
FailoverMode (FM)
Purpose
Specifies the type of failover method the driver uses.
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
Valid Values
0|1|2
Behavior
If set to 0 (Connection), the driver provides failover protection for new connections only.
If set to 1 (Extended Connection), the driver provides failover protection for new and lost connections, but not
any work in progress.
854 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
If set to 2 (Select), the driver provides failover protection for new and lost connections. In addition, it preserves
the state of work performed by the last Select statement executed.
Default
0 (Connection)
GUI Tab
Failover tab
Failover Preconnect
Attribute
FailoverPreconnect (FP)
Purpose
Specifies whether the driver tries to connect to the primary and an alternate server at the same time.
This attribute applies only when Failover Mode is set to 1 (Extended Connection) or 2 (Select) and at least one
alternate server is specified.
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
Valid Values
0|1
Behavior
If set to 0 (Disabled), the driver tries to connect to an alternate server only when failover is caused by an
unsuccessful connection attempt or a lost connection. This value provides the best performance, but your
application typically experiences a short wait while the failover connection is attempted.
If set to 1 (Enabled), the driver tries to connect to the primary and an alternate server at the same time. This
can be useful if your application is time-sensitive and cannot absorb the wait for the failover connection to
succeed.
Default
0 (Disabled)
GUI Tab
Failover tab
Fetch RefCursors
Attribute
FetchRefCursors (FRC)
Purpose
Determines whether the driver returns refcursors from stored procedures as results sets.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 855
Chapter 8: The Connect XE Drivers
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver returns refcursors from stored procedures as result sets. The driver fetches all
the data from the refcursor and then closes the refcursor. If a stored procedure returns multiple refcursors, the
driver generates multiple result sets, one for each refcursor returned.
If set to 0 (Disabled), the driver returns the cursor name for refcursors. The application must fetch the actual
data from the refcursor using the cursor name and must close the cursor before additional processing can be
done on the statement. The application must close the cursor regardless of whether it actually fetches data
from the cursor.
Default
1 (Enabled)
GUI Tab
Advanced tab
Attribute
FetchTSWTZasTimestamp (FTSWTZAT)
Purpose
Determines whether the driver returns column values with the timestamp with time zone data type as the ODBC
data type SQL_TYPE_TIMESTAMP or SQL_VARCHAR.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver returns column values with the timestamp with time zone data type as the ODBC
type SQL_TYPE_TIMESTAMP. The time zone information in the fetched value is truncated. Use this value if
your application needs to process values the same way as TIMESTAMP columns.
If set to 0 (Disabled), the driver returns column values with the timestamp with time zone data type as the
ODBC data type SQL_VARCHAR. Use this value if your application requires the time zone information in the
fetched value.
Default
0 (Disabled)
GUI Tab
Advanced tab
856 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
Attribute
FetchTWFSasTime (FTWFSAT)
Purpose
Determines whether the driver returns column values with the time data type as the ODBC data type
SQL_TYPE_TIME or SQL_TYPE_TIMESTAMP.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver returns column values with the time data type as the ODBC data type
SQL_TYPE_TIME. The fractional seconds portion of the value is truncated.
If set to 0 (Disabled), the driver returns column values with the time data type as the ODBC data type
SQL_TYPE_TIMESTAMP. The fractional seconds portion of the value is preserved. Time columns are not
searchable when they are described and fetched as timestamp.
Notes
• When returning time with fractional seconds data as SQL_TYPE_TIMESTAMP, the Year, Month and Day
parts of the timestamp must be set to zero.
Default
0 (Disabled)
GUI Tab
Advanced tab
Attribute
GSSClient (GSSC)
Purpose
The name of the GSS client library that the driver uses to communicate with the Key Distribution Center (KDC).
The driver uses the path defined by the PATH environment variable for loading the specified client library.
Valid Values
native | client_library
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 857
Chapter 8: The Connect XE Drivers
client_library
Behavior
If set to client_library, the driver uses the specified GSS client library.
Note: For MIT Kerberos distributions, you must provide a full path to the MIT Library. For example, the 64-bit
version for Windows would use the following value: C:\Program
Files\MIT\Kerberos\bin\gssapi64.dll.
If set to native, the driver uses the GSS client for Windows Kerberos. All other users must provide the full
path to the library name.
Default
native
GUI Tab
Security tab
Host Name
Attribute
HostName (HOST)
Purpose
The name or the IP address of the server to which you want to connect.
Valid Values
server_name | IP_address
where:
server_name
IP_address
Example
If your network supports named servers, you can specify a server name such as MainServer. Or, you can
specify an IP address such as 199.226.224.34..
Default
None
858 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
GUI Tab
General tab
Attribute
HostNameInCertificate (HNIC)
Purpose
A host name for certificate validation when SSL encryption is enabled (Encryption Method=1 or 6) and validation
is enabled (Validate Server Certificate=1). This option provides additional security against man-in-the-middle
(MITM) attacks by ensuring that the server the driver is connecting to is the server that was requested.
Valid Values
host_name | #SERVERNAME#
where:
host_name
is the host name specified in the certificate. Consult your SSL administrator for the correct value.
Behavior
If host_name is specified, the driver examines the subjectAltName values included in the certificate. If a
dnsName value is present in the subjectAltName values, then the driver compares the value specified for Host
Name In Certificate with the dnsName value. The connection succeeds if the values match. The connection
fails if the Host Name In Certificate value does not match the dnsName value.
If no subjectAltName values exist or a dnsName value is not in the list of subjectAltName values, then the
driver compares the value specified for Host Name In Certificate with the commonName part of the Subject
name in the certificate. The commonName typically contains the host name of the machine for which the
certificate was created. The connection succeeds if the values match. The connection fails if the Host Name
In Certificate value does not match the commonName. If multiple commonName parts exist in the Subject
name of the certificate, the connection succeeds if the Host Name In Certificate value matches any of the
commonName parts.
If #SERVERNAME# is specified, the driver compares the host server name specified as part of a data source or
connection string to the dnsName or the commonName value.
Default
None
Notes
• Supported by Greenplum 4.2 and higher.
GUI Tab
Security tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 859
Chapter 8: The Connect XE Drivers
IANAAppCodePage
Attribute
IANAAppCodePage (IACP)
Purpose
An Internet Assigned Numbers Authority (IANA) value. You must specify a value for this option if your application
is not Unicode-enabled or if your database character set is not Unicode. The value you specify must match
the database character encoding and the system locale.
The driver uses the specified IANA code page to convert "W" (wide) functions to ANSI.
The driver and Driver Manager both check for the value of IANAAppCodePage in the following order:
• In the connection string
• In the Data Source section of the system information file (odbc.ini)
• In the ODBC section of the system information file (odbc.ini)
If the driver does not find an IANAAppCodePage value, the driver uses the default value of 4 (ISO 8859-1
Latin-1).
Valid Values
IANA_code_page
where:
IANA_code_page
is one of the valid values listed in "IANAAppCodePage values" in the Progress DataDirect for ODBC
Drivers Reference. The value must match the database character encoding and the system locale.
Notes
Refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers Reference
for details.
Default
4 (ISO 8559-1 Latin-1)
GUI Tab
Advanced tab
Initialization String
Attribute
InitializationString (IS)
Purpose
A SQL command that is issued immediately after connecting to the database to manage session settings.
860 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
Valid Values
SQL_command
where:
SQL_command
Example
To set the date format on every connection, specify:
Set DateStyle='ISO, MDY'
Notes
• If the statement fails to execute, the connection fails and the driver reports the error returned from the server.
Default
None
GUI Tab
Advanced tab
Attribute
KeysetCursorOptions (KCO)
Purpose
Determines which columns are used to comprise the keyset that the driver uses to create the initial keyset on
which cursor operations are based. Greenplum does not offer a true row identifier column; the driver instead
uses two hidden system columns provided by the Greenplum database, ctid and gp_segment_id. Because the
database might reassign these IDs following a Vacuum operation, the driver can be configured to also include
other columns to help ensure that data integrity is maintained.
Valid Values
0|1
Behavior
If set to 1 - RowID and Searchable Columns (Enabled), the driver uses a combination of every non-LOB column
in the Select list and the ctid and gp_segment_id hidden columns to build the keyset. By adding other Select
list fields to the keyset, the driver is able to indicate the row cannot be found if the IDs change following a
Vacuum operation.
If set to 0 - RowID Columns (Disabled), the driver uses the ctid and gp_segment_id hidden system columns.
Notes
• This option has no effect unless the EnableKeysetCursors (EKC) connection option is enabled.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 861
Chapter 8: The Connect XE Drivers
Default
0
GUI Tab
Advanced tab
Key Password
Attribute
KeyPassword (KP)
Purpose
Specifies the password used to access the individual keys in the keystore file when SSL is enabled (Encryption
Method=1 or 6) and SSL client authentication is enabled on the database server. Keys stored in a keystore
can be individually password-protected. To extract the key from the keystore, the driver must have the password
of the key.
Valid Values
key_password
where:
key_password
Default
None
Notes
• Supported by Greenplum 4.2 and higher.
GUI Tab
Security tab
Keystore
Attribute
Keystore (KS)
Purpose
The name of the directory containing the keystore file to be used when SSL is enabled (Encryption Method=1
or 6) and SSL client authentication is enabled on the database server. The keystore file contains the certificates
that the client sends to the server in response to the server’s certificate request. If you do not specify a directory,
the current directory is used.
862 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
Valid Values
keystore_directory
where:
keystore_directory
Notes
• The keystore and truststore files can be the same file.
• Supported by Greenplum 4.2 and higher.
Default
None
GUI Tab
Security tab
Keystore Password
Attribute
KeystorePassword (KSP)
Purpose
The password used to access the keystore file when SSL is enabled (Encryption Method=1 or 6) and SSL
client authentication is enabled on the database server. The keystore file contains the certificates that the client
sends to the server in response to the server’s certificate request.
Valid Values
keystore_password
where:
keystore_password
Notes
• The keystore and truststore files may be the same file; therefore, they may have the same password.
• Supported by Greenplum 4.2 and higher.
Default
None
GUI Tab
Security tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 863
Chapter 8: The Connect XE Drivers
Attribute
LoadBalanceTimeout (LBT)
Purpose
Specifies the number of seconds to keep inactive connections open in a connection pool. An inactive connection
is a database session that is not associated with an ODBC connection handle, that is, a connection in the pool
that is not in use by an application.
Valid Values
0|x
where:
Behavior
If set to 0, inactive connections are kept open.
If set to x, inactive connections are closed after the specified number of seconds passes.
Notes
• The Min Pool Size option may cause some connections to ignore this value.
Default
0
GUI Tab
Pooling tab
See also
Performance Considerations on page 879
Load Balancing
Attribute
LoadBalancing (LB)
Purpose
Determines whether the driver uses client load balancing in its attempts to connect to the database servers
(primary and alternate). You can specify one or multiple alternate servers by setting the Alternate Servers
option.
864 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses client load balancing and attempts to connect to the database servers
(primary and alternate servers) in random order.
If set to 0 (Disabled), the driver does not use client load balancing and connects to each server based on their
sequential order (primary server first, then, alternate servers in the order they are specified).
Notes
• This option has no effect unless alternate servers are defined for the Alternate Servers connection option.
Default
0 (Disabled)
GUI Tab
Failover tab
Login Timeout
Attribute
LoginTimeout (LT)
Purpose
The number of seconds the driver waits for a connection to be established before returning control to the
application and generating a timeout error. To override the value that is set by this connection option for an
individual connection, set a different value in the SQL_ATTR_LOGIN_TIMEOUT connection attribute using
the SQLSetConnectAttr() function.
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, the connection request does not time out. The driver silently ignores the
SQL_ATTR_LOGIN_TIMEOUT attribute.
If set to 0, the connection request does not time out, but the driver responds to the SQL_ATTR_LOGIN_TIMEOUT
attribute.
If set to x, the connection request times out after the specified number of seconds unless the application
overrides this setting with the SQL_ATTR_LOGIN_TIMEOUT attribute.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 865
Chapter 8: The Connect XE Drivers
Default
15
GUI Tab
Advanced tab
Attribute
MaxCharSize (MCS)
Purpose
Specifies the maximum size of columns of type SQL_CHAR that the driver describes through result set
descriptions and catalog functions.
Valid Values
A positive integer from 1 to 10485760
When not specified, the actual size of the columns from the database is persisted to the application.
If you specify a value that is not in the specified range, the driver uses the maximum value of the SQL_CHAR
data type.
Default
None. The actual size of the columns from the database is persisted to the application.
GUI Tab
Advanced tab
Attribute
MaxLongVarcharSize (MLVS)
Purpose
Specifies the maximum size of columns of type SQL_LONGVARCHAR that the driver describes through result
set descriptions and catalog functions.
Valid Values
A positive integer from 1 to x
where:
866 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
Default
None. The actual size of the columns from the database is persisted to the application.
GUI Tab
Advanced tab
Attribute
MaxPoolSize (MXPS)
Purpose
The maximum number of connections allowed within a single connection pool. When the maximum number of
connections is reached, no additional connections can be created in the connection pool.
Valid Values
An integer from 1 to 65535
For example, if set to 20, the maximum number of connections allowed in the pool is 20.
Notes
• This connection option can affect performance.
Default
100
GUI Tab
Pooling tab
See also
Performance Considerations on page 879
Attribute
MinPoolSize (MNPS)
Purpose
The minimum number of connections that are opened and placed in a connection pool, in addition to the active
connection, when the pool is created. The connection pool retains this number of connections, even when
some connections exceed their Load Balance Timeout value.
Valid Values
0|x
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 867
Chapter 8: The Connect XE Drivers
Behavior
If set to 0, no connections are opened in addition to the current existing connection.
If set to x, the start-up number of connections in the pool is 5 in addition to the current existing connection.
Notes
• This connection option can affect performance.
Example
If set to 5, the start-up number of connections in the pool is 5 in addition to the current existing connection.
Default
0
GUI Tab
Pooling tab
See also
Performance Considerations on page 879
Attribute
MaxVarcharSize (MVS)
Purpose
Specifies the maximum size of columns of type SQL_VARCHAR that the driver describes through result set
descriptions and catalog functions.
Valid Values
A positive integer from 1 to x
where:
Default
None. The actual size of the columns from the database is persisted to the application.
GUI Tab
Advanced tab
868 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
Password
Attribute
Password (PWD)
Purpose
The password that the application uses to connect to your database. The Password option cannot be specified
through the driver Setup dialog box and should not be stored in a data source. It is specified through the Logon
dialog box or a connection string.
Valid Values
pwd
where:
pwd
is a valid password.
Default
None
GUI Tab
n/a
Port Number
Attribute
PortNumber (PORT)
Purpose
The port number of the server listener.
Valid Values
port_name
where:
port_name
is the port number of the server listener. Check with your database administrator for the correct
number.
Default
5432
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 869
Chapter 8: The Connect XE Drivers
GUI Tab
General tab
Query Timeout
Attribute
QueryTimeout (QT)
Purpose
The number of seconds for the default query timeout for all statements that are created by a connection. To
override the value set by this connection option for an individual statement, set a different value in the
SQL_ATTR_QUERY_TIMEOUT statement attribute on the SQLSetStmtAttr() function.
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, the query does not time out. The driver silently ignores the SQL_ATTR_QUERY_TIMEOUT attribute.
If set to 0, the query does not time out, but the driver responds to the SQL_ATTR_QUERY_TIMEOUT attribute.
If set to x, all queries time out after the specified number of seconds unless the application overrides this value
by setting the SQL_ATTR_QUERY_TIMEOUT attribute.
Default
0
GUI Tab
Advanced tab
Attribute
ReportCodepageConversionErrors (RCCE)
Purpose
Specifies how the driver handles code page conversion errors that occur when a character cannot be converted
from one character set to another.
870 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
An error message or warning can occur if an ODBC call causes a conversion error, or if an error occurs during
code page conversions to and from the database or to and from the application. The error or warning generated
is Code page conversion error encountered. In the case of parameter data conversion errors, the
driver adds the following sentence: Error in parameter x, where x is the parameter number. The standard
rules for returning specific row and column errors for bulk operations apply.
Valid Values
0|1|2
Behavior
If set to 0 (Ignore Errors), the driver substitutes 0x1A for each character that cannot be converted and does
not return a warning or error.
If set to 1 (Return Error), the driver returns an error instead of substituting 0x1A for unconverted characters.
If set to 2 (Return Warning), the driver substitutes 0x1A for each character that cannot be converted and returns
a warning.
Default
0 (Ignore Errors)
GUI Tab
Advanced tab
Attribute
ServicePrincipalName (SPN)
Purpose
The service principal name to be used by driver for Kerberos authentication.
Valid Values
servicePrincipalName
where:
servicePrincipalName
If unspecified, the value of the Network Address option is used as the service principal name.
Notes
• If Authentication Method is set to 0, the value of the Service Principal Name option is ignored.
Default
None
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 871
Chapter 8: The Connect XE Drivers
GUI Tab
Security tab
SSLLibName
Attribute
SSLLibName (SLN)
Purpose
The absolute path for the OpenSSL library file containing the TLS/SSL library to be used by the data source
or connection when TLS/SSL is enabled. The SSL library contains the implementations of TLS/SSL protocols
the driver uses for data encryption.
This option allows you to designate a different SSL library if you encounter issues with the default version or
want to use a library that you provide. Common issues that require designating a different library include security
vulnerabilities with specific libraries or compatibility issues with your server or application.
Valid Values
absolute_path\openssl_filename
where:
absolute_path
openssl_filename
is the name of the OpenSSL library file containing the TLS/SSL Library to be used by your data
source or connection.
Example
C:\Program Files\Progress\DataDirect\ODBC_71\
Drivers\OpenSSL\1.0.0r\ddssl27.dll (64-bit Windows)
Notes
• The OpenSSL library files provided by Progress combine the cryptographic and TLS/SSL libraries into a
single file; therefore, when your drivers are using a Progress library file, the values specified for the
CryptoLibName and SSLLibName options should be the same. For non-Progress library files, the libraries
may use separate files, which would require unique values to be specified.
• This option can be used to designate OpenSSL libraries not installed by the product; however, the drivers
are only certified against libraries provided by Progress.
Default
No default value
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
872 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
SSLLibName=C:\Program Files\Progress\DataDirect\
Connect64_for_ODBC_71\Drivers\OpenSSL\1.0.0r\ddssl27.dll;
See Advanced tab for details.
See also
CryptoLibName on page 848
Attribute
KeepAlive (KA)
Purpose
Specifies whether the driver enables TCPKeepAlive. TCPKeepAlive maintains idle TCP connections by
periodically passing packets between the client and server. If either the client or server does not respond to a
packet, the connection is considered inactive and is terminated. In addition, TCPKeepAlive prevents valid idle
connections from being disconnected by firewalls and proxies by maintaining network activity.
Valid Values
0|1
Behavior
If set to 0 (Disabled), the driver does not enable TCPKeepAlive.
If set to 1 (Enabled), the driver enables TCPKeepAlive.
Default
0 (Disabled)
GUI Tab
Advanced tab
Attribute
TransactionErrorBehavior (TEB)
Purpose
Determines how the driver handles errors that occur within a transaction. When an error occurs in a transaction,
the Greenplum server does not allow any operations on the connection except for rolling back the transaction.
Valid Values
0|1|2
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 873
Chapter 8: The Connect XE Drivers
Behavior
If set to 0 (None), the driver does not roll back the transaction when an error occurs. The application must
handle the error and roll back the transaction. Any operation on the statement other than a rollback results in
an error.
If set to 1 (Rollback Transaction), the driver rolls back the transaction when an error occurs. In addition to the
original error message, the driver posts an error message indicating that the transaction has been rolled back.
Default
1 (Rollback Transaction)
GUI Tab
Advanced tab
Truststore
Attribute
Truststore (TS)
Purpose
The directory that contains the truststore file and the truststore file name to be used when SSL is enabled
(Encryption Method=1) and server authentication is used. The truststore file contains a list of the valid Certificate
Authorities (CAs) that are trusted by the client machine for SSL server authentication. If you do not specify a
directory, the current directory is used.
Valid Values
truststore_directory\filename
where:
truststore_directory
filename
Notes
• The truststore and keystore files may be the same file.
• Supported by Greenplum 4.2 and higher.
Default
None
GUI Tab
Security tab
874 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
Truststore Password
Attribute
TruststorePassword (TSP)
Purpose
Specifies the password that is used to access the truststore file when SSL is enabled (Encryption Method=1
or 6) and server authentication is used. The truststore file contains a list of the Certificate Authorities (CAs)
that the client trusts.
Valid Values
truststore_password
where:
truststore_password
Notes
• The truststore and keystore files may be the same file; therefore, they may have the same password.
• Supported by Greenplum 4.2 and higher.
Default
None
GUI Tab
Security tab
User Name
Attribute
LogonID (UID)
Purpose
The default user ID that is used to connect to your database. Your ODBC application may override this value
or you may override it in the logon dialog box or connection string.
Valid Values
userid
where:
userid
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 875
Chapter 8: The Connect XE Drivers
Default
None
GUI Tab
Advanced tab
Security tab
Attribute
ValidateServerCertificate (VSC)
Purpose
Determines whether the driver validates the certificate that is sent by the database server when SSL encryption
is enabled (Encryption Method=1). When using SSL server authentication, any certificate sent by the server
must be issued by a trusted Certificate Authority (CA). Allowing the driver to trust any certificate returned from
the server even if the issuer is not a trusted CA is useful in test environments because it eliminates the need
to specify truststore information on each client in the test environment.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver validates the certificate that is sent by the database server. Any certificate from
the server must be issued by a trusted CA in the truststore file. If the Host Name In Certificate option is specified,
the driver also validates the certificate using a host name. The Host Name In Certificate option provides
additional security against man-in-the-middle (MITM) attacks by ensuring that the server the driver is connecting
to is the server that was requested.
If set to 0 (Disabled), the driver does not validate the certificate that is sent by the database server. The driver
ignores any truststore information specified by the Trust Store and Trust Store Password options.
Notes
• Truststore information is specified using the TrustStore and TrustStorePassword options.
• Supported by Greenplum 4.2 and higher.
Default
1 (Enabled)
GUI Tab
Security tab
876 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
Attribute
UnboundedNumericPrecision (UNP)
Purpose
Specifies the precision for unbounded NUMERIC columns when they are described within the column, parameter,
result set, or table metadata. Executing aggregation operations (for example, sum or avg) on bounded NUMERIC
columns often results in the server returning the aggregate column as an unbounded NUMERIC column. When
this occurs, this option defines the precision for the aggregate column.
Valid Values
A positive integer from 1 to 1000
Default
1000
GUI Tab
Advanced tab
Attribute
UnboundedNumericScale (UNS)
Purpose
Specifies the scale for unbounded NUMERIC columns when they are described within the column, parameter,
result set, or table metadata. Executing aggregation operations (for example, sum or avg) on bounded NUMERIC
columns often results in the server returning the aggregate column as an unbounded NUMERIC column. When
this occurs, this option defines the scale for the aggregate column.
Valid Values
A positive integer from 1 to 998
Notes
• The driver returns the scale specified in this option for the affected columns regardless of the number of
decimal digits in a value. If a value contains fewer digits to the right of the decimal than the specified scale,
the remaining digits are automatically returned as padded 0s. For example, if your scale is set to 6 and your
value is 22.22, the value returned is 22.220000.
Default
6
GUI Tab
Advanced tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 877
Chapter 8: The Connect XE Drivers
User Name
Attribute
LogonID (UID)
Purpose
The default user ID that is used to connect to your database. Your ODBC application may override this value
or you may override it in the logon dialog box or connection string.
Important: When Kerberos is enabled, if the database user name differs from the domain user name, you are
required to pass the database user name via the User Name (LogonID) option in the datasource or connection
string.
Valid Values
userid
where:
userid
Default
None
GUI Tab
Security tab
Attribute
XMLDescribeType (XDT)
Purpose
The SQL data type that is returned by SQLGetTypeInfo for the XML data type.
See Using the XML Data Type on page 881 for further information about the XML data type.
Valid Values
-4 | -10
Behavior
If set to -4 (SQL_LONGVARBINARY), the driver uses the description SQL_LONGVARBINARY for columns
that are defined as the XML data type.
If set to -10 (SQL_WLONGVARCHAR), the driver uses the description SQL_WLONGVARCHAR for columns
that are defined as the XML data type.
878 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
Default
-10
GUI Tab
Advanced tab
Performance Considerations
The following connection options can enhance driver performance.
Application Using Threads (ApplicationUsingThreads): The driver coordinates concurrent database
operations (operations from different threads) by acquiring locks. Although locking prevents errors in the driver,
it also decreases performance. If your application does not make ODBC calls from different threads, the driver
has no reason to coordinate operations. In this case, the ApplicationUsingThreads attribute should be disabled
(set to 0).
Note: If you are using a multi-threaded application, you must enable the Application Using Threads option.
• When BatchMechanism=2, the driver executes a single insert statement for all the rows contained in a
parameter array. If the size of the insert statement exceeds the available buffer memory of the server, the
driver executes multiple statements.
• When BatchMechanism=3, the driver uses the Greenplum COPY command to insert rows into the target
table.
Connection Pooling (Pooling): If you enable the driver to use connection pooling, you can set additional
options that affect performance:
• Load Balance Timeout (LoadBalanceTimeout ): You can define how long to keep connections in the
pool. The time that a connection was last used is compared to the current time and, if the timespan exceeds
the value of the Load Balance Timeout option, the connection is destroyed. The Min Pool Size option can
cause some connections to ignore this value.
• Connection Reset (ConnectionReset ): Resetting a re-used connection to the initial configuration settings
impacts performance negatively because the connection must issue additional commands to the server.
• Max Pool Size (MaxPoolSize): Setting the maximum number of connections that the pool can contain too
low might cause delays while waiting for a connection to become available. Setting the number too high
wastes resources.
• Min Pool Size (MinPoolSize ): A connection pool is created when the first connection with a unique
connection string connects to the database. The pool is populated with connections up to the minimum pool
size, if one has been specified. The connection pool retains this number of connections, even when some
connections exceed their Load Balance Timeout value.
Failover Mode (FailoverMode): Although high availability that replays queries after a failure provides increased
levels of protection, it can adversely affect performance because of increased overhead.
Data Types
The following table shows how the Greenplum data types are mapped to the standard ODBC data types.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 879
Chapter 8: The Connect XE Drivers
Greenplum ODBC
Bigint SQL_BIGINT
Bigserial SQL_BIGINT
70
Bit SQL_BIT
Boolean SQL_BIT
Bytea SQL_VARBINARY
Character SQL_CHAR
Date SQL_TYPE_DATE
Float SQL_REAL
Integer SQL_INTEGER
Money SQL_DOUBLE
Name SQL_VARCHAR
73
Numeric SQL_NUMERIC
Real SQL_REAL
Serial SQL_INTEGER
Smallint SQL_SMALLINT
Text SQL_LONGVARCHAR
74
Time SQL_TYPE_TIME
Timestamp SQL_TYPE_TIMESTAMP
70
Bit maps to SQL_BIT when the length for the bit is 1. If the length is greater than 1, the driver maps the column to SQL_BINARY.
71
The Citext data type behaves the same as the Text data type, except that it is case-insensitive. The select operations performed
on Citext columns return case-insensitive results.
72
Supported for Greenplum versions 5.3 and higher.
73
Numeric maps to SQL_NUMERIC if the precision of the Numeric is less than or equal to 38. If the precision is greater than 38,
the driver maps the column to SQL_VARCHAR.
74
Time mapping changes based on the setting of the Fetch TWFS as Time option.
880 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
Greenplum ODBC
75
Timestamp with timezone SQL_VARCHAR
Tinyint SQL_SMALLINT
Wchar SQL_CHAR
Wvarchar SQL_VARCHAR
See Retrieving Data Type Information on page 72 for more information about data types.
Unicode Support
The Greenplum Wire Protocol driver automatically determines whether the Greenplum database is a Unicode
database.
Advanced Features
The driver supports the following advanced features:
• Failover
• Connection pooling
• Security
Failover
The driver supports failover and its related connection options. Failover connection options are located on the
Failover tab of the driver Setup dialog box. See Using Failover on page 78 for a general description of failover
and its implementation.
Connection Pooling
The driver supports connection pooling and its related connection options. Connection pooling connection
options are located on the Pooling tab of the driver Setup dialog box. See Using DataDirect Connection Pooling
on page 97 for a general description of connection pooling and its implementation.
75
Timestamp with timezone mapping changes based on the setting of the Fetch TSWTZ as Timestamp option.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 881
Chapter 8: The Connect XE Drivers
Security
The driver supports authentication and encryption. Security connection options are located on the Security tab
of the driver Setup dialog box. See Using Security on page 89 for a general description of security and its
implementation.
even though the function does not return a value or results. The Select SQL statement returns a result set that
has one column named insertFoo and no row data.
The Greenplum Wire Protocol driver supports invoking user-defined functions using the ODBC call Escape.
The previously described function can be invoked using:
{call insertFoo(100, 'Mark')}
Greenplum functions return data from functions as a result set. If multiple output parameters are specified, the
values for the output parameters are returned as columns in the result set. For example, the function defined
as:
CREATE or REPLACE FUNCTION addValues(in v1 int, in v2 int)
RETURNS int
AS $$
SELECT $1 + $2;
$$
LANGUAGE SQL;
returns a result set with a single column of type SQL_INTEGER, whereas the function defined as:
CREATE or REPLACE FUNCTION selectFooRow2
(IN idVal int, OUT id int, OUT name varchar)
AS $$
select intcol, varcharcol from foo where intcol = $1;
$$
LANGUAGE SQL
returns a result set that contains two columns, a SQL_INTEGER id column and a SQL_VARCHAR name
column.
In addition, when calling Greenplum functions that contain output parameters, the native syntax requires that
the output parameter values be omitted from the function call. This, in addition to output parameter values
being returned as a result set, makes the Greenplum behavior of calling functions different from most other
databases.
882 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Greenplum Wire Protocol Driver
The Greenplum Wire Protocol driver provides a mechanism that makes the invoking of functions more consistent
with how other databases behave. In particular, the Greenplum Wire Protocol driver allows parameter markers
for output parameters to be specified in the function argument list when the Escape call is used. The driver
allows buffers to be bound to these output parameters. When the function is executed, the output parameters
are removed from the argument list sent to the server. The driver extracts the output parameter values from
the result set returned by the server and updates the bound output parameter buffers with those values. For
example, the function selectFooRow2 described previously can be invoked as:
The values of the id and name output parameters are returned in the idBuf2 and nameBuf buffers.
If output parameters are bound to a function call, the driver returns the output parameters in the bound buffers.
An error is returned if the number of output parameters bound when the function is executed is less than the
number of output parameters defined in the function. If no output parameters are bound to a function call, the
driver returns the output parameters as a result set.
Greenplum can also return results from a function as a refcursor. There can be, at most, one refcursor per
result; however, a function can return multiple results where each result is a refcursor. A connection option
defines how the driver handles refcursors. See Fetch RefCursors on page 855 for details about this option.
SQL Support
The driver supports the core SQL grammar.
• SQLColumnPrivileges
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 883
Chapter 8: The Connect XE Drivers
The DataDirect Connect XE for ODBC and DataDirect Connect64 XE for ODBC for Impala Wire Protocol driver
support Cloudera Impala database servers.
884 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Impala Wire Protocol Driver
The Impala server is compatible with data stored in a variety of file formats. In addition, Impala can work with
data stored in other systems through the use of storage handlers. The file formats and storage handlers in use
should work seamlessly with the Impala driver. The Impala Wire Protocol driver is formally certified with the
most prevalent file formats and storage handlers:
For the latest support information, visit the Progress DataDirect Supported Configurations page:
https://www.progress.com/supported-configurations/datadirect.
The driver is supported in the Windows, UNIX, and Linux environments. See Environment-Specific Information
on page 58 for detailed information about the environments supported by this driver.
Refer to the readme file shipped with your DataDirect Connect driver for the file name of the driver.
Driver Requirements
The driver has no client requirements.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 885
Chapter 8: The Connect XE Drivers
On Windows, data sources are stored in the Windows Registry. You can configure and modify data sources
through the ODBC Administrator using a driver Setup dialog box, as described in this section. On
UNIX and Linux, data sources are stored in the odbc.ini file.
When the driver is first installed, the values of its connection options are set by default. These values appear
on the driver Setup dialog box tabs when you create a new data source. You can change these default values
by modifying the data source. In the following procedure, the description of each tab is followed by a table that
lists the connection options for that tab and their initial default values. This table links you to a complete
description of the options and their connection string attribute equivalents. The connection string attributes are
used to override the default values of the data source if you want to change these values at connection time.
• On Windows, start the ODBC Administrator by selecting its icon from the Datadirect Connect program
group.
2. Select a tab:
• User DSN: If you are configuring an existing user data source, select the data source name and click
Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the
driver and click Finish to display the driver Setup dialog box.
• System DSN: If you are configuring an existing system data source, select the data source name and
click Configure to display the driver Setup dialog box.
If you are configuring a new system data source, click Add to display a list of installed drivers. Select
the driver and click Finish to display the driver Setup dialog box.
• File DSN: If you are configuring an existing file data source, select the data source file and click Configure
to display the driver Setup dialog box.
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select
a driver. Click Advanced if you want to specify attributes; otherwise, click Next to proceed. Specify a
name for the data source and click Next. Verify the data source information; then, click Finish to display
the driver Setup dialog box.
886 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Impala Wire Protocol Driver
Note: The General tab displays only fields that are required for creating a data source. The fields on all
other tabs are optional, unless noted otherwise.
3. On this tab, provide values for the options in the following table; then, click Apply. The table provides links
to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 887
Chapter 8: The Connect XE Drivers
4. Optionally, click the Advanced tab to specify additional data source settings.
Figure 92: Advanced tab
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
888 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Impala Wire Protocol Driver
Default Buffer Size for Long/LOB Columns (in Kb) on page 900 1024
Extended Options: Type a semi-colon separated list of connection options and their values. Use this
configuration option to set the value of undocumented connection options that are provided by Progress
DataDirect customer support. You can include any valid connection option in the Extended Options string,
for example:
Database=Server1; UndocumentedOption1=value[;UndocumentedOption2=value;]
If the Extended Options string contains option values that are also set in the setup dialog or data source,
the values of the options specified in the Extended Options string take precedence. However, connection
options that are specified on a connection string override any option value specified in the Extended Options
string.
Note: Do not specify the Extended Options configuration option in a connection string, or the driver will
return an error. Instead, applications should specify the individual undocumented connection options in the
connection string.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 889
Chapter 8: The Connect XE Drivers
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
6. At any point during the configuration process, you can click Test Connect to attempt to connect to the data
source using the connection options specified in the driver Setup dialog box. A logon dialog box appears
(see Using a Logon Dialog Box (Hive) on page 1051) for details). Note that the information you enter in the
logon dialog box during a test connect is not saved.
• If the driver can connect, it releases the connection and displays a Connection Established message.
Click OK.
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message. Click OK.
Note: If you are configuring alternate servers for use with the connection failover feature, be aware that
the Test Connect button tests only the primary server, not the alternate servers.
7. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
890 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Impala Wire Protocol Driver
DSN=data_source_name[;attribute=value[;attribute=value]...]
FILEDSN=filename.dsn[;attribute=value[;attribute=value]...]
The DSN-less connection string specifies a driver instead of a data source. All connection information must be
entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
Connection Option Descriptions on page 892 lists the long and short names for each attribute, as well as the
initial default value when the driver is first installed. You can specify either long or short names in the connection
string.
An example of a DSN connection string with overriding attribute values for Hive is:
DSN=Accounting;UID=JOHN;PWD=XYZZY
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 891
Chapter 8: The Connect XE Drivers
Note: A user name and password are not required to connect to Impala.
Note: To configure a standard connection, complete the first two fields and skip to Step 4.
1. In the Host field, type either the name or the IP address of the server to which you want to connect.
2. In the Port Number field, type the port number that your Impala server is listening on. Check with your Impala
administrator for the correct number.
3. In the Database field, type the name of the Impala database. The database must exist, or the connection
attempt will fail.
4. If required, type your logon ID In the User Name field.
5. If required, type your password In the Password field.
6. Click OK to log on to the Impala server you specified and to update the values in the Registry.
Note: The User Name and Password fields are not used at this time to connect to Impala Server.
Array Size
Attribute
ArraySize (AS)
In most cases, the GUI name and the attribute name are the same; however, some exceptions exist. If you
need to look up an option by its connection string attribute name, please refer to the alphabetical table of
connection string attribute names.
The following table lists the connection string attributes supported by the driver.
892 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Impala Wire Protocol Driver
AuthenticationMethod (AM)
0 (User ID/Password)
LoginTimeout (LT) 30
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 893
Chapter 8: The Connect XE Drivers
AllowedOpenSSLVersions
Attribute
AllowedOpenSSLVersions (AOV)
Purpose
Important: Version 1.0.2 of the OpenSSL library has reached the end of its product life cycle and is no longer
receiving security updates. Best security practices dictate that you use the latest version of the library.
Determines which version of the OpenSSL library file the driver uses for data encryption. Although the latest
version of the OpenSSL library is the most secure, some characteristics of the library can cause connections
to certain databases to fail. This option allows you to continue using older versions of the OpenSSL library
while you transition your environment to support the latest version.
Valid Values
latest | openssl_version_number[[,openssl_version_number]...]
where:
openssl_version_number
is the version number for the OpenSSL library file to be loaded by the driver, for example, 1.0.2.
When more than one version is specified, the driver will first attempt to load the first version listed.
If the driver is unable to locate and load this file, it will attempt to load the next version in the value.
The driver currently supports versions 1.1.1 and 1.0.2. Refer to the installed readme for latest
supported versions.
894 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Impala Wire Protocol Driver
Behavior
If set to latest, the driver loads the latest installed version of the OpenSSL library file provided by Progress.
If set to openssl_version_number, the driver loads the specified version of the OpenSSL library file. This
value is used to specify a version other than the latest.
Notes
• This option is ignored if OpenSSL library files are specified using the CryptoLibName and SSLLibName
options.
• This option works only with OpenSSL library files provided by Progress and user supplied OpenSSL library
files that match Progress's naming convention and installation location.
• This option works only for installations using the default directory structure.
• Consult your database administrator concerning the security settings of your server.
Default
1.1.1,1.0.2
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
AllowedOpenSSLVersions=1.0.2
See also
Advanced tab
Array Size
Attribute
ArraySize (AS)
Purpose
The number of cells the driver retrieves from a server for a fetch. When executing a fetch, the driver divides
the value specified by the number columns in a particular table to determine the number of rows to retrieve.
By determining the fetch size based on the number of cells, the driver can avoid out of memory errors when
fetching from tables containing a large number of columns while continuing to provide improved performance
when fetching from tables containing a small number of columns.
Valid Values
x
where:
is a positive integer specifying the number of cells the driver retrieves for a fetch.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 895
Chapter 8: The Connect XE Drivers
Notes
• You can improve performance by increasing the value specified for this option; however, if the number of
cells specified exceeds the available buffer memory for the server, an out of memory error will be returned.
If you receive this error, decrease the value specified until fetches are successfully executed.
• This connection option can affect performance.
Default
50000
GUI Tab
Advanced tab
See Also
See Performance Considerations on page 918 for details.
Authentication Method
Attribute
AuthenticationMethod (AM)
Purpose
Specifies the method the driver uses to authenticate the user to the server when a connection is established.
If the specified authentication method is not supported by the database server, the connection fails and the
driver generates an error.
Valid Values
0 | 4 | -1
Behavior
If set to 0 (User ID/Password), the driver sends the user ID in clear text and an encrypted password to the
server for authentication.
If set to 4 (Kerberos Authentication), the driver uses Kerberos authentication. This method supports both
Windows Active Directory Kerberos and MIT Kerberos environments.
If set to -1 (No Authentication), the driver sends the user ID and password in clear text to the server for
authentication.
Default
0 (User ID/Password)
GUI Tab
Security tab
896 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Impala Wire Protocol Driver
Batch Mechanism
Attribute
BatchMechanism (BM)
Purpose
Determines the mechanism that is used to execute batch operations.
Valid Values
1|2
Behavior
If set to 1 (SingleInsert), the driver executes an insert statement for each row contained in a parameter array.
Select this setting if you are experiencing out-of-memory errors when performing batch inserts.
If set to 2 (MultiRowInsert), the driver attempts to execute a single insert statement for all the rows contained
in a parameter array. If the size of the insert statement exceeds the available buffer memory of the driver, the
driver executes multiple statements. Select this setting for substantial performance gains when performing
batch inserts.
Default
2 (MultiRowInsert)
Notes
• This connection option can affect performance.
GUI Tab
Advanced tab
See Also
See Performance Considerations on page 918 for details.
Attribute
CryptoProtocolVersion (CPV)
Purpose
Specifies a comma-separated list of the cryptographic protocols to use when SSL is enabled using the Encryption
Method connection option (EncryptionMethod=1). When multiple protocols are specified, the driver uses the
highest version supported by the server. If none of the specified protocols are supported by the database
server, behavior is determined by the setting of the EncryptionMethod connection option.
Valid Values
cryptographic_protocol [[, cryptographic_protocol ]...]
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 897
Chapter 8: The Connect XE Drivers
where:
cryptographic_protocol
Caution: Good security practices recommend using TLSv1 or higher, due to known vulnerabilities in the SSLv2
and SSLv3 protocols.
Example
If your security environment is configured to use TLSv1.2 and TLSv1.1, specify the following values:
CryptoProtocolVersion=TLSv1.2, TLSv1.1
Notes
• This option is ignored if Encryption Method is set to 0 - No Encryption.
• Consult your database administrator concerning the data encryption settings of your server.
Default
TLSv1.2,TLSv1.1,TLSv1
GUI Tab
Security tab
See also
Encryption Method on page 903
CryptoLibName
Attribute
CryptoLibName (CLN)
Purpose
The absolute path for the OpenSSL library file containing the cryptographic library to be used by the data source
or connection when TLS/SSL is enabled. The cryptograpic library contains the implementations of cryptographic
algorithms the driver uses for data encryption.
This option allows you to designate a different cryptographic library if you encounter issues with the default
version or want to use a library that you provide. Common issues that require designating a different library
include security vulnerabilities with specific libraries or compatibility issues with your server or application.
Valid Values
absolute_path\openssl_filename
where:
898 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Impala Wire Protocol Driver
absolute_path
openssl_filename
is the name of the OpenSSL library file containing the cryptographic library to be used by your data
source or connection.
Example
C:\Progress\DataDirect\Connect64_for_ODBC_71\
Drivers\OpenSSL\1.0.0r\ddssl27.dll (64-bit Windows)
Notes
• The OpenSSL library files provided by Progress combine the cryptographic and TLS/SSL libraries into a
single file; therefore, when your drivers are using a Progress library file, the values specified for the
CryptoLibName and SSLLibName options should be the same. For non-Progress library files, the libraries
may use separate files, which would require unique values to be specified.
• This option can be used to designate OpenSSL libraries not installed by the product; however, the drivers
are only certified against libraries provided by Progress.
Default
Empty string
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
CryptoLibName=C:\Program Files\Progress\DataDirect\
Connect64_for_ODBC_71\Drivers\OpenSSL\1.0.0r\ddssl27.dll;
See Advanced tab for details.
See also
SSLLibName on page 912
Attribute
DataSourceName (DSN)
Purpose
Specifies the name of a data source in your Windows Registry or odbc.ini file.
Valid Values
string
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 899
Chapter 8: The Connect XE Drivers
string
Default
None
GUI Tab
General tab
Database
Attribute
Database (DB)
Purpose
Specifies the name of the Impala database. The database must exist, or the connection attempt will fail.
Valid Values
database_name
where:
database_name
Default
default
GUI Tab
General tab
Attribute
DefaultLongDataBuffLen (DLDBL)
Purpose
The maximum length of data (in KB) the driver can fetch from long columns in a single round trip and the
maximum length of data that the driver can send using the SQL_DATA_AT_EXEC parameter.
Valid Values
An integer in multiples of 1024
900 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Impala Wire Protocol Driver
The value must be in multiples of 1024 (for example, 1024, 2048). You need to increase the default value if
the total size of any Long data exceeds 1 MB. This value is multiplied by 1024 to determine the total maximum
length of fetched data. For example, if you enter a value of 2048, the maximum length of data would be 1024
x 2048, or 2097152 (2 MB).
Notes
• This connection option can affect performance.
Default
1024
GUI tab
Advanced tab
See Also
See Performance Considerations on page 918 for details.
Attribute
DefaultOrderByLimit (DOBL)
Purpose
Specifies the maximum number of rows returned when a SQL statement containing an ORDER BY clause is
executed. Cloudera Impala requires statements containing the ORDER BY clause to limit the number of rows
returned. This option allows these statements to return a result set without specifying a limit in the application..
Valid Values
-1 | x
where:
Behavior
If set to -1 (disabled), there is no default limit the number of rows returned by a statement containing an ORDER
BY clause. The application must limit the number of rows returned by SQL statements that contain an ORDER
BY clause, or Impala will return an error.
If set to x, the number of rows returned by a SQL statement contining an ORDER BY clause are limited to the
specified number of rows for the session. To override this value, specify a new value in a LIMIT clause in the
statement that is being executed.
Default
-1 (Disabled)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 901
Chapter 8: The Connect XE Drivers
GUI Tab
Advanced tab
Description
Attribute
Description (n/a)
Purpose
Specifies an optional long description of a data source. This description is not used as a runtime connection
attribute, but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Enable SQLDescribeParam
Attribute
EnableDescribeParam (EDP)
Purpose
Determines whether the driver uses the SQLDescribeParam function, which describes parameters as a data
type of SQL_VARCHAR with a length of 255 for statements.
Valid Values
0|1
Behavior
If set to 1 (enabled), the SQLDescribeParam function describes parameters as a data type of SQL_VARCHAR
with a length of 255 for statements.
If set to 0 (disabled), the SQLDescribeParam function returns the standard ODBC error IM001.
Default
0 (Disabled)
902 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Impala Wire Protocol Driver
GUI tab
Advanced tab
Encryption Method
Attribute
EncryptionMethod (EM)
Purpose
The method the driver uses to encrypt data sent between the driver and the database server. If the specified
encryption method is not supported by the database server, the connection fails and the driver returns an error.
Valid Values
0|1
Behavior
If set to 0 (No Encryption), data is not encrypted.
If set to 1 (SSL), data is encrypted using the SSL protocols specified in the Crypto Protocol Version connection
option.
Notes
• This connection option can affect performance.
Default
0 (No Encryption)
GUI Tab
Security tab
See also
Performance Considerations on page 918
Attribute
GSSClient (GSSC)
Purpose
The name of the GSS client library that the driver uses to communicate with the Key Distribution Center (KDC).
The driver uses the path defined by the PATH environment variable for loading the specified client library.
Valid Values
native | client_library
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 903
Chapter 8: The Connect XE Drivers
where:
client_library
Behavior
If set to client_library, the driver uses the specified GSS client library.
Note: For MIT Kerberos distributions, you must provide a full path to the MIT Library. For example, the 64-bit
version for Windows would use the following value: C:\Program
Files\MIT\Kerberos\bin\gssapi64.dll.
If set to native, the driver uses the GSS client for Windows Kerberos. All other users must provide the full
path to the library name.
Default
native
GUI Tab
Security tab
Host Name
Attribute
HostName (HOST)
Purpose
The name or the IP address of the server to which you want to connect.
Valid Values
host_name | IP_address
where:
hostname
IP_address
Default
None
GUI Tab
General tab
904 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Impala Wire Protocol Driver
Attribute
HostNameInCertificate (HNIC)
Purpose
A host name for certificate validation when SSL encryption is enabled (Encryption Method=1) and validation
is enabled (Validate Server Certificate=1). This option provides additional security against man-in-the-middle
(MITM) attacks by ensuring that the server the driver is connecting to is the server that was requested.
Valid Values
host_name | #SERVERNAME#
where:
host_name
is the host name specified in the certificate. Consult your SSL administrator for the correct value.
Behavior
If host_name is specified, the driver examines the subjectAltName values included in the certificate. If a
dnsName value is present in the subjectAltName values, then the driver compares the value specified for Host
Name In Certificate with the dnsName value. The connection succeeds if the values match. The connection
fails if the Host Name In Certificate value does not match the dnsName value.
If no subjectAltName values exist or a dnsName value is not in the list of subjectAltName values, then the
driver compares the value specified for Host Name In Certificate with the commonName part of the Subject
name in the certificate. The commonName typically contains the host name of the machine for which the
certificate was created. The connection succeeds if the values match. The connection fails if the Host Name
In Certificate value does not match the commonName. If multiple commonName parts exist in the Subject
name of the certificate, the connection succeeds if the Host Name In Certificate value matches any of the
commonName parts.
If #SERVERNAME# is specified, the driver compares the host server name specified as part of a data source or
connection string to the dnsName or the commonName value.
Default
None
GUI Tab
Security tab
Key Password
Attribute
KeyPassword (KP)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 905
Chapter 8: The Connect XE Drivers
Purpose
Specifies the password used to access the individual keys in the keystore file when SSL is enabled (Encryption
Method=1) and SSL client authentication is enabled on the database server. Keys stored in a keystore can be
individually password-protected. To extract the key from the keystore, the driver must have the password of
the key.
Valid Values
key_password
where:
key_password
Default
None
GUI Tab
Security tab
Key Store
Attribute
Keystore (KS)
Purpose
The name of the directory containing the keystore file to be used when SSL is enabled (Encryption Method=1)
and SSL client authentication is enabled on the database server. The keystore file contains the certificates that
the client sends to the server in response to the server’s certificate request. If you do not specify a directory,
the current directory is used.
Valid Values
keystore_directory
where:
keystore_directory
Notes
• The keystore and truststore files can be the same file.
Default
None
GUI Tab
Security tab
906 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Impala Wire Protocol Driver
Keystore Password
Attribute
KeystorePassword (KSP)
Purpose
The password used to access the keystore file when SSL is enabled (Encryption Method=1) and SSL client
authentication is enabled on the database server. The keystore file contains the certificates that the client sends
to the server in response to the server’s certificate request.
Valid Values
keystore_password
where:
keystore_password
Notes
• The keystore and truststore files may be the same file; therefore, they may have the same password.
Default
None
GUI Tab
Security tab
Login Timeout
Attribute
LoginTimeout (LT)
Purpose
Specifies the number of seconds the driver waits for a connection to be established before returning control to
the application and generating a timeout error. To override the value that is set by this connection option for
an individual connection, set a different value in the SQL_ATTR_LOGIN_TIMEOUT connection attribute using
the SQLSetConnectAttr() function.
Valid Values
-1 | 0 | x
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 907
Chapter 8: The Connect XE Drivers
Behavior
If set to -1, the connection request does not time out. The driver silently ignores the
SQL_ATTR_LOGIN_TIMEOUT attribute.
If set to 0, the connection request does not time out, but the driver responds to the SQL_ATTR_LOGIN_TIMEOUT
attribute.
If set to x, the connection request times out after the specified number of seconds unless the application
overrides this setting with the SQL_ATTR_LOGIN_TIMEOUT attribute.
Default
30
GUI Tab
Advanced tab
Attribute
MaxVarcharSize (MVS)
Purpose
Specifies the maximum size of columns of type SQL_VARCHAR that the driver describes through result set
descriptions and catalog functions.
Valid Values
A positive integer from 255 to x
where:
Default
2147483647
GUI Tab
Advanced tab
Password
Attribute
Password (PWD)
908 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Impala Wire Protocol Driver
Purpose
The password that the application uses to connect to your database. The Password option cannot be specified
through the driver Setup dialog box and should not be stored in a data source. It is specified through the Logon
dialog box or a connection string.
Valid Values
pwd
where:
pwd
is a valid password.
Default
None
GUI Tab
n/a
Port Number
Attribute
PortNumber (PORT)
Purpose
Specifies the port number of the server listener.
Valid Values
port_number
where:
port_number
is the port number of the server listener. Check with your database administrator for the correct
number.
Default
None
GUI Tab
General tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 909
Chapter 8: The Connect XE Drivers
Proxy User
Attribute
ProxyUser (PU)
Purpose
Specifies the UserID used for impersonation. When impersonation is enabled on the server, this value determines
your identity and access rights to files when executing queries. If no value is provided for this option or if
impersonation is disabled, you will execute queries as the user who initiated the process.
Impersonation provides a method for administrators to control access to data. Administrators set access rights
to files by using HDFS and directory permissions on the server.
Valid Values
userid
where:
userid
Default
None
Notes
• Supported in Impala 1.2 and higher.
GUI Tab
Security tab
Attribute
RemoveColumnQualifiers (RCQ)
Purpose
Specifies whether the driver removes 3-part column qualifiers and replaces them with alias.column qualifiers.
Microsoft Access executes a Select statement using this syntax when an index is specified on a linked table.
Valid Values
0|1
Behavior
If set to 1 (enabled) the driver removes 3-part column qualifiers and replaces them with alias.column qualifiers.
Column qualifiers are Microsoft Access compatible in this setting.
910 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Impala Wire Protocol Driver
Notes
• When using the driver with Microsoft Access in creating a linked table, it is highly recommended that you
do not specify an index. Specifying an index causes Access to execute a Select statement for each row,
which results in very slow performance.
Default
0 (Disabled)
GUI Tab
Advanced tab
See Also
See Performance Considerations on page 918 for details.
Attribute
ServicePrincipalName (SPN)
Purpose
The service principal name to be used by driver for Kerberos authentication.
Valid Values
ServicePrincipalName
where:
ServicePrincipalName
is the three-part service principal name registered with the key distribution center (KDC).
You must specify the service principal name using the following format:
Service_Name/[email protected]
where:
Service_Name
is the name of the service hosting the instance. For example, impala.
The server automatically generates the service name. Refer to Cloudera Impala documentation for
additional information.
Fully_Qualified_Domain_Name
is the fully qualified domain name of the host machine. For example, yourserver.example.com.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 911
Chapter 8: The Connect XE Drivers
REALM.COM
is the domain name of the host machine. This part of the value must be specified in upper-case
characters. For example, EXAMPLE.COM.
Example
The following is an example of a valid service principal name:
impala/[email protected]
Notes
• If unspecified, the value of the Network Address option is used as the service principal name.
• If Authentication Method is set to 0 or -1, the value of the Service Principal Name option is ignored.
Default
None
GUI Tab
Security tab
SSLLibName
Attribute
SSLLibName (SLN)
Purpose
The absolute path for the OpenSSL library file containing the TLS/SSL library to be used by the data source
or connection when TLS/SSL is enabled. The SSL library contains the implementations of TLS/SSL protocols
the driver uses for data encryption.
This option allows you to designate a different SSL library if you encounter issues with the default version or
want to use a library that you provide. Common issues that require designating a different library include security
vulnerabilities with specific libraries or compatibility issues with your server or application.
Valid Values
absolute_path\openssl_filename
where:
absolute_path
openssl_filename
is the name of the OpenSSL library file containing the TLS/SSL Library to be used by your data
source or connection.
912 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Impala Wire Protocol Driver
Example
C:\Program Files\Progress\DataDirect\ODBC_71\
Drivers\OpenSSL\1.0.0r\ddssl27.dll (64-bit Windows)
Notes
• The OpenSSL library files provided by Progress combine the cryptographic and TLS/SSL libraries into a
single file; therefore, when your drivers are using a Progress library file, the values specified for the
CryptoLibName and SSLLibName options should be the same. For non-Progress library files, the libraries
may use separate files, which would require unique values to be specified.
• This option can be used to designate OpenSSL libraries not installed by the product; however, the drivers
are only certified against libraries provided by Progress.
Default
No default value
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
SSLLibName=C:\Program Files\Progress\DataDirect\
Connect64_for_ODBC_71\Drivers\OpenSSL\1.0.0r\ddssl27.dll;
See Advanced tab for details.
See also
CryptoLibName on page 898
Attribute
StringDescribeType (SDT)
Purpose
Specifies whether all string columns are described as SQL_VARCHAR. This connection option affects
SQL_Columns, SQLDescribeCol, SQLColAttributes, etc. It does not affect SQLGetTypeInfo.
Valid Values
-10 | -9
Behavior
If set to -10 (SQL_WLONGVARCHAR), all string columns are described as SQL_WLONGVARCHAR.
If set to -9 - (SQL_WVARCHAR), all string columns are described as SQL_WVARCHAR.
Default
-9 - SQL_WVARCHAR
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 913
Chapter 8: The Connect XE Drivers
GUI Tab
Advanced tab
Attribute
KeepAlive (KA)
Purpose
Specifies whether the driver enables TCPKeepAlive. TCPKeepAlive maintains idle TCP connections by
periodically passing packets between the client and server. If either the client or server does not respond to a
packet, the connection is considered inactive and is terminated. In addition, TCPKeepAlive prevents valid idle
connections from being disconnected by firewalls and proxies by maintaining network activity.
Valid Values
0|1
Behavior
If set to 0 (Disabled), the driver does not enable TCPKeepAlive.
If set to 1 (Enabled), the driver enables TCPKeepAlive.
Default
0 (Disabled)
GUI Tab
Advanced tab
Transaction Mode
Attribute
TransactionMode (TM)
Purpose
Specifies how the driver handles manual transactions.
Valid Values
0|1
Behavior
If set to 1 (Ignore), the data source does not support transactions and the driver always operates in auto-commit
mode. Calls to set the driver to manual commit mode and to commit transactions are ignored. Calls to rollback
a transaction cause the driver to return an error indicating that no transaction is started. Metadata indicates
that the driver supports transactions and the ReadUncommitted transaction isolation level.
If set to 0 (No Transactions), the data source and the driver do not support transactions. Metadata indicates
that the driver does not support transactions.
914 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Impala Wire Protocol Driver
Default
0 (No Transactions)
GUI Tab
Advanced tab
Attribute
TruststorePassword (TSP)
Purpose
Specifies the password that is used to access the truststore file when SSL is enabled (Encryption Method=1)
and server authentication is used. The truststore file contains a list of the Certificate Authorities (CAs) that the
client trusts.
Valid Values
truststore_password
where:
truststore_password
Notes
• The truststore and keystore files may be the same file; therefore, they may have the same password.
Default
None
GUI Tab
Security tab
Truststore
Attribute
Truststore (TS)
Purpose
The directory that contains the truststore file and the truststore file name to be used when SSL is enabled
(Encryption Method=1) and server authentication is used. The truststore file contains a list of the valid Certificate
Authorities (CAs) that are trusted by the client machine for SSL server authentication. If you do not specify a
directory, the current directory is used.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 915
Chapter 8: The Connect XE Drivers
Valid Values
truststore_directory\filename
where:
truststore_directory
filename
Notes
• The truststore and keystore files may be the same file.
Default
None
GUI Tab
Security tab
Attribute
UseCurrentSchema (UCS)
Purpose
Specifies whether results are restricted to the tables and views in the current schema if a catalog function call
is made without specifying a schema or if the schema is specified as the wildcard character %. Restricting
results to the tables and views in the current schema improves performance of catalog calls that do not specify
a schema.
Valid Values
0|1
Behavior
If set to 1 (Enabled), results of catalog function calls are restricted to the tables and views in the current
schema.
If set to 0 (Disabled), results of catalog function calls are not restricted.
Default
0 (Disabled)
GUI Tab
Advanced tab
916 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Impala Wire Protocol Driver
See Also
See Performance Considerations on page 918 for details.
User Name
Attribute
LogonID (UID)
Purpose
The default user ID that is used to connect to your database.
Valid Values
N/A
GUI Tab
Security tab
Attribute
ValidateServerCertificate (VSC)
Purpose
Determines whether the driver validates the certificate that is sent by the database server when SSL encryption
is enabled (Encryption Method=1). When using SSL server authentication, any certificate sent by the server
must be issued by a trusted Certificate Authority (CA). Allowing the driver to trust any certificate returned from
the server even if the issuer is not a trusted CA is useful in test environments because it eliminates the need
to specify truststore information on each client in the test environment.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver validates the certificate that is sent by the database server. Any certificate from
the server must be issued by a trusted CA in the truststore file. If the Host Name In Certificate option is specified,
the driver also validates the certificate using a host name. The Host Name In Certificate option provides
additional security against man-in-the-middle (MITM) attacks by ensuring that the server the driver is connecting
to is the server that was requested.
If set to 0 (Disabled), the driver does not validate the certificate that is sent by the database server. The driver
ignores any truststore information specified by the Trust Store and Trust Store Password options.
Notes
• Truststore information is specified using the TrustStore and TrustStorePassword options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 917
Chapter 8: The Connect XE Drivers
Default
1 (Enabled)
GUI Tab
Security tab
Performance Considerations
The following connection options can enhance driver performance.
Array Size (ArraySize): To improve throughput, consider increasing the value of Array Size. By increasing
the value of Array Size, you increase the number of rows the driver will retrieve from the server for a fetch. In
turn, increasing the number of rows that the driver can retrieve reduces the number, and expense, of network
round trips. For example, if an application attempts to fetch 100,000 rows, it is more efficient for the driver to
retrieve 2000 rows over the course of 50 round trips than to retrieve 500 rows over the course of 200 round
trips. Note that improved throughput does come at the expense of increased demands on memory and slower
response time. Furthermore, if the fetch size exceeds the available buffer memory of the server, an out of
memory error is returned when attempting to execute a fetch. If you receive this error, decrease the value
specified until fetches are successfully executed.
Batch Mechanism (BatchMechanism): If your application does not require individual update counts for each
statement or parameter set in the batch, then BatchMechanism should be set to 2 (MultiRowInsert). Unlike the
native batch mechanism, the multi-row insert mechanism only returns the total number of update counts for
batch inserts. Therefore, setting BatchMechanism to MultiRowInsert offers substantial performance gains when
performing batch inserts.
Default Buffer Size for Long/LOB Columns (DefaultLongDataBuffLen): To improve performance when
your application fetches images, pictures, or long text or binary data, a buffer size can be set to accomodate
the maximum size of the data. The buffer size should only be large enough to accommodate the maximum
amount of data retrieved; otherwise, performance is reduced by transferring large amounts of data into an
oversized buffer. If your application retrieves more than 1 MB of data, the buffer size should be increased
accordingly.
Encryption Method (EncryptionMethod): Data encryption may adversely affect performance because of the
additional overhead (mainly CPU usage) that is required to encrypt and decrypt data.
Use Current Schema for Catalog Functions (UseCurrentSchema): If your application needs to access
database objects owned only by the current user, then performance can be improved. In this case, the Use
Current Schema for Catalog Functions option must be enabled. When this option is enabled, the driver returns
only database objects owned by the current user when executing catalog functions. Calls to catalog functions
are optimized by grouping queries. Enabling this option is equivalent to passing the Logon ID used on the
connect as the Schema Name arguement to catalog functions.
Data Types
The following table shows how the Impala data types are mapped to the standard ODBC data types.
Impala ODBC
Bigint SQL_BIGINT
Boolean SQL_BIT
918 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Impala Wire Protocol Driver
Impala ODBC
76
Char SQL_CHAR
76
Decimal SQL_DECIMAL
Double SQL_DOUBLE
Float SQL_REAL
Int SQL_INTEGER
Smallint SQL_SMALLINT
77
String SQL_WVARCHAR,
SQL_WLONGVARCHAR
78
Timestamp SQL_TYPE_TIMESTAMP
Tinyint SQL_TINYINT
76
Varchar SQL_VARCHAR
Advanced Features
The driver supports the following advanced features:
• Security
Security
The driver supports authentication and data encryption. Security connection options are located on the Security
tab of the driver Setup dialog box. See Using Security on page 89 for a general description of security and its
implementation. The following security-related information is specific to the Impala Wire Protocol driver.
Apache Sentry
Apache Sentry is a modular security system that enables administrators to control access to data and metadata
stored on an Apache Hadoop cluster by defining user roles and permissions. The driver works transparently
with Sentry and does not require further configuration. To use Sentry, Kerberos authentication must be enabled,
and a Kerberos logon must be provided at connection.
Note: When establishing a connection, the driver attempts to set the user's default database to be used for
the session. In environments using Sentry, the user must be granted access to this database; otherwise, the
connection will fail.
76
Supported with Impala 2.0 and higher.
78
If the StringDescribeType property is set to wvarchar (the default), this data type maps to WVARCHAR. If set to
wlongvarchar, this data type maps to WLONGVARCHAR.
77
Maximum of 2 GB
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 919
Chapter 8: The Connect XE Drivers
Materialized Views
Impala supports views but purely as logical objects with no associated storage. As such, there is no support
for materialized views in Impala; therefore, the driver does not support materialized views.
Stored Procedures
Impala has no concept of stored procedures. Therefore, they are not supported in the driver.
Unicode Support
The driver is fully Unicode enabled. On UNIX and Linux platforms, the driver supports both UTF-8 and UTF-16.
On Windows platforms, the Impala driver supports UCS-2/UTF-16 only.
The driver supports the Unicode ODBC W (Wide) function calls, such as SQLConnectW. This allows the Driver
Manager to transmit these calls directly to the driver. Otherwise, the Driver Manager would incur the additional
overhead of converting the W calls to ANSI function calls, and vice versa.
See UTF-16 Applications on UNIX and Linux on page 137 for related details.
Also, refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers
Reference for a more detailed explanation of Unicode.
SQL Support
The driver supports the core SQL grammar and the Cloudera Impala query language.
Refer to the Impala SQL Language Reference for information about using Impala SQL.
Also, see SQL Functionality for the Impala Wire Protocol driver.
920 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Refer to "ODBC API and scalar functions" in the Progress DataDirect for ODBC Drivers Reference for a list of
supported API functions.
Note: Note that Cloudera Impala is not designed for OLTP workloads and does not offer real-time queries or
row-level updates. Instead, Impala is designed for batch type jobs over large data sets with high latency. This
means that queries such as "SELECT * FROM mytable" return quickly. However, other SELECT statements
are much slower.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 921
Chapter 8: The Connect XE Drivers
The DataDirect Connect XE for ODBC and DataDirect Connect64 XE for ODBC Salesforce driver (the Salesforce
driver) supports the standard SQL query language to fetch, insert, update, and delete data from Salesforce.com
and Force.com. The Salesforce Web Service API is fully supported, including any Salesforce App Exchange
application.
Note: You can query the SYSTEM_REMOTE_SESSIONS system table to get the version of the Web Service
API the driver supports.
For the latest support information, visit the Progress DataDirect Supported Configurations page:
https://www.progress.com/supported-configurations/datadirect.
The driver translates the SQL statements provided by the application to Salesforce queries (SOQL) and Web
service calls. See SQL Statements and Extensions for the Salesforce Driver for the SQL statements that the
driver supports.
The driver maps the Salesforce data model into a set of related relational tables. The mapping representation
is stored in XML files external to the driver. This allows the sharing of map files among different client machines.
The driver uses a client-side data cache for improved performance. You can define rules that specify which
data to cache on the client as well as when the cached data becomes invalid and needs to be refreshed (see
Client-Side Caches on page 979 for details).
The Salesforce driver can be used with industry standard tools, which means that developers can leverage
their existing SQL knowledge instead of having to learn the Salesforce query language and APIs. Examples
include the following tools:
Tableau
The driver is supported in the Windows, UNIX, and Linux environments. See Environment-Specific Information
on page 58 for detailed information about the environments supported by this driver.
Refer to the readme file shipped with your DataDirect Connect XE product for the file name of the driver.
922 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
The following figure shows the different components of an environment that uses the Salesforce driver to access
Salesforce. Depending on your license from Salesforce.com, the driver could instead connect to Force.com.
When an application connects to Salesforce through the driver, connectivity to Salesforce is real-time, out of
the box. In the background, the driver establishes a Web service session with the Salesforce instance and a
database session that opens an embedded database. The application can establish multiple sessions with
Salesforce; however, additional Web service and database sessions are always opened in the ratio of one
database session per Web service session. The database session maintains the object-to-relational table
mapping. In addition, it maintains cached tables and local tables, as well as maintaining views. See Database
Configuration File on page 988 for more details.
On Windows, the SQL Engine can be run within the same process space as the ODBC application, or it can
be run as a separate process. Some applications may experience problems loading the JVM required for the
SQL Engine because the process exceeds the available heap space. If your application experiences problems
loading the JVM, you can configure the Salesforce driver to run in a separate 32-bit process within its own
JVM. See Configuring the SQL Engine Server on page 992 for more information.
Salesforce has certain standard objects that always exist, even if they do not contain anything. Salesforce
administrators can also create custom objects using the Salesforce browser interface. The relationships among
these objects are tabular, like those among the tables in a database. The Salesforce driver recognizes the
relationships among both standard Salesforce objects and custom objects and can access, create, and update
both. The relationships among objects can be reported through the ODBC SQLForeignKeys and SQLPrimaryKeys
functions. The driver leverages Salesforce mechanisms for joining data, minimizing the amount of data that
needs to be fetched over the network.
Driver Requirements
The driver requires a Java Virtual Machine (JVM): Java SE 8 or higher.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 923
Chapter 8: The Connect XE Drivers
On Windows, data sources are stored in the Windows Registry. You can configure and modify data sources
through the ODBC Administrator using a driver Setup dialog box, as described in this section.
When the driver is first installed, the values of its connection options are set by default. These values appear
on the driver Setup dialog box tabs when you create a new data source. You can change these default values
by modifying the data source. In the following procedure, the description of each tab is followed by a table that
lists the connection options for that tab and their initial default values. This table links you to a complete
description of the options and their connection string attribute equivalents. The connection string attributes are
used to override the default values of the data source if you want to change these values at connection time.
To configure a Salesforce data source:
1. Start the ODBC Administrator by selecting its icon from the DataDirect Connect program group.
2. Select a tab:
• User DSN: If you are configuring an existing user data source, select the data source name and click
Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the
driver and click Finish to display the driver Setup dialog box.
• System DSN: If you are configuring an existing system data source, select the data source name and
click Configure to display the driver Setup dialog box.
If you are configuring a new system data source, click Add to display a list of installed drivers. Select
the driver and click Finish to display the driver Setup dialog box.
924 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
• File DSN: If you are configuring an existing file data source, select the data source file and click Configure
to display the driver Setup dialog box.
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select
a driver. Click Advanced if you want to specify attributes; otherwise, click Next to proceed. Specify a
name for the data source and click Next. Verify the data source information; then, click Finish to display
the driver Setup dialog box.
Note: : The General tab displays only fields that are required for creating a data source. The fields on all
other tabs are optional, unless noted otherwise.
On this tab, provide values for the options in the following table; then, click Apply. The table provides links
to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 925
Chapter 8: The Connect XE Drivers
3. Optionally, click the SQL Engine tab to specify additonal data source settings.
Figure 96: SQL Engine tab
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
By default, the Salesforce driver operates in direct mode, with both the driver and its SQL engine running
in the ODBC application's address space. Some applications may experience problems loading the JVM
because the process exceeds the available heap space. You can configure the Salesforce driver to operate
in server mode. Server mode allows the driver to connect to a 32-bit SQL engine JVM running as a separate
service.
926 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
To run the driver in server mode, set SQL Engine Mode to 1-Server. Additional configuration settings
appear on the SQL Engine tab. All fields except SQL Engine Mode are read only.
Figure 97: SQL Engine tab: SQL Engine Mode
To define the settings for server mode, click Edit Server Settings from the SQL Engine tab. The SQL
Engine Service Setup dialog box appears.
Note: You must be an administrator to modify the server mode settings. Otherwise, the Edit Server Settings
button does not appear on the SQL Engine tab.
You use the SQL Engine Service Setup dialog box to configure server mode and to start or stop the service.
See Configuring Server Mode on page 992 for detailed information.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 927
Chapter 8: The Connect XE Drivers
4. Optionally, click the Advanced tab to specify additional data source settings.
Figure 98: Advanced tab
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
928 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Extended Options: Type a semi-colon separated list of connection options and their values. Use this
configuration option to set the value of undocumented connection options that are provided by Progress
DataDirect customer support. You can include any valid connection option in the Extended Options string,
for example:
CreateDB=2;UndocumentedOption1=value [;UndocumentedOption2=value;]
If the Extended Options string contains option values that are also set in the setup dialog or data source,
the values of the options specified in the Extended Options string take precedence. However, connection
options that are specified on a connection string override any option value specified in the Extended Options
string.
Translate: Click Translate to display the Select Translator dialog box, which lists the translators specified
in the ODBC Translators section of the Registry. Progress DataDirect provides a translator named OEM to
ANSI that translates your data from the IBM PC character set to the ANSI character set.
Select a translator; then, click OK to close this dialog box.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 929
Chapter 8: The Connect XE Drivers
5. Optionally, click the Security tab to specify security data source settings.
Figure 99: Security tab
See Using Security on page 89 for a general description of authentication and encryption and their
configuration requirements.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
930 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
6. Optionally, click the Web Service tab to specify additional data source settings.
Figure 100: Web Service tab
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 931
Chapter 8: The Connect XE Drivers
7. Optionally, click the Pooling tab to specify connection pooling data source settings.
Figure 101: Pooling tab
See Using DataDirect Connection Pooling on page 97 for a general description of connection pooling.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
932 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
8. Optionally, click the Bulk tab to specify DataDirect Bulk Load data source settings.
Figure 102: Bulk tab
See Using DataDirect Bulk Load on page 101 for a general description of DataDirect Bulk Load.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 933
Chapter 8: The Connect XE Drivers
If your application is already coded to use parameter array batch functionality, you can leverage DataDirect
Bulk Load features through the Enable Bulk Load connection option. Enabling this option automatically
converts the parameter array batch operation to use the database bulk load protocol.
If you are not using parameter array batch functionality, you can export data to a bulk load data file, verify
the metadata of the bulk load configuration file against the structure of the target table, and bulk load data
to a table. Use the following steps to accomplish these tasks.
a) To export data from a table to a bulk load data file, click Export Table from the Bulk tab. The Export
Table dialog box appears.
Figure 103: ODBC Salesforce Export Table Driver Setup dialog box
Both a bulk data file and a bulk configuration file are produced by exporting a table. The configuration
file has the same name as the data file, but with an XML extension. See Using DataDirect Bulk Load on
page 101 for details about these files.
The bulk export operation can create a log file and can also export to external files. See External Overflow
Files on page 108 for more information. The export operation can be configured such that if any errors
or warnings occur:
For example, to export data from the Salesforce ACCOUNT table excluding some of the audit columns,
enter the following SQL in the Table Name field:
(SELECT SYS_NAME, TYPE, BILLINGSTREET, BILLINGCITY, BILLINGSTATE, BILLINGPOSTALCODE,
BILLINGCOUNTRY, SHIPPINGSTREET, SHIPPINGCITY, SHIPPINGSTATE, SHIPPINGPOSTALCODE,
SHIPPINGCOUNTRY, PHONE, FAX, WEBSITE, INDUSTRY, ANNUALREVENUE, NUMBEROFEMPLOYEES,
DESCRIPTION FROM ACCOUNT)
934 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Export Filename: A string that specifies the path (relative or absolute) and file of the bulk load data file
to which the data is to be exported. It also specifies the file name of the bulk configuration file. The file
name must be the fully qualified path to the bulk data file. These files must not already exist; if one of
both of them already exists, an error is returned.
Log Filename: A string that specifies the path (relative or absolute) and file name of the bulk log file.
The log file is created if it does not exist. The file name must be the fully qualified path to the log file.
Events logged to this file are:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 935
Chapter 8: The Connect XE Drivers
Click Export Table to connect to the database and export data to the bulk data file or click Cancel.
b) To bulk load data from the bulk data file to a database table, click Load Table from the Bulk tab. The
Load File dialog box appears.
Figure 104: ODBC Salesforce Load File Driver Setup dialog box
The load operation can create a log file and can also create a discard file that contains rows rejected
during the load. The discard file is in the same format as the bulk load data file. After fixing reported
issues in the discard file, the bulk load can be reissued using the discard file as the bulk load data file.
The export operation can be configured such that if any errors or warnings occur:
Load Data Filename: A string that specifies the path (relative or absolute) and file name of the bulk data
file from which the data is loaded.
936 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Configuration Filename: A string that specifies the path (relative or absolute) and file name of the bulk
configuration file.
Log Filename: A string that specifies the path (relative or absolute) and file name of the bulk log file.
The file name must be the fully qualified path to the log file. Specifying a value for Log Filename creates
the file if it does not already exist. Events logged to this file are:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 937
Chapter 8: The Connect XE Drivers
• If the driver can connect, it releases the connection and displays a Connection Established
message. Click OK.
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message. Click OK.
9. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
DSN=data_source_name[;attribute=value[;attribute=value]...]
FILEDSN=filename.dsn[;attribute=value[;attribute=value]...]
The DSN-less connection string specifies a driver instead of a data source. All connection information must be
entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
Connection Option Descriptions on page 939 lists the long and short names for each attribute, as well as the
initial default value when the driver is first installed. You can specify either long or short names in the connection
string.
An example of a DSN connection string with overriding attribute values for Salesforce for Linux/UNIX/Windows
is:
DSN=Salesforce;[email protected];PWD=XYZZY
938 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
1. In the Host Name field, type the root of the Salesforce URL to which you want to connect. The default is
login.salesforce.com.
2. Type the file name prefix the driver uses to create or locate the set of files that define the embedded database
per connection. See Mapping Objects to Tables on page 978 for an explanation of embedded database.
3. Type your logon ID in the User Name field.
4. Type your password in the Password field.
5. Click OK to complete the logon.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 939
Chapter 8: The Connect XE Drivers
BulkLoadPollInterval (BLPI) 10
BulkLoadTimeout (BLTO) 0
Database The file name prefix the driver uses to create or locate
the set of files that define the embedded database per
connection.
HostName (HOST) Empty string (logs into the default Salesforce instance,
login.salesforce.com.
LoadBalanceTimeout (LBT) 0
LoginTimeout (LT) 15
MinPoolSize (MNPS) 0
940 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
ReadOnly (RO) 0
StmtCallLimit (SCL) 20
WSFetchSize (WSFS) 0
WSRetryCount (WSRC) 0
Attribute
ApplicationUsingThreads (AUT)
Purpose
Determines whether the driver works with applications using multiple ODBC threads.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver works with single-threaded and multi-threaded applications.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 941
Chapter 8: The Connect XE Drivers
If set to 0 (Disabled), the driver does not work with multi-threaded applications. If using the driver with
single-threaded applications, this value avoids additional processing required for ODBC thread-safety standards.
Notes
• This connection option can affect performance.
Default
1 (Enabled)
GUI Tab
Advanced tab
See also
Performance Considerations on page 974
Attribute
BulkLoadAsync (BLA)
Purpose
Determines whether the driver treats bulk load operations as synchronous or asynchronous.
Valid Values
0|1
Behavior
If set to 0 (Disabled), bulk load operations are synchronous. The driver does not return from the function that
invoked an operation until the operation is complete or the BulkLoadTimeout period has expired. If the operation
times out, the driver returns an error.
If set to 1 (Enabled), bulk load operations are asynchronous. The driver returns from the function that invoked
an operation after the operation is submitted to the server. The driver does not verify the completion status of
the bulk load operation.
Default
0 (Disabled)
GUI Tab
Bulk tab
Attribute
BulkLoadBatchSize (BLBS)
942 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Purpose
The number of rows that the driver sends to the database at a time during bulk operations. This value applies
to all methods of bulk loading.
Valid Values
x
where:
Default
1024
GUI Tab
Bulk tab
Attribute
BulkLoadConcurrencyMode (BLCM)
Purpose
Determines whether multiple batches associated with a bulk load operation are processed by Salesforce in
parallel or one at a time. See Using DataDirect Connection Pooling on page 97 for more information.
Valid Values
0|1
Behavior
If set to 0 (Serial), multiple batches associated with a bulk load operation are processed one at a time.
If set to 1 (Parallel), multiple batches associated with a bulk load operation are processed in parallel. The order
in which the batches are processed can vary.
Default
1 (Parallel)
GUI Tab
Bulk tab
Attribute
BulkLoadPollInterval (BLPI)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 943
Chapter 8: The Connect XE Drivers
Purpose
Specifies the number of seconds the driver waits to request bulk operation status. This interval is used by the
driver the first time it requests status and for all subsequent status requests. See Using DataDirect Bulk Load
on page 101 for more information.
Valid Values
x
where:
is a positive integer that represents the number of seconds the driver waits before requesting bulk
operation status.
Default
10
GUI Tab
Bulk tab
Attribute
BulkLoadThreshold (BLTH)
Purpose
Determines when the driver uses bulk load for insert, update, delete, or batch operations. If the Enable Bulk
Load option is set to True and the number of rows affected by an insert, update, delete, or batch operation
exceeds the threshold specified by this option, the driver uses the Salesforce Bulk API to perform the operation.
Valid Values
0|x
where:
Behavior
If set to 0, the driver always uses bulk load to execute insert, update, delete, or batch operations.
If set to x, the driver only uses bulk load if the Enable Bulk Load option is set to a value of True and the number
of rows to be updated by an insert, update, delete, or batch operation exceeds the threshold. If the operation
times out, the driver returns an error.
Notes
• If the Enable Bulk Load option is set to false, this option is ignored.
944 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Default
4000
GUI Tab
Bulk tab
Attribute
BulkLoadTimeout (BLTO)
Purpose
The time, in seconds, that the driver waits for a Salesforce bulk job to complete. A value of zero means there
is no timeout.
Valid Values
x
where:
is a positive integer that represents a number of seconds the driver waits before requesting bulk
operation status.
Default
0
GUI Tab
Bulk tab
Config Options
Attribute
ConfigOptions (CFGO)
Purpose
Determines how the embedded database and the mapping of the remote data model to the relational data
model is configured, customized, and updated.
Notes
• This option is primarily used for initial configuration of the driver for a particular user. It is not intended for
use with every connection. By default, the driver configures itself and this option is normally not needed. If
Config Options is specified on a connection after the initial configuration, the values specified for Config
Options must match the values specified for the initial configuration. The preferred method for setting the
configuration options for a particular user is through the database configuration file. See Database
Configuration File on page 988 for details.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 945
Chapter 8: The Connect XE Drivers
Valid Values
{ key = value [; key = value ]}
where:
key
The value is a set of key value pairs separated by a semicolon (;). The value must be enclosed in curly brackets.
For example:
{AuditColumns=AuditOnly;UppercaseIdentifiers=false}
AuditColumns: Determines whether the driver includes audit fields, which Salesforce adds to all objects
defined in a Salesforce instance, as table columns when it defines the remote data model to relational table
mapping.
The audit columns added by Salesforce are:
IsDeleted
CreatedById
CreatedDate
LastModifiedById
LastModifiedDate
SystemModstamp
Valid values for AuditColumns are:
Value Description
All The driver includes the all of the audit columns and the master record id column in its
table definitions.
AuditOnly The driver adds only the audit columns in its table definitions.
MasterOnly The driver adds only the MasterRecordId column in its table definitions.
None The driver does not add the audit columns or the MasterRecordId column in its table
definitions.
946 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Value Description
Value Description
Value Description
0 The driver does not change the names of the Salesforce system columns.
1 The driver changes the names of the Salesforce system columns as described in the
following table:
Field Name Mapped Name
Id ROWID
Name SYS_NAME
IsDeleted SYS_ISDELETED
CreatedDate SYS_CREATEDDATE
CreatedById SYS_CREATEDBYID
LastModifiedDate SYS_LASTMODIFIEDDATE
LastModifiedId SYS_LASTMODIFIEDID
SystemModstamp SYS_SYSTEMMODSTAMP
LastActivityDate SYS_LASTACTIVITYDATE
OwnerId SYS_OWNERID
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 947
Chapter 8: The Connect XE Drivers
NumberFieldMapping: Determines how the driver maps fields defined as NUMBER in Salesforce. The
Salesforce API uses DOUBLE values to transfer data to and from NUMBER fields, which can cause problems
when the precision of the NUMBER field is greater than the precision of a DOUBLE value. Rounding can occur
when converting large values to and from DOUBLE. The NumberFieldMapping option allows you to map the
NUMBER fields to the required SQL types based on their precision.
Valid values for NumberFieldMapping are:
Value Description
1 The driver maps NUMBER fields with a precision of 9 or less and a scale of 0 to
the INTEGER SQL type and maps all other NUMBER fields to the DOUBLE SQL
type.
2 The driver maps all NUMBER fields to the DOUBLE SQL type regardless of their
precision.
3 The driver maps all NUMBER fields to the DECIMAL SQL type. It can be used
when the precision of the NUMBER field is greater than the precision of a DOUBLE
value.
Note: Do not change the value of UppercaseIdentifiers unless the data source you are connecting to has
objects with names that differ only by case.
Value Description
false The driver maps identifiers to the mixed case name of the object being mapped. If mixed
case identifiers are used, SQL statements must enclose those identifiers in double quotes,
and the case of the identifier, must exactly match the case of the identifier name. For
example, if UppercaseIdentifiers=false, to query the Account table you specify:
SELECT "Phone", "Website" FROM "Account"
Default
AuditColumns=None;CustomSuffix=strip;KeywordConflictSuffix=;
MapSystemColumnNames=1;NumberFieldMapping=1;UppercaseIdentifiers=true;
GUI Tab
Advanced tab
948 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Connection Pooling
Attribute
Pooling (POOL)
Purpose
Specifies whether to use the driver’s connection pooling.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses connection pooling.
If set to 0 (Disabled), the driver does not use connection pooling.
Notes
• The application must be thread-enabled to use connection pooling.
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Pooling tab
See also
Performance Considerations on page 974
Connection Reset
Attribute
ConnectionReset (CR)
Purpose
Determines whether the state of connections that are removed from the connection pool for reuse by the
application is reset to the initial configuration of the connection.
Valid Values
0|1
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 949
Chapter 8: The Connect XE Drivers
Behavior
If set to 1 (Enabled), the state of connections removed from the connection pool for reuse by an application is
reset to the initial configuration of the connection. Resetting the state can negatively impact performance
because additional commands must be sent over the network to the server to reset the state of the connection.
If set to 0 (Disabled), the state of connections is not reset.
Notes
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Pooling tab
See also
This connection option can affect performance. See Performance Considerations on page 974 for details.
Create Database
Attribute
CreateDB (CDB)
Purpose
Determines whether the driver creates a new embedded database when establishing the connection.
Valid Values
0|1|2
Behavior
If set to 0 (No), the driver uses the current embedded database specified by DatabaseName. If one does not
exist, the connection fails.
If set to 1 (ForceNew), the driver deletes the current embedded database specified by Database and creates
a new one at the same location.
Warning: This causes all views, data caches, and map customizations defined in the current database to be
lost.
If set to 2 (NotExist), the driver uses the current embedded database specified by DatabaseName. If one does
not exist, the driver creates one.
Default
2 (NotExist)
950 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
GUI Tab
Advanced tab
Attribute
DataSourceName (DSN)
Purpose
Specifies the name of a data source in your Windows Registry or odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Database
Attribute
Database (DBN)
Purpose
Specifies the file name prefix the driver uses to create or locate the set of files that define the Object mapping
and the embedded database used by the connection. See Mapping Objects to Tables on page 978 for an
explanation of embedded database.
Valid Values
prefix | path+prefix
where:
prefix
is the file name prefix for the embedded database. For example, if Database is set to a value of
JohnQPublic, the embedded database files that are created or loaded have the form
johnqpublic.xxx.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 951
Chapter 8: The Connect XE Drivers
path+prefix
is a relative or absolute path appended to the file name prefix. The path defines the directory the
driver uses to store the newly created database files or locate the existing database files. For example,
if Database is set to a value of C:\data\db\johnqpublic, the driver either creates or looks for
the database johnqpublic.xxx in the directory C:\data\db. If you do not specify a path, the current
working directory is used.
Notes
• The driver parses the User ID value and removes all non-alphanumeric characters. For example, if User
ID is specified as John.Q.Public, the value used for Database is JohnQPublic.
• When SQL Engine Mode is set to Server, the path+prefix value overrides the value specified by the
Server DB Directory configuration setting (see Configuring Server Mode on page 992).
Default
The user ID specified for the connection.
GUI Tab
General tab
Description
Attribute
Description (n/a)
Purpose
Specifies an optional long description of a data source. This description is not used as a runtime connection
attribute, but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
952 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Attribute
EnableBulkLoad (EBL)
Purpose
Specifies whether the driver can use the bulk load protocol for insert, update, delete, and batch operations.
Bulk load can reduce the number of Web service calls used to execute a statement when compared to statements
that are executed individually and may improve performance. Whether the driver actually uses bulk load is
determined by the BulkLoadThreshold (BLTH) connection option.
Valid Values
True | False
Behavior
If set to True, the driver can use the bulk load protocol for insert, update, delete, and batch operations.
If set to False, the driver cannot use the bulk load protocol for insert, update, delete, and batch operations.
Default
False
GUI Tab
Bulk tab
Fetch Size
Attribute
FetchSize (FS)
Purpose
Specifies the number of rows that the driver processes before returning data to the application. Smaller fetch
sizes can improve the initial response time of the query. Larger fetch sizes improve overall fetch times at the
cost of additional memory.
FetchSize is related to, but different than, WSFetchSize. WSFetchSize specifies the number of rows of raw
data that the driver fetches from the remote data source, while FetchSize specifies how many of these raw
data rows the driver processes before returning data to the application. Processing the data includes converting
from the remote data source data type to the driver SQL data type used by the application. If FetchSize is
greater than WSFetchSize, the driver makes multiple round trips to the data source to get the requested number
of rows before returning control to the application.
Valid Values
0|x
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 953
Chapter 8: The Connect XE Drivers
is a positive integer.
Behavior
If set to 0, the driver fetches and processes all of the rows of the result before returning control to the application.
If set to x, the driver fetches and processes the specified number of rows before returning data to the application.
Default
100
GUI Tab
Advanced tab
Field Delimiter
Attribute
BulkLoadFieldDelimiter (BLFD)
Purpose
Specifies the character that the driver will use to delimit the field entries in a bulk load data file.
Valid Values
x
where:
For simplicity, avoid using a value that can be in the data, including all alphanumeric characters, the dash(-),
the colon(:), the period (.), the forward slash (/), the space character, the single quote (') and the double quote
("). You can use some of these characters as delimiters if all of the data in the file is contained within double
quotes.
Notes
• The Bulk Load Field Delimiter character must be different from the Bulk Load Record Delimiter.
Default
None
GUI Tab
Bulk tab
954 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Host Name
Attribute
HostName (HOST)
Purpose
The base Salesforce URL to use for logging in. If you are logging into a Salesforce instance other than the
default, you must provide the root of the Salesforce URL.
Valid Values
url
where:
url
is the is the root of the Salesforce URL to which you want to connect.
Example
Suppose you have a Salesforce instance that is configured with a production instance and a sandbox instance.
You can specify login.salesforce.com as the value for the HostName attribute to connect to the production
instance or test.salesforce.com to connect to the sandbox instance:
Production login.salesforce.com
Sandbox test.salesforce.com
Default
login.salesforce.com
GUI Tab
General tab
Initialization String
Attribute
InitializationString (IS)
Purpose
One or multiple SQL commands to be executed by the driver after it has established the connection to the
database and has performed all initialization for the connection. If the execution of a SQL command fails, the
connection attempt also fails and the driver returns an error indicating which SQL command or commands
failed.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 955
Chapter 8: The Connect XE Drivers
Valid Values
string
where:
string
Multiple commands must be separated by semicolons. In addition, if this option is specified in a connection
URL, the entire value must be enclosed in parentheses when multiple commands are specified.
Example
Because fetching metadata and generating mapping files can significantly increase the time it takes to connect
to Salesforce, the driver caches this information on the client the first time the driver connects on behalf of each
user. The cached metadata is used in subsequent connections made by the user instead of re-fetching the
metadata from Salesforce. To force the driver to re-fetch the metadata information for a connection, use the
InitializationString property to pass the REFRESH SCHEMA SFORCE command in the connection URL. For
example:
DSN=Salesforce;UID={[email protected]};PWD=secret;InitializationString=(REFRESH SCHEMA
SFORCE)
Default
None
GUI Tab
Advanced tab
JVM Arguments
Attribute
JVMArgs (JVMA)
Purpose
A string that contains the arguments that are passed to the JVM that the driver is starting. The location of the
JVM must be specified on the driver library path. For information on setting the location of the JVM in your
environment, see:
• Setting the Library Path Environment Variable (Salesforce Driver on Windows) on page 34
• Setting the Library Path Environment Variable (Salesforce Driver on UNIX/Linux) on page 42.
When specifying the heap size for the JVM, note that the JVM tries to allocate the heap memory as a single
contiguous range of addresses in the application’s memory address space. If the application's address space
is fragmented so that there is no contiguous range of addresses big enough for the amount of memory specified
for the JVM, the driver fails to load, because the JVM cannot allocate its heap. This situation is typically
encountered only with 32-bit applications, which have a much smaller application address space. If you encounter
problems with loading the driver in an application, try reducing the amount of memory requested for the JVM
heap. If possible, switch to a 64-bit version of the application.
956 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Valid Values
string
where:
string
contains arguments that are defined by the JVM. Values that include special characters or spaces
must be enclosed in curly braces { } when used in a connection string.
Example
To set the heap size used by the JVM to 256 MB and the http proxy information, specify:
{-Xmx256m -Dhttp.proxyHost=johndoe -Dhttp.proxyPort=808}
To set the heap size to 256 MB and configure the JVM for remote debugging, specify:
{-Xmx256m
-Xrunjdwp:transport=dt_socket, address=9003,server=y,suspend=n -Xdebug}
Default
-Xmx256m
GUI Tab
SQL Engine tab
JVM Classpath
Attribute
JVMClasspath (JVMC)
Purpose
Specifies the CLASSPATH for the Java Virtual Machine (JVM) used by the driver. The CLASSPATH is the
search string the JVM uses to locate the Java jar files the driver needs.
Valid Values
string
where:
string
specifies the CLASSPATH. Separate multiple jar files by a semi-colon on Windows platforms and
by a colon on Linux and UNIX platforms. CLASSPATH values with multiple jar files must be enclosed
in curly braces { } when used in a connection string.
Example
On Windows:
{.;c:\install_dir\java\lib\
}
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 957
Chapter 8: The Connect XE Drivers
On UNIX:
{.:/home/user1/install_dir/java/lib/sforce.jar}
Default
install_dir\java\lib\sforce.jar
GUI Tab
SQL Engine tab
LoadBalance Timeout
Attribute
LoadBalanceTimeout (LBT)
Purpose
Specifies the number of seconds to keep inactive connections open in a connection pool. An inactive connection
is a database session that is not associated with an ODBC connection handle, that is, a connection in the pool
that is not in use by an application.
Valid Values
0|x
where:
Behavior
If set to 0, inactive connections are kept open.
If set to x, inactive connections are closed after the specified number of seconds passes.
Notes
• The Min Pool Size option may cause some connections to ignore this value.
• This connection option can affect performance.
Default
0
GUI Tab
Pooling tab
See also
Performance Considerations on page 974
958 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Attribute
LogConfigFile (LCF)
Purpose
Specifies the filename of the configuration file used to initialize the driver logging mechanism.
If the driver cannot locate the specified file when establishing the connection, the connection fails and the driver
returns an error.
Valid Values
string
where:
string
is the relative or fully qualified path of the configuration file used to initialize the driver logging
mechanism. If the specified file does not exist, the driver continues searching for an appropriate
configuration file.
Default
Empty string
GUI Tab
Advanced tab
Logon Domain
Attribute
LogonDomain (LD)
Purpose
Specifies the domain part of the Salesforce user id. If Logon Domain is not an empty string, the driver first
appends the @ character to the end of the User Name value and then appends the value of Logon Domain.
Valid Values
string
where:
string
Default
Empty string
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 959
Chapter 8: The Connect XE Drivers
GUI Tab
Security tab
Login Timeout
Attribute
LoginTimeout (LT)
Purpose
The number of seconds the driver waits for a connection to be established before returning control to the
application and generating a timeout error. To override the value that is set by this connection option for an
individual connection, set a different value in the SQL_ATTR_LOGIN_TIMEOUT connection attribute using
the SQLSetConnectAttr() function.
Valid Values
0|x
where:
Behavior
If set to 0, the connection request does not time out, but the driver responds to the SQL_ATTR_LOGIN_TIMEOUT
attribute.
If set to x, the connection request times out after the specified number of seconds unless the application
overrides this setting with the SQL_ATTR_LOGIN_TIMEOUT attribute.
Default
15
GUI Tab
Advanced tab
Attribute
MaxPoolSize (MXPS)
Purpose
The maximum number of connections allowed within a single connection pool. When the maximum number of
connections is reached, no additional connections can be created in the connection pool.
Valid Values
An integer from 1 to 65535
960 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
For example, if set to 20, the maximum number of connections allowed in the pool is 20.
Notes
This connection option can affect performance.
Default
100
GUI Tab
Pooling tab
See also
Performance Considerations on page 974
Attribute
MinPoolSize (MNPS)
Purpose
Specifies the minimum number of connections that are opened and placed in a connection pool, in addition to
the active connection, when the pool is created. The connection pool retains this number of connections, even
when some connections exceed their Load Balance Timeout value.
Valid Values
0|x
where:
For example, if set to 5, the start-up number of connections in the pool is 5 in addition to the current existing
connection.
Behavior
If set to 0, no connections are opened in addition to the current existing connection.
Notes
• This connection option can affect performance.
Default
0
GUI Tab
Pooling tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 961
Chapter 8: The Connect XE Drivers
See Also
See Performance Considerations on page 974 for details.
Password
Attribute
Password (PWD)
Purpose
Specifies the password to use to connect to your Salesforce instance. A password is required. Contact your
system administrator to obtain your password.
Important: Setting the password using a data source is not recommended. The data source persists all options,
including the Password option, in clear text.
Valid Values
password | password+securitytoken
where:
password
password+securitytoken
is a valid password appended by the security token required to connect to the Salesforce instance,
for example, secretXaBARTsLZReM4Px47qPLOS, where secret is the password and the remainder
of the value is the security token. Both the password and security token are case-sensitive.
Optionally, you can specify the security token in the Security Token option. Do not specify the security token
in both options.
Default
None
GUI Tab
Pooling tab
See also
Security Token on page 968
Proxy Host
Attribute
ProxyHost (PXHN)
962 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Purpose
Specifies the Hostname and possibly the Domain of the Proxy Server. The value specified can be a host name,
a fully qualified domain name, or an IPv4 or IPv6 address.
Valid Values
server_name | IP_address
where:
server_name
is the name of the server or a fully qualified domain name to which you want to connect.
The IP address can be specified in either IPv4 or IPv6 format, or a combination of the two. See Using
IP Addresses on page 67 for details about these formats.
Default
Empty string
GUI Tab
SQL Engine tab
Proxy Password
Attribute
ProxyPassword (PXPW)
Purpose
Specifies the password needed to connect to the Proxy Server.
Valid Values
String
where:
String
specifies the password to use to connect to the Proxy Server. Contact your system administrator to
obtain your password.
Default
Empty string
GUI Tab
SQL Engine tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 963
Chapter 8: The Connect XE Drivers
Proxy Port
Attribute
ProxyPort (PXPT)
Purpose
Specifies the port number where the Proxy Server is listening for HTTP and/or HTTPS requests.
Valid Values
port_name
where:
port_name
is the port number of the server listener. Check with your system administrator for the correct number.
Default
0
GUI Tab
SQL Engine tab
Proxy User
Attribute
ProxyUser
Purpose
Specifies the user name needed to connect to the Proxy Server.
Valid Values
The default user ID that is used to connect to the Proxy Server.
Default
Empty string
GUI Tab
SQL Engine tab
Read Only
Attribute
ReadOnly (RO)
964 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Purpose
Specifies whether the connection has read-only access to the data source.
Valid Values
0|1
Behavior
If set to 1, the connection has read-only access. The following commands are the only commands that you
can use when a connection if read-only:
• Call (if the procedure does not update data)
• Explain Plan
• Select (except Select Into)
• Set Schema
The driver returns an error if any other command is executed.
If set to 0, the connection is opened for read/write access, and you can use all commands supported by the
product.
Default
0
GUI Tab
Advanced tab
Record Delimiter
Attribute
BulkLoadRecordDelimiter (BLRD)
Purpose
Specifies the character that the driver will use to delimit the record entries in a bulk load data file.
Valid Values
x
where:
For simplicity, avoid using a value that can be in the data, including all alphanumeric characters, the dash(-),
the colon(:), the period (.), the forward slash (/), the space character, the single quote (') and the double quote
("). You can use some of these characters as delimiters if all of the data in the file is contained within double
quotes.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 965
Chapter 8: The Connect XE Drivers
Notes
• The Bulk Load Record Delimiter character must be different from the Bulk Load Field Delimiter.
Default
None
GUI Tab
Bulk tab
Attribute
RefreshDirtyCache (RDC)
Purpose
Specifies whether the driver refreshes a dirty cache on the next fetch operation from the cache. A cache is
marked as dirty when a row is inserted into or deleted from a cached table or a row in the cached table is
updated.
Valid Values
1|0
Behavior
If set to 1 (Enabled), a dirty cache is refreshed when the cache is referenced in a fetch operation. The cache
state is set to initialized if the refresh succeeds.
If set to 0 (Disabled), a dirty cache is not refreshed when the cache is referenced in a fetch operation.
Default
1 (Enabled)
See also
Refreshing Cache Data on page 980
GUI Tab
Advanced tab
Refresh Schema
Attribute
RefreshSchema (RS)
966 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Purpose
Determines whether the driver automatically refreshes the information in a remote schema (rebuilds the database
map for the schema) the first time a user connects to the specified embedded database. The database is
opened when the user first makes a connection with the application. When all connections associated with that
user are closed, then the driver closes the database. The database must be reopened before it can be used
again.
Valid Values
1|0
Behavior
If set to 1 (Enabled), the driver automatically refreshes the schema the first time a user connects to the specified
database. Any schema objects that have changed since the last time the database map was rebuilt are reflected
in the metadata. See Database Configuration File for information about embedded databases and map files.
If set to 0 (Disabled), the driver does not automatically refresh the schema the first time a user connects to
the specified database.
Notes
This connection option is functionally equivalent to executing the Refresh Schema statement (see Refresh
Schema (EXT)). You can refresh a schema manually at any time by using the Refresh Schema statement.
Default
0 (Disabled)
GUI Tab
Advanced tab
Attribute
ReportCodepageConversionErrors (RCCE)
Purpose
Specifies how the driver handles code page conversion errors that occur when a character cannot be converted
from one character set to another.
An error message or warning can occur if an ODBC call causes a conversion error, or if an error occurs during
code page conversions to and from the database or to and from the application. The error or warning generated
is Code page conversion error encountered. In the case of parameter data conversion errors, the
driver adds the following sentence: Error in parameter x, where x is the parameter number. The standard
rules for returning specific row and column errors for bulk operations apply.
Valid Values
0|1|2
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 967
Chapter 8: The Connect XE Drivers
Behavior
If set to 0 (Ignore Errors), the driver substitutes 0x1A for each character that cannot be converted and does
not return a warning or error.
If set to 1 (Return Error), the driver returns an error instead of substituting 0x1A for unconverted characters.
If set to 2 (Return Warning), the driver substitutes 0x1A for each character that cannot be converted and returns
a warning.
Default
0 (Ignore Errors)
GUI Tab
Advanced tab
Security Token
Attribute
SecurityToken (STK)
Purpose
Specifies the security token required to make a connection to a Salesforce instance that is configured for a
security token. If a security token is required and you do not supply one, the driver returns an error indicating
that an invalid user or password was supplied. Contact your Salesforce administrator to find out if a security
token is required.
Valid Values
string
where:
string
Optionally, you can specify the security token in the Password option by appending the security token to the
password, for example, secretXaBARTsLZReM4Px47qPLOS, where secret is the password and the remainder
of the value is the security token. Do not specify the security token in both options.
Notes
• When setting the security token using a data source on Windows, the Security Token option is encrypted.
Default
Empty string
GUI Tab
Security tab
968 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Attribute
ServerPortNumber (SPN)
Purpose
Specifies a valid port on which the SQL engine listens for requests from the driver.
Valid Values
port_name
where:
port_name
is the port number of the server listener. Check with your system administrator for the correct number.
Notes
• This option is ignored unless SQL Engine Mode is set to 1 (Server).
Default
19928
GUI Tab
SQL Engine tab
Attribute
SQLEngineMode (SEM)
Purpose
Specifies whether the driver’s SQL engine runs in the same 32-bit process as the driver (direct mode) or runs
in a process that is separate from the driver (server mode). You must be an administrator to modify the server
mode configuration values, and to start or stop the SQL engine service.
Valid Values
0 | 1
Behavior
If set to 0 (Direct), the SQL engine runs in direct mode. The driver and its SQL engine run in a single process
within the same JVM.
If set to 1 (Server), the SQL engine runs in server mode. The SQL engine operates in a separate process from
the driver within its own JVM. You must start the SQL Engine service before using the driver (see Starting the
SQL Engine Server on page 994 for more information). Multiple drivers on different clients can use the same
service.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 969
Chapter 8: The Connect XE Drivers
Important: Changes you make to the server mode configuration affect all DSNs sharing the service.
Default
0 - Direct
GUI Tab
SQL Engine tab
Attribute
StmtCallLimit (SCL)
Purpose
Specifies the maximum number of Web service calls the driver can make when executing any single SQL
statement or metadata query.
Valid Values
0 | x
where:
is a positive integer that defines the maximum number of Web service calls the driver can make
when executing any single SQL statement or metadata query.
Behavior
If set to 0, there is no limit.
If set to x, the driver uses this value to set the maximum number of Web service calls on a single connection
that can be made when executing a SQL statement. This limit can be overridden by changing the
STMT_CALL_LIMIT session attribute using the ALTER SESSION statement. For example, the following
statement sets the statement call limit to 10 Web service calls:
ALTER SESSION SET STMT_CALL_LIMIT=10
If the Web service call limit is exceeded, the behavior of the driver depends on the value specified for the Stmt
Call Limit Behavior option.
Default
20
GUI Tab
Web Service tab
970 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Attribute
StmtCallLimitBehavior (SCLB)
Purpose
Specifies the behavior of the driver when the maximum Web service call limit specified by the Statement Call
Limit option is exceeded.
Valid Values
1 |2
Behavior
If set to 1(ErrorAlways), the driver returns an error if the maximum Web service call limit is exceed.
If set to 2 (ReturnResults), the driver returns any partial results it received prior to the call limit being
exceeded. The driver generates a warning that not all of the results were fetched.
Default
1 (ErrorAlways)
GUI Tab
Web Service tab
Transaction Mode
Attribute
TransactionMode (TM)
Purpose
Specifies how the driver handles manual transactions.
Valid Values
0 | 1
Behavior
If set to 1 - Ignore, the data source does not support transactions and the driver always operates in
auto-commit mode. Calls to set the driver to manual commit mode and to commit transactions are ignored.
Calls to rollback a transaction cause the driver to return an error indicating that no transaction is started.
Metadata indicates that the driver supports transactions and the ReadUncommitted transaction isolation level.
If set to 0 - No Transactions, the data source and the driver do not support transactions. Metadata indicates
that the driver does not support transactions.
Default
0 (No Transactions)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 971
Chapter 8: The Connect XE Drivers
GUI Tab
Advanced tab
User Name
Attribute
LogonID (UID)
Purpose
The default user ID that is used to connect to your database. Your ODBC application may override this value
or you may override it in the logon dialog box or connection string.
Valid Values
userid
where:
userid
Default
None
GUI Tab
Security tab
See also
Logon Domain on page 959
WSFetchSize
Attribute
WSFetchSize (WSFS)
Purpose
Specifies the number of rows of data the driver attempts to fetch for each ODBC call.
Valid Values
0 | x
where:
972 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Behavior
If set to 0, the driver attempts to fetch up to a maximum of 2000 rows. This value typically provides the maximum
throughput.
If set to x, the driver attempts to fetch up to a maximum of the specified number of rows. Setting the value
lower than 2000 can reduce the response time for returning the initial data. Consider using a smaller WSFetch
Size for interactive applications only.
Default
0 (up to a maximum of 2000 rows)
GUI Tab
Web Service tab
See also
Fetch Size on page 953
WSTimeout on page 974
WSRetry Count
Attribute
WSRetryCount (WSRC)
Purpose
The number of times the driver retries a timed-out Select request. Insert, Update, and Delete requests are
never retried. The timeout period is specified by the WSTimeout (WST) connection option.
Valid Values
0|x
where:
is a positive integer.
Behavior
If set to 0, the driver does not retry timed-out requests after the initial unsuccessful attempt.
If set to x, the driver retries the timed-out request the specified number of times.
Default
3
GUI Tab
Web Service tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 973
Chapter 8: The Connect XE Drivers
See also
WSTimeout on page 974
WSTimeout
Attribute
WSTimeout (WST)
Purpose
Specifies the time, in seconds, that the driver waits for a response to a Web service request.
Valid Values
0 | x
where:
is a positive integer that defines the number of seconds the driver waits for a response to a Web
service request.
Behavior
If set to 0, the driver waits indefinitely for a response; there is no timeout.
If set to x, the driver uses the value as the default timeout for any statement created by the connection.
If a Select request times out and WSRetryCount (WSRC) is set to retry timed-out requests, the driver retries
the request the specified number of times.
Default
120 (seconds)
GUI Tab
Web Service tab
See also
WSRetry Count on page 973
Performance Considerations
Application Using Threads (ApplicationUsingThreads): The driver coordinates concurrent database
operations (operations from different threads) by acquiring locks. Although locking prevents errors in the driver,
it also decreases performance. If your application does not make ODBC calls from different threads, the driver
has no reason to coordinate operations. In this case, the ApplicationUsingThreads attribute should be disabled
(set to 0).
Note: If you are using a multi-threaded application, you must enable the Application Using Threads option.
974 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Connection Pooling (Pooling): If you enable the driver to use connection pooling, you can set additional
options that affect performance:
• Load Balance Timeout (LoadBalanceTimeout): You can define how long to keep connections in the pool.
The time that a connection was last used is compared to the current time and, if the timespan exceeds the
value of the Load Balance Timeout option, the connection is destroyed. The Min Pool Size option can cause
some connections to ignore this value.
• Connection Reset (ConnectionReset ): Resetting a re-used connection to the initial configuration settings
impacts performance negatively because the connection must issue additional commands to the server.
• Max Pool Size (MaxPoolSize): Setting the maximum number of connections that the pool can contain too
low might cause delays while waiting for a connection to become available. Setting the number too high
wastes resources.
• Min Pool Size (MinPoolSize ): A connection pool is created when the first connection with a unique
connection string connects to the database. The pool is populated with connections up to the minimum pool
size, if one has been specified. The connection pool retains this number of connections, even when some
connections exceed their Load Balance Timeout value.
Enable Bulk Load (EnableBulkLoad): For batch inserts and individual inserts, updates, and deletes, the driver
can use the Salesforce Bulk API instead of the Web service API. Using the Bulk API significantly reduces the
number of Web service calls the driver uses to transfer data to Salesforce and may improve performance.
Fetch Size/WS Fetch Size (FetchSize/WSFetchSize ): The connection options Fetch Size and WSFetch Size
can be used to adjust the trade-off between throughput and response time. In general, setting larger values
for WSFetch Size and Fetch Size will improve throughput, but can reduce response time.
For example, if an application attempts to fetch 100,000 rows from the remote data source and WSFetch Size
is set to 500, the driver must make 200 Web service calls to get the 100,000 rows. If, however, WSFetch Size
is set to 2000 (the maximum), the driver only needs to make 50 Web service calls to retrieve 100,000 rows.
Web service calls are expensive, so generally, minimizing Web service calls increases throughput. In addition,
many Cloud data sources impose limits on the number of Web service calls that can be made in a given period
of time. Minimizing the number of Web service calls used to fetch data also can help prevent exceeding the
data source call limits.
For many applications, throughput is the primary performance measure, but for interactive applications, such
as Web applications, response time (how fast the first set of data is returned) is more important than throughput.
For example, suppose that you have a Web application that displays data 50 rows to a page and that, on
average, you view three or four pages. Response time can be improved by setting Fetch Size to 50 (the number
of rows displayed on a page) and WSFetch Size to 200. With these settings, the driver fetches all of the rows
from the remote data source that you would typically view in a single Web service call and only processes the
rows needed to display the first page.
Data Types
The following table lists the data types supported by the Salesforce driver for local tables, how the Salesforce
data types exposed by the Salesforce Web Service API map to them, and how the Salesforce Web Service
API data types map to the ODBC data types.
Salesforce Data Type Web Service API Data Type ODBC Data Type
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 975
Chapter 8: The Connect XE Drivers
Salesforce Data Type Web Service API Data Type ODBC Data Type
ID id SQL_WVARCHAR
976 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
The following table lists the data types supported by the Salesforce driver for remote tables, how the Salesforce
data types exposed by the Salesforce Web Service API map to them, and how the Salesforce Web Service
API data types map to the ODBC data types.
Salesforce Data Type Web Service API Data Type ODBC Data Type
ID id SQL_WVARCHAR
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 977
Chapter 8: The Connect XE Drivers
Salesforce Data Type Web Service API Data Type ODBC Data Type
• CreatedById
• CreatedByDate
• LastModifiedId
• LastModifiedDate
• SystemModestamp
• MasterRecordId
When mapping custom objects and fields, the Salesforce driver strips the standard "__c" suffix from the names
of the custom objects and fields by default. You can set the CustomSuffix key of the Config Options on page
945 connection option to prevent the driver from stripping the "__c" suffix. When mapping Salesforce system
fields to columns in a table, the driver changes the column name to make it evident that the column is a system
column. If you do not want the driver to change the names of system columns, set the MapSystemColumnNames
key of the Config Options connection option to 0.
The Create Database on page 950 (CDB) connection option allows you to update or re-create the embedded
database that defines and handles the object-to-table mapping.
978 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Client-Side Caches
The Salesforce driver can implement a client-side data cache for improved performance. Data is cached from
the remote data source to the local machine on which the driver is located.
The driver caches data on a per-table basis, as opposed to caching the result of a particular query. Caching
data on a table level allows the caches to be queried, filtered, and sorted in other queries. Once a cache is
created, its use is transparent to the application. For example, if a cache is created on the Account table, then
all subsequent queries that reference Account access the Account cache. Disabling or dropping the cache
allows references to the Account table to access the remote data again. Because the use of the cache is
transparent, no changes to the application are required to take advantage of the cache.
You must specifically create a cache before it can be populated; caches are not created automatically. After
you have created a cache on a table, the cache will be populated as a result of the next operation on the table.
For example, after creating a cache on Account, data is returned from the Salesforce data source and stored
locally in the cache when you first execute the following statement:
SELECT ROWID, SYS_NAME FROM Account
Any subsequent queries against the Account table return data from the cache, which reduces response time.
SQL queries can access both cached data and remote data (data stored in Salesforce that has not been
assigned to a cache) in the same statement.
The caches maintained by the Salesforce driver are write-through caches. This means that, for any operation
that modifies data in a table that is cached, the driver performs the operation on the remote data first and then
updates the cache as much as possible.
To create, modify, refresh, or delete client-side data caches, use the following SQL statement extensions:
• Create Cache
• Alter Cache
• Refresh Cache
• Drop Cache
See the following sections for overviews of each extension. See SQL Statements and Extensions for the
Salesforce Driver for descriptions of the syntax of these extensions.
Creating a Cache
You create a cache using the Create Cache statement (see Create Cache (EXT)). A cache can be created on
a single table or on a set of related tables. When creating a cache on a single table, you specify the name of
the table to cache and can optionally specify a filter for the table. The filter determines whether the cache holds
all of the data in the remote table or a subset of the data that matches the filter. You can also specify attributes
for the Create Cache statement that determine:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 979
Chapter 8: The Connect XE Drivers
Creating a cache for a set of related tables is similar to creating a cache on a single table except that a primary
table and one or more referencing tables are specified. This is useful if you want to cache a subset of data for
a table and also cache data related to that subset of data. For example, you might have three tables, Account,
Contact, and Opportunity, where both a contact and an opportunity belong to a particular account. Using a
relational cache, you could specify that accounts that have had activity in the past year be cached, as well as
caching the opportunities and contacts for only those cached accounts.
Warning: Changing the attributes of a cache may cause the current data in the cache to be discarded and
refetched from the remote data source.
980 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Update operations to a table that is cached can trigger the driver to refresh the cache automatically. The caches
maintained by the Salesforce driver are write-through caches. For any operation that modifies data in a table
that is cached, the driver performs the operation on the remote data first and then updates the cache as much
as possible. The driver may not be able to update the cache with all of the modifications because some of the
modified data may have been generated by the remote data source. For example, if a row is inserted but a
value for all columns in the row is not required, any default values generated by the remote data source for
columns not specified in the Insert statement would not be set in the cache. Because the driver cannot reflect
all of the changes made when a cached table is modified, it sets the cache state to dirty. When a cache state
is dirty, the next query that attempts to fetch data from that cache causes the driver to refresh the cache before
the fetch operation is performed. This allows the fetch to see the values populated by the remote data source.
Automatically refreshing a dirty cache is not always desirable. For example, if an application alternates fetches
and inserts on a table, and the insert does not depend on any remote data source generated values, then the
refresh between fetches is unnecessary. The RefreshDirtyCache (RDC) connection option (see Connection
Option Descriptions on page 939) controls whether the driver automatically refreshes a cache with a dirty state.
The state of a cache can be viewed by selecting the STATUS column of the SYSTEM_CACHES catalog table.
See SYSTEM_CACHES Catalog Table on page 982 for more information.
Dropping a Cache
You can drop an existing cache using the Drop Cache statement (see Drop Cache (EXT)). If a cache is a
relational cache, the Drop Cache statement drops the cache for the primary table as well as the caches for the
related tables.
Note: When a cache is dropped, all of the data in that cache is discarded.
Cache MetaData
The Salesforce driver maintains information about the caches that have been created. The driver provides two
system tables to expose the cache information, the SYSTEM_CACHES table and the
SYSTEM_CACHE_REFERENCES table.
The SYSTEM_CACHES and SYSTEM_CACHE_REFERENCES system tables exist in the
INFORMATION_SCHEMA schema. See Catalog Tables on page 981 for a complete description of the contents
of these system tables.
Catalog Tables
The Salesforce driver provides a standard set of catalog tables that maintain the information returned by various
ODBC catalog functions such as SQLTables, SQLColumns, SQLDescribeParam and SQLDescribeCol. If
possible use the ODBC catalog functions to obtain this information instead of querying the catalog tables
directly.
The driver also provides additional catalog tables that maintain metadata specific to the Salesforce driver. This
section defines the catalog tables that provide Salesforce driver-specific information. The catalog tables are
defined in the INFORMATION_SCHEMA schema.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 981
Chapter 8: The Connect XE Drivers
TABLE_CAT VARCHAR The catalog that contains the remote table on which the cache
(128),NULLABLE is defined. It is NULL for the Salesforce driver.
TABLE_SCHEM VARCHAR The schema that contains the remote table on which the
(128),NULLABLE cache is defined.
TABLE_NAME VARCHAR The name of the remote table on which the cache is defined.
(128),NOT NULL
CACHE_TYPE VARCHAR (20),NOT The type cache, which can be either REMOTE TABLE or
NULL REMOTE RELATIONAL.
INITIAL_CHECK VARCHAR(20),NOT The value that defines when the initial refresh check is
NULL performed: ONFIRSTCONNECT or FIRSTUSE.
PERSIST VARCHAR(20),NOT The value that defines whether the data in the cache is
NULL persisted past the lifetime of the connection: TEMPORARY,
MEMORY, or DISK.
ENABLED BOOLEAN,NOT The value that defines whether the cache is enabled for use
NULL with SQL statements: TRUE or FALSE.
CALL_LIMIT INTEGER,NOT The maximum number of Web service calls that can be made
NULL when refreshing the cache. The value 0 indicates no call limit.
FILTER VARCHAR(128), The Where clause used to filter the rows that are cached.
NULLABLE
982 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
LAST_REFRESH DATETIME, The time, in Coordinated Universal Time (UTC), the cache
was last refreshed.
NULLABLE
PRIMARY_TABLE_CAT VARCHAR (128), The catalog that contains the primary table of the
NULLABLE relational cache. It is NULL for the Salesforce driver.
PRIMARY_TABLE_SCHEM VARCHAR (128), The schema that contains the primary table of the
NULLABLE relational cache.
RELATIONSHIP_NAME VARCHAR(128), The name of the foreign key relationship used to relate
NOT NULL this table to the primary table or one of the other tables
in the relational cache.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 983
Chapter 8: The Connect XE Drivers
984 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
WS_AGGREGATE_CALL_COUNT INTEGER, The total of all of the Web service calls made
NOT NULL to the same remote data source by all active
connections using the same server name and
user ID.
Key Description
DATABASE The location and the filename prefix for the data mapping and configuration
files.
DATABASE_ READONLY Indicates whether the database the session is connected to is read only
DB_FILE_LOCATION The fully qualified path to the directory or folder that contains the database
and mapping files.
DB_FILE_PREFIX The filename prefix of the database and mapping files the driver is using.
LOG_CONFIG_FILE The fully qualified path to the directory or folder that contains the logging
configuration file.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 985
Chapter 8: The Connect XE Drivers
SESSION_ID INTEGER, A unique ID that identifies this session. The system function
NOT NULL CURSESSIONID( ) returns the session ID associated with the
connection. See SQL Statements and extensions for the
Salesforce Driver for details on CURSESSIONID().
CONNECTED DATETIME, The date and time the session was established.
NOT NULL
USER_NAME VARCHAR (128), The name of the embedded database that the session is using.
NOT NULL
CURRENT_SCHEMA VARCHAR (128), The current schema for the session. The current schema may
NOT NULL be changed using the ALTER SESSION SET
CURRENT_SCHEMA statement.
STMT_CALL_LIMIT INTEGER, The maximum number of Web service calls that the driver
NOT NULL uses in attempting to execute a query to a remote data source.
The statement call limit for the session may be changed via
the ALTER SESSION SET STMT_CALL_LIMIT statement.
986 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Timeouts
The following types of timeout situations can occur when connecting to Salesforce:
• Session timeouts. Most remote data sources impose a limit on the duration of active sessions, meaning
a session can fail with a session timeout error if the session extends past the limit. This is particularly true
when connection pooling is used. The driver automatically attempts to re-establish a new session if the
driver receives a session timeout error from a data source. The driver uses the initial servername, port (if
appropriate), remote user ID, and remote password (encrypted) to re-establish the session. If the attempt
fails, the driver returns an error indicating that the session timed out and the attempt to re-establish the
session failed.
• Web service request timeouts. You can configure the driver to never time out while waiting for a response
to a Web service request or to wait for a specified interval before timing out by setting the connection option
WSTimeout on page 974. For fetch requests only, if the request times out, you can configure driver to retry
the request a specified number of times by setting the WSRetry Count on page 973. connection option. If all
subsequent attempts to retry a request fails, the driver returns an error indicating that the service request
timed out and the subsequent requests failed. See Connection Option Descriptions on page 939 for details
on the WS Timeout and WS Retry Count connection options.
Using Identifiers
Identifiers are used to refer to objects exposed by the driver, such as tables, columns, or caches. The driver
supports both unquoted and quoted identifiers for naming objects. An unquoted identifier must start with an
ASCII alpha character and can be followed by zero or more ASCII alpha or numeric characters. Unquoted
identifiers are converted to uppercase before being used.
Quoted identifiers must be enclosed in double quotation marks (""). A quoted identifier can contain any Unicode
character, including the space character, and is case-sensitive. The Salesforce driver recognizes the Unicode
escape sequence \uxxxx as a Unicode character. You can specify a double quotation mark in a quoted identifier
by escaping it with a double quotation mark.
The maximum length of both quoted and unquoted identifiers is 128 characters.
Note: When object names are passed as arguments to catalog functions, the case of the value must match
the case of the name in the database. If an unquoted identifier name was used when the object was created,
the value passed to the catalog function must be uppercase because unquoted identifiers are converted to
uppercase before being used. If a quoted identifier name was used when the object was created, the value
passed to the catalog function must match the case of the name as it was defined. Object names in results
returned from catalog functions are returned in the case that they are stored in the database.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 987
Chapter 8: The Connect XE Drivers
databasename.config
where:
databasename
is the name of the database to be configured. For example, if your environment has a database
named mydb or a database configuration file named mydb.config, when the driver establishes a
connection, it performs the following tasks:
• Checks to see if an embedded database named mydb exists (or a database using the default
databasename if one is not specified). If mydb exists, the driver connects to the remote data
source using the mydb database.
• If mydb does not exist and the driver is configured to create a database, the driver looks for a
database configuration file named mydb.config. If the database configuration file exists, the driver
creates the database and mapping using the properties specified in the database configuration
file.
• If mydb.config does not exist, the driver generates a database configuration file with default
settings and uses those settings to create the database and its mapping.
The following are descriptions of the elements of the database configuration file.
Database
Child Elements
User, Schema
988 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Purpose
The Database element is the root element of the database configuration file. It does not define any configuration;
it contains all of the elements that do define the database configuration. One and only one Database element
must exist.
User
Parent Element
Database
Child Element
UseSchema
Purpose
Specifies the User ID used by the driver. At least one User element must exist.
Attributes
name [required]: The user name is a string with a maximum length of 128 characters. The default is
name=userid, where userid is the User ID used by the driver.
defaultSchema: The name of the schema to use for unqualified table and column identifiers. If defaultSchema
is not specified, the schema specified in the first useSchema child element is used as the default schema. The
default is defaultSchema=SFORCE.
UseSchema
Parent Element
User
Child Element
None
Purpose
The UseSchema element specifies a schema that is visible to the user of this element. A schema contains the
mapping between the remote data model and the relational tables the driver exposes. Multiple schemas can
be associated with a user. At least one UseSchema element must exist.
A basic User definition typically has two UseSchema elements: one that specifies the mapping to the remote
data source and one for the local schema.
Attributes
name [required]: The name of the schema to associate with the user. The schema name is a string with a
maximum length of 128 characters. The defaults are name=SFORCE [remote] and name=PUBLIC [local].
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 989
Chapter 8: The Connect XE Drivers
Schema
Parent Element
Database
Child Elements
ConfigOptions, SessionOptions
Purpose
The Schema element defines the schema that contains the mapping for a remote data source. The database
configuration file must contain at least one schema definition and may contain multiple schema definitions.
Each schema definition defines the type of the data source to which the schema maps, the information to
connect to the remote database (except password), and the information needed to configure the remote data
model to relational table mapping. At least one Schema element must exist.
Attributes
name [required]: The name of the schema that defines the data model to relational mapping. This attribute can
be any valid identifier name. The defaults are name=SFORCE for the remote data source and name=PUBLIC
for the local database.
type [required]: The type of remote data source for which the schema defines mapping. This attribute must be
type=Salesforce for the remote data source and type=local for the local database.
ConfigOptions
Parent Element
Schema
Child Element
None
Purpose
The ConfigOptions element is a string that specifies the configuration options used to define how the remote
data source data model is mapped to relational tables. The ConfigOption string has the same keys, values,
and syntax as the Config Options connection option (see Connection Option Descriptions on page 939) except
that the enclosing curly brackets are not required (see Database Configuration File on page 988). The default
is an empty string.
Attributes
None
SessionOptions
Parent Element
Schema
990 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Child Element
None
Purpose
The SessionOptions element is a string of key value pairs that specifies the information needed to connect to
the remote data source. SessionOptions includes the server name and remote user id, for example:
loginhost=login.salesforce.com;[email protected]
Attributes
None
Reports
The Salesforce driver exposes reports defined on a Salesforce instance as stored procedures. An application
can obtain a list of the reports defined on a Salesforce instance by calling the SQLProcedures catalog function.
The names of the reports that can be invoked through the driver are listed in the PROCEDURE_NAME name
column of the SQLProcedures results.
Salesforce organizes reports into folders. The Salesforce driver incorporates the folder name and report name
into the procedure name reported by SQLProcedures. The driver creates the reported procedure name by
prepending the folder name to the report name using an underscore to join them. Additionally, any spaces in
the report or folder names are replaced with an underscore character. Like all identifier name metadata returned
by the driver, the procedure name is uppercase. For example, if a report named Opportunity Pipeline is in the
folder Opportunity Reports, it would be rendered as:
OPPORTUNITY_REPORTS_OPPORTUNITY_PIPELINE
An application invokes a report using the standard Call escape syntax, {call report name}, and ODBC
mechanisms for calling a stored procedure that returns a resultset. The following example shows one way to
invoke the Opportunity Pipeline report:
SQLRETURN retVal;
HSTMT hStmt = NULL;
SQLWCHAR* sql;
sql = L"{call OPPORTUNITY_REPORTS_OPPORTUNITY_PIPELINE}";
retVal = SQLExecDirect(hStmt, sql, SQL_NTS);
if (SQL_SUCCESS == retVal) {
// process results
}
Note: The API used by the driver to obtain the list of reports and execute the reports is not an API that is
documented by Salesforce. This API may change or may not be supported in the future.
Note: When passing parameters to stored procedures, reports are not supported.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 991
Chapter 8: The Connect XE Drivers
Alternatively, you can use the Proxy Host, Proxy Port, Proxy User, and Proxy Password connection attributes,
but these options are applied only for the first connection. See Connection Option Descriptions on page 939 for
details about these attributes.
Note: You must be an administrator to start or stop the service, or to configure any settings for the service.
992 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
JVM Arguments: A string that contains the arguments that are passed to the JVM that the driver is starting.
The location of the JVM must be specified on your PATH. See JVM Arguments on page 956.
JVM Class Path: Specifies the CLASSPATH for the JVM used by the driver. See JVM Classpath on page
957.
Proxy Host: Specifies the Hostname and possibly the Domain of the Proxy Server. See Proxy Host on
page 962.
Proxy Port: Specifies the port needed to connect to the Proxy Server. See Proxy Port on page 964.
Proxy User: Specifies the user name needed to connect to the Proxy Server. See ProxyUser.
Proxy Password: Specifies the password needed to connect to the Proxy Server. See Proxy Password on
page 963.
Server Port Number: Specifies a valid port on which the SQL engine listens for requests from the driver.
By default, the server listens on port 19928. See Server Port Number on page 969 for more information.
Java Path: Specifies fully qualified path to the Java SE 8 or higher JVM executable that you want to use
to run the SQL Engine Server. The path must not contain double quotation marks.
Server DB Directory: Specifies the path of the working directory for the SQL engine service to use to store
the newly created database files or locate the existing database files. If the Database connection option
contains a file name prefix, the user’s local database is created at the path specified by Server DB Directory.
However, if the Database connection option contains a fully qualified path, the user’s local database is
created using that path; the path specified by Server DB Directory is ignored.
Services: Shows the Salesforce ODBC SQL engine service that runs as a separate process instead of
being loaded within the process of an ODBC application.
Start (Stop): Starts or stops the Salesforce service. A message window is displayed, confirming that the
Salesforce service was started or stopped.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 993
Chapter 8: The Connect XE Drivers
1. Start the ODBC Administrator by selecting its icon from the DataDirect Connect program group.
2. Select a tab:
• User DSN: If you are configuring an existing user data source, select the data source name and click
Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the driver
and click Finish to display the driver Setup dialog box.
• System DSN: If you are configuring an existing system data source, select the data source name and
click Configure to display the driver Setup dialog box.
If you are configuring a new system data source, click Add to display a list of installed drivers. Select the
driver and click Finish to display the driver Setup dialog box.
• File DSN: If you are configuring an existing file data source, select the data source file and click Configure
to display the driver Setup dialog box.
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select a
driver. Click Advanced if you want to specify attributes; otherwise, click Next to proceed. Specify a name
for the data source and click Next. Verify the data source information; then, click Finish to display the driver
Setup dialog box.
3. On the ODBC Salesforce Driver Setup dialog box, select the SQL Engine tab; then, select 1- Server from
the SQL Engine Mode drop-down list.
4. Click Edit Server Settings.
5. When you complete your changes, click Apply.
6. Verify that Progress DataDirect Salesforce SQL Engine is selected in the Services drop-down list, and then,
click Start to start the service. A message window appears to confirm that the service is running. Click OK.
7. Click OK to close the ODBC Salesforce SQL Engine Service Setup dialog box.
Note: If you made changes after starting the service, a message window is displayed:
994 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
If you want the service to run with the new settings, click No. Then, click Stop to stop the service, and then
click Start to restart the service. Then, click OK to close the ODBC Salesforce SQL Engine Service Setup
dialog box.
1. Open the ODBC Salesforce Driver Setup dialog box and select the SQL Engine tab.
2. Select 1- Server from the SQL Engine Mode drop-down list. Then, click Edit Server Settings.
3. Click Stop to stop the service. A message window appears to confirm that the service is stopped. Click OK.
4. Click OK to close the ODBC Salesforce SQL Engine Service Setup dialog box.
For example:
To start the SQL engine service, execute the JVM Argument after configuring the Java options. A confirmation
message is returned once the server is online.
-cp Specifies the CLASSPATH for the Java Virtual Machine (JVM) used by the driver.
The CLASSPATH is the search string the JVM uses to locate the Java jar files the
driver needs. The Salesforce driver's JVM is located on the following path:
install_dir/java/lib/sforce.jar
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 995
Chapter 8: The Connect XE Drivers
-port Specifies a valid port on which the SQL engine listens for requests from the driver.
We recommend specifying one of the following values:
-Xmx Specifies the maximum memory heap size, in megabytes, for the JVM. The default
size is determined by your JVM. We recommend specifying a size no smaller than
1024.
Note: Although this option is not required to start the SQL engine server, we highly
recommend specifying a value.
-Dhttp.proxyHost Specifies the Hostname of the Proxy Server. The value specified can be a host
name, a fully qualified domain name, or an IPv4 or IPv6 address.
-Dhttp.proxyPort Specifies the port number where the Proxy Server is listening for HTTP and/or
HTTPS requests.
-Dhttp.proxyUser Specifies the user name needed to connect to the Proxy Server.
996 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Unicode Support
The Salesforce driver is fully Unicode enabled. On UNIX and Linux platforms, the driver supports both UTF-8
and UTF-16. On Windows platforms, the Salesforce driver supports UCS-2/UTF-16 only.
The driver supports the Unicode ODBC W (Wide) function calls, such as SQLConnectW. This allows the Driver
Manager to transmit these calls directly to the driver. Otherwise, the Driver Manager would incur the additional
overhead of converting the W calls to ANSI function calls, and vice versa.
See UTF-16 Applications on UNIX and Linux on page 137 for related details.
Also, refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers
Reference for a more detailed explanation of Unicode.
Advanced Features
The driver supports the following advanced features:
• Failover
• Security
• Connection Pooling
Failover
The Salesforce driver supports reconnection after a session timeout. Salesforce, like most web-based
connections has a session timeout associated with it. The Salesforce driver will reconnect to Salesforce if it
receives an error from Salesforce indicating the session has timed out. No configuration is needed.
You can configure the Salesforce driver to retry web service fetch operations if the web service operation timed
out; Insert, Update and Delete operations are not retried. the WSRetry Count connection option specifies
whether the Salesforce driver retries fetch operations and the number of times it retries. The WSTimeout
connection option specifies Web Service timeout period.
Security
No configuration is required to use SSL. By default, all communication using the driver is SSL-encrypted. SSL
secures the integrity of your data by encrypting information and providing authentication. See Data Encryption
Across the Network on page 91 for an overview.
Depending on how the Salesforce instance is configured, a security token may need to be included with the
user id and password. The Security Token on page 968 connection option specifies the token.
Connection Pooling
The driver supports connection pooling and its related connection options. Connection pooling connection
options are located on the Pooling tab of the driver Setup dialog box. See Using DataDirect Connection Pooling
on page 97 for a general description of connection pooling and its implementation.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 997
Chapter 8: The Connect XE Drivers
operator
Select Statements
The Salesforce driver supports returning parameter metadata for Select statements that contain parameters
in ANSI SQL 92 entry-level predicates, for example, such as COMPARISON, BETWEEN, IN, LIKE, and EXISTS
predicate constructs. Refer to the ANSI SQL reference for detailed syntax.
Parameter metadata can be returned for a Select statement if one of the following conditions is true:
• The statement contains a predicate value expression that can be targeted against the source tables in the
associated FROM clause. For example:
SELECT * FROM foo WHERE bar > ?
In this case, the value expression "bar" can be targeted against the table "foo" to determine the appropriate
metadata for the parameter.
• The statement contains a predicate value expression part that is a nested query. The nested query's metadata
must describe a single column. For example:
SELECT * FROM foo WHERE (SELECT x FROM y WHERE z = 1) < ?
The following Select statements show further examples for which parameter metadata can be returned:
SELECT col1, col2 FROM foo WHERE col1 = ? and col2 > ?
SELECT ... WHERE colname = (SELECT col2 FROM t2 WHERE col3 = ?)
SELECT ... WHERE colname LIKE ?
SELECT ... WHERE colname BETWEEN ? and ?
SELECT ... WHERE colname IN (?, ?, ?)
SELECT ... WHERE EXISTS(SELECT ... FROM T2 WHERE col1 < ?)
ANSI SQL 92 entry-level predicates in a WHERE clause containing GROUP BY, HAVING, or ORDER BY
statements are supported. For example:
SELECT * FROM t1 WHERE col = ? ORDER BY 1
998 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Salesforce Driver
Error Handling
The Salesforce driver reports errors to the application by returning SQL_ERROR to the failing ODBC API call.
The application can then call SQLGetDiagRec to obtain the error details which consist of the following information:
• Description of the probable cause of the error, prefixed by the component that generated the error
• Vendor error code (if applicable)
• String containing the XOPEN SQLState
Driver Errors
An error generated by the driver has the following format:
Syntax
[DataDirect][ODBC Salesforce Driver]message
Example
[DataDirect][ODBC Salesforce Driver]Timeout expired.
See also
Check the last ODBC call made by your application for possible problems or contact your ODBC application
vendor.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 999
Chapter 8: The Connect XE Drivers
Syntax
[DataDirect][ODBC Salesforce Driver][Salesforce] message
Example
[DataDirect][ODBC Salesforce Driver][Salesforce] Invalid Object Name.
SQL Support
See SQL Statements and Extensions for the Salesforce Driver for information about the SQL statements and
extensions supported by the Salesforce driver.
IS_EXTERNAL_ID VARCHAR (3), NOT Provides an indication of whether the column can be used
NULL as an External ID. External ID columns can be used as the
lookup column for insert and upsert operations and
foreign-key relationship values. Valid values are:
• SQLColumnPrivileges
• SQLDescribeParam
• SQLForeignKeys
• SQLPrimaryKeys
• SQLProcedures
1000 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase IQ Wire Protocol Driver
• SQLTablePrivileges
Refer to "ODBC API and scalar functions" in the Progress DataDirect for ODBC Drivers Reference for a list of
supported API functions.
• SAP IQ
• Sybase IQ
For the latest support information, visit the Progress DataDirect Supported Configurations page:
https://www.progress.com/supported-configurations/datadirect.
The Sybase IQ Wire Protocol driver is supported in the Windows, UNIX, and Linux environments. See
Environment-Specific Information on page 58 for detailed information about the environments supported by
this driver.
Refer to the readme file shipped with your DataDirect product for the file name of the Sybase IQ Wire Protocol
driver.
Driver Requirements
The driver has no client requirements.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1001
Chapter 8: The Connect XE Drivers
You can configure and modify data sources by editing the odbc.ini file and storing default connection values
there. See Configuration Through the System Information (odbc.ini) File on page 117 for detailed information
about the specific steps necessary to configure a data source.
Connection Option Descriptions on page 1011 lists driver connection string attributes that must be used in the
odbc.ini file to set the value of the attributes. Note that only the long name of the attribute can be used in the
file. The default listed in the table is the initial default value when the driver is installed.
1. Start the ODBC Administrator by selecting its icon from the DataDirect Connect program group.
Select a tab:
• User DSN: If you are configuring an existing user data source, select the data source name and
click Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the
driver and click Finish to display the driver Setup dialog box.
• System DSN: If you are configuring an existing system data source, select the data source name
and click Configure to display the driver Setup dialog box.
If you are configuring a new system data source, click Add to display a list of installed drivers. Select
the driver and click Finish to display the driver Setup dialog box.
• File DSN: If you are configuring an existing file data source, select the data source file and click Configure
to display the driver Setup dialog box.
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select
a driver. Click Advanced if you want to specify attributes; otherwise, click Next to proceed. Specify a
name for the data source and click Next. Verify the data source information; then, click Finish to display
the driver Setup dialog box.
1002 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase IQ Wire Protocol Driver
Note: The General tab displays the only fields that are required for creating a data source. The fields on
all other tabs are optional, unless noted otherwise.
2. On this tab, provide values for the options in the following table; then, click Apply. The table provides links
to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1003
Chapter 8: The Connect XE Drivers
3. Optionally, click the Advanced tab to specify additional data source settings.
Figure 107: Advanced tab
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
Default Buffer Size for Long Columns (in Kb) on page 1021 1024
1004 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase IQ Wire Protocol Driver
Extended Options: Type a semi-colon separated list of connection options and their values. Use this
configuration option to set the value of undocumented connection options that are provided by Progress
DataDirect customer support. You can include any valid connection option in the Extended Options string,
for example:
Database=Server1;UndocumentedOption1=value[;UndocumentedOption2=value;]
If the Extended Options string contains option values that are also set in the setup dialog or data source,
the values of the options specified in the Extended Options string take precedence. However, connection
options that are specified on a connection string override any option value specified in the Extended Options
string.
Note: Do not specify the Extended Options configuration option in a connection string, or the driver will
return an error. Instead, applications should specify the individual undocumented connection options in the
connection string.
Translate : Click Translate to display the Select Translator dialog box, which lists the translators
specified in the ODBC Translators section of the Registry. Progress DataDirect provides a translator named
OEM to ANSI that translates your data from the IBM PC character set to the ANSI character set.
Select a translator; then, click OK to close this dialog box.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1005
Chapter 8: The Connect XE Drivers
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
5. Optionally, click the Performance tab to specify performance data source settings.
Figure 109: Performance tab
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
1006 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase IQ Wire Protocol Driver
6. Optionally, click the Failover tab to specify failover data source settings.
Figure 110: Failover tab
See Using Failover on page 78 for a general description of failover and its related connection options.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1007
Chapter 8: The Connect XE Drivers
7. Optionally, click the Pooling tab to specify connection pooling data source settings.
Figure 111: Pooling tab
See Using DataDirect Connection Pooling on page 97 for a general description of connection pooling.
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
1008 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase IQ Wire Protocol Driver
8. At any point during the configuration process, you can click Test Connect to attempt to connect to the data
source using the connection options specified in the driver Setup dialog box. A logon dialog box appears
(see Using a Logon Dialog Box (Sybase IQ) on page 1010 for details). Note that the information you enter in
the logon dialog box during a test connect is not saved.
• If the driver can connect, it releases the connection and displays a Connection Established message.
Click OK.
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message. Click OK.
Note: If you are configuring alternate servers for use with the connection failover feature, be aware that
the Test Connect button tests only the primary server, not the alternate servers.
9. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
DSN=data_source_name[;attribute=value[;attribute=value]...]
FILEDSN=filename.dsn[;attribute=value[;attribute=value]...]
The DSN-less connection string specifies a driver instead of a data source. All connection information must be
entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
Connection Option Descriptions on page 1011 lists the long and short names for each attribute, as well as the
initial default value when the driver is first installed. You can specify either long or short names in the connection
string.
An example of a DSN connection string with overriding attribute values for Sybase IQ is:
DSN=SYBIQTABLES;DB=PAYROLL;UID=JOHN;PWD=XYZZY
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1009
Chapter 8: The Connect XE Drivers
1. In the Network Address field, specify an IP address for the Sybase IQ server as follows: IP
address,port_number. For example, you might enter 199.226.224.34,2638. If your network supports
named servers, you can specify an address as: servername,port_number. For example, you might enter
SybIQserver,2638.
The IP address can be specified in either IPv4 or IPv6 format, or a combination of the two. See Using IP
Addresses on page 67 for details concerning these formats.
Note: If you are connecting through the Test Connect button of the Setup dialog box, only the default
database specified on the General tab of the Setup dialog box is available in the Database drop-down list.
The database names specified on the Connection tab are not available.
5. Click OK to complete the logon and to update the values in the Registry.
1010 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase IQ Wire Protocol Driver
ArraySize (AS) 50
ConnectionRetryCount (CRC) 0
ConnectionRetryDelay (CRD) 3
ConnectionCacheSize (CCS) 1
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1011
Chapter 8: The Connect XE Drivers
LoadBalanceTimeout (LBT) 0
LoginTimeout (LT) 15
MinPoolSize (MNPS) 0
PacketSize (PS) 0
QueryTimeout (QT) 0
Alternate Servers
Attribute
AlternateServers (ASRV)
1012 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase IQ Wire Protocol Driver
Purpose
A list of alternate database servers to which the driver tries to connect if the primary database server is
unavailable. Specifying a value for this option enables connection failover for the driver. The value you specify
must be in the form of a string that defines the physical location of each alternate server. All of the other required
connection information for each alternate server is the same as what is defined for the primary server connection.
Valid Values
({NetworkAddress=addressvalue | InterfacesFileServerName=sectionvalue}[, ...])
Notes
• An alternate server address in IPv6 format must be enclosed in double quotation marks.
• You must specify the network address of each alternate database server or the section in the Interfaces file
that contains the network connection information for the Sybase IQ database server you want to access
(InterfacesFileServerName).
• The Alternate Servers option and the HA Failover Server Connection Information option are mutually
exclusive.
Example
The following example Alternate Servers values define three alternate database servers for connection failover:
(InterfacesFileServerName=Accounting, NetworkAddress="255.125.1.11, 4200",
NetworkAddress="SybaseIQ2, 4200")
In this example, the network address of the last two alternates contain commas. In this case, enclose the
network address with double quotation marks as shown.
Default
None
GUI Tab
Failover tab
Application Name
Attribute
ApplicationName (APP)
Purpose
The name used by Sybase IQ to identify your application.
Valid Values
string
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1013
Chapter 8: The Connect XE Drivers
string
Default
None
GUI Tab
Connection tab
Attribute
ApplicationUsingThreads (AUT)
Purpose
Determines whether the driver works with applications using multiple ODBC threads.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver works with single-threaded and multi-threaded applications.
If set to 0 (Disabled), the driver does not work with multi-threaded applications. If using the driver with
single-threaded applications, this value avoids additional processing required for ODBC thread-safety standards.
Notes
• This connection option can affect performance.
Default
1 (Enabled)
GUI Tab
Advanced tab
See Also
See Performance Considerations on page 1038 for details.
Charset
Attribute
Charset (CS)
1014 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase IQ Wire Protocol Driver
Purpose
The name of a character set installed on the Sybase IQ server to be used by the driver.
This option is not a substitute for the IANAAppCodePage option. See IANAAppCodePage on page 1026 for
details.
Valid Values
charset
where:
charset
Behavior
If unspecified, the character set setting on the Sybase IQ server is used.
For the driver to return Unicode SQL types for connections to Sybase IQ 15.0 and higher, use a value of UTF-8.
Refer to the Sybase IQ server documentation for a list of valid character sets.
Example
If your client needs to receive data in iso-8859-1 from a non-Unicode Sybase IQ server, you would specify a
value of iso_1.
Default
None
GUI Tab
Connection tab
Attribute
ConnectionCacheSize (CCS)
Purpose
The number of connections that the connection cache can hold.
Valid Values
x
where:
is a positive integer representing the number of connections that the connection cache can hold.
To enable the connection cache, you must set the Select Method option to 1 (Direct). Increasing the connection
cache may increase performance of some applications but requires additional database resources.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1015
Chapter 8: The Connect XE Drivers
Default
1
GUI Tab
Performance tab
Connection Pooling
Attribute
Pooling (POOL)
Purpose
Specifies whether to use the driver’s connection pooling.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses connection pooling.
If set to 0 (Disabled), the driver does not use connection pooling.
Notes
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Pooling tab
See Also
See Performance Considerations on page 1038 for details.
Connection Reset
Attribute
ConnectionReset (CR)
Purpose
Determines whether the state of connections that are removed from the connection pool for reuse by the
application is reset to the initial configuration of the connection.
1016 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase IQ Wire Protocol Driver
Valid Values
0|1
Behavior
If set to 1 (Enabled), the state of connections removed from the connection pool for reuse by an application is
reset to the initial configuration of the connection. Resetting the state can negatively impact performance
because additional commands must be sent over the network to the server to reset the state of the connection.
If set to 0 (Disabled), the state of connections is not reset.
Notes
• This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Pooling tab
See Also
See Performance Considerations on page 1038 for details.
Attribute
ConnectionRetryCount (CRC)
Purpose
The number of times the driver retries connection attempts to the primary database server, and if specified,
alternate servers until a successful connection is established.
This option and the Connection Retry Delay connection option, which specifies the wait interval between
attempts, can be used in conjunction with failover.
Valid Values
0|x
where:
Behavior
If set to 0, the driver does not try to connect after the initial unsuccessful attempt.
If set to x, the driver retries connection attempts the specified number of times. If a connection is not established
during the retry attempts, the driver returns an error that is generated by the last server to which it tried to
connect.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1017
Chapter 8: The Connect XE Drivers
Default
0
GUI Tab
Failover tab
Attribute
ConnectionRetryDelay (CRD)
Purpose
Specifies the number of seconds the driver waits between connection retry attempts when Connection Retry
Count is set to a positive integer.
This option and the Connection Retry Count connection option can be used in conjunction with failover.
Valid Values
0|x
where:
Behavior
If set to 0, there is no delay between retries.
If set to x, the driver waits the specified number of seconds between connection retry attempts.
Default
3
GUI Tab
Failover tab
Attribute
RaiseErrorPositionBehavior (REPB)
Purpose
Determines whether the driver returns raiserrors when the next statement is executed or handles them separately.
Valid Values
0|1
1018 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase IQ Wire Protocol Driver
Behavior
If set to 0 (Default), raiserrors are handled separately from surrounding statements. The error is returned when
a raiserror is processed (for example, resulting from SQLExecute, SQLExecDirect, or SQLMoreResults). The
result set is empty.
If set to 1 (Microsoft compatible), raiserrors are returned when the next statement is processed, and the cursor
is positioned on the first row of the subsequent result set. This could result in multiple raiserrors being returned
on a single execute.
Default
0 (Default)
GUI Tab
Advanced tab
Attribute
DataSourceName (DSN)
Purpose
Specifies the name of a data source in your Windows Registry or odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Database List
Attribute
n/a
Description
A list of database names that will appear in the drop-down list of the logon dialog box (see Using a Logon
Dialog Box (Sybase IQ) on page 1010 for a description).
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1019
Chapter 8: The Connect XE Drivers
Valid Values
database_list
where:
database_list
is a comma-separated list of database names that will appear in the drop-down list of the logon dialog
box.
Default
None
GUI Tab
Connection tab
Database Name
Attribute
Database (DB)
Purpose
Specifies the name of the database to which you want to connect.
Valid Values
database_name
where:
database_name
is the name of a valid database. If you do not specify a value, the default is the database defined by
the system administrator for each user.
Default
None
GUI Tab
General tab
Description
Attribute
Description (n/a)
Purpose
Specifies an optional long description of a data source. This description is not used as a runtime connection
attribute, but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
1020 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase IQ Wire Protocol Driver
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Attribute
DefaultLongDataBuffLen (DLDBL)
Purpose
The maximum length of data (in KB) the driver can fetch from long columns in a single round trip and the
maximum length of data that the driver can send using the SQL_DATA_AT_EXEC parameter.
This option also applies to binding long parameters in chunks. The driver truncates any data passed in a
Long/LOB SQL_DATA_AT_EXEC parameter to the size specified.
Valid Values
An integer in multiples of 1024
The value must be in multiples of 1024 (for example, 1024, 2048). You need to increase the default value if
the total size of any Long data exceeds 1 MB. This value is multiplied by 1024 to determine the total maximum
length of fetched data. For example, if you enter a value of 2048, the maximum length of data would be 1024
x 2048, or 2097152 (2 MB).
Notes
• This connection option can affect performance.
Default
1024
GUI Tab
Advanced tab
See Also
See Performance Considerations on page 1038 for details.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1021
Chapter 8: The Connect XE Drivers
Failover Granularity
Attribute
FailoverGranularity (FG)
Purpose
Determines whether the driver fails the entire failover process or continues with the process if errors occur
while trying to reestablish a lost connection.
This option applies only when Failover Mode is set to 1 (Extended Connection) or 2 (Select).
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
Valid Values
0|1|2|3
Behavior
If set to 0 (Non-Atomic), the driver continues with the failover process and posts any errors on the statement
on which they occur.
If set to 1 (Atomic) the driver fails the entire failover process if an error is generated as the result of anything
other than executing and repositioning a Select statement. If an error is generated as a result of repositioning
a result set to the last row position, the driver continues with the failover process, but generates a warning that
the Select statement must be reissued.
If set to 2 (Atomic Including Repositioning), the driver fails the entire failover process if any error is generated
as the result of restoring the state of the connection or the state of work in progress.
If set to 3 (Disable Integrity Check), the driver does not verify that the rows that were restored during the failover
process match the original rows. This value applies only when Failover Mode is set to 2 (Select).
Default
0 (Non-Atomic)
GUI Tab
Failover tab
Failover Mode
Attribute
FailoverMode (FM)
Purpose
Specifies the type of failover method the driver uses.
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
1022 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase IQ Wire Protocol Driver
Valid Values
0|1|2
Behavior
If set to 0 (Connection), the driver provides failover protection for new connections only.
If set to 1 (Extended Connection), the driver provides failover protection for new and lost connections, but not
any work in progress.
If set to 2 (Select), the driver provides failover protection for new and lost connections. In addition, it preserves
the state of work performed by the last Select statement executed.
Notes
• This connection option can affect performance.
Default
0 (Connection)
GUI Tab
Failover tab
See Also
See Performance Considerations on page 1038 for details.
Failover Preconnect
Attribute
FailoverPreconnect (FP)
Purpose
Specifies whether the driver tries to connect to the primary and an alternate server at the same time.
This attribute applies only when Failover Mode is set to 1 (Extended Connection) or 2 (Select) and at least one
alternate server is specified.
The Alternate Servers option specifies one or multiple alternate servers for failover and is required for all failover
methods.
Valid Values
0|1
Behavior
If set to 0 (Disabled), the driver tries to connect to an alternate server only when failover is caused by an
unsuccessful connection attempt or a lost connection. This value provides the best performance, but your
application typically experiences a short wait while the failover connection is attempted.
If set to 1 (Enabled), the driver tries to connect to the primary and an alternate server at the same time. This
can be useful if your application is time-sensitive and cannot absorb the wait for the failover connection to
succeed.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1023
Chapter 8: The Connect XE Drivers
Default
0 (Disabled)
GUI Tab
Failover tab
Attribute
ArraySize (AS)
Purpose
The number of rows the driver retrieves from the server for a fetch. This is not the number of rows given to the
user. You should use Fetch Array Size in conjunction with Select Method on page 1035.
Valid Values
x
where:
Notes
• This connection option can affect performance.
Default
50
GUI Tab
Performance tab
See Also
See Performance Considerations on page 1038 for details.
Attribute
FetchTWFSasTime (FTWFSAT)
Purpose
Determines whether the driver returns column values with the time data type as the ODBC data type
SQL_TYPE_TIME or SQL_TYPE_TIMESTAMP.
1024 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase IQ Wire Protocol Driver
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver returns column values with the time data type as the ODBC data type
SQL_TYPE_TIME. The fractional seconds portion of the value is truncated.
If set to 0 (Disabled), the driver returns column values with the time data type as the ODBC data type
SQL_TYPE_TIMESTAMP. The fractional seconds portion of the value is preserved. Time columns are not
searchable when they are described and fetched as timestamp.
Notes
• When returning time with fractional seconds data as SQL_TYPE_TIMESTAMP, the Year, Month and Day
parts of the timestamp must be set to zero.
Default
1 (Enabled)
GUI Tab
Advanced tab
Attribute
FailoverNetworkAddress (FNA)
Purpose
The network address of the High Availability (HA) Failover server to be used in the event of a connection loss.
The driver detects the dropped connection and automatically reconnects to the specified HA Failover server.
This option is valid only for Sybase IQ servers that have the High Availability Failover feature enabled.
Valid Values
IP_ address , port_number | server_name , port_number
where:
IP_ address
port_number
is the port number assigned to the listener process on the HA Failover server.
server_name
is a name that uniquely identifies the HA Failover server. You can use this format if your environment
supports named servers.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1025
Chapter 8: The Connect XE Drivers
Notes
• The HA Failover Server Connection Information option and the Alternate Servers option are mutually
exclusive.
Example
199.226.224.34, 2638
Sybaseiqserver, 2638
Default
None
GUI Tab
Failover tab
IANAAppCodePage
Attribute
IANAAppCodePage (IACP)
Purpose
An Internet Assigned Numbers Authority (IANA) value. You must specify a value for this option if your application
is not Unicode-enabled or if your database character set is not Unicode. The value you specify must match
the database character encoding and the system locale.
The driver uses the specified IANA code page to convert "W" (wide) functions to ANSI.
The driver and Driver Manager both check for the value of IANAAppCodePage in the following order:
• In the connection string
• In the Data Source section of the system information file (odbc.ini)
• In the ODBC section of the system information file (odbc.ini)
If the driver does not find an IANAAppCodePage value, the driver uses the default value of 4 (ISO 8859-1
Latin-1).
Valid Values
IANA_code_page
where:
IANA_code_page
is one of the valid values listed in "IANAAppCodePage values" in the Progress DataDirect for ODBC
Drivers Reference. The value must match the database character encoding and the system locale.
Notes
Refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers Reference
for details.
1026 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase IQ Wire Protocol Driver
Default
4 (ISO 8559-1 Latin-1)
GUI Tab
N/A
Initialization String
Attribute
InitializationString (IS)
Purpose
A SQL command that is issued immediately after connecting to the database to manage session settings.
Valid Values
SQL_command
where:
SQL_command
Notes
• If the statement fails to execute, the connection fails and the driver reports the error returned from the server.
Example
To allow delimited identifiers, specify:
Initialization String=set QUOTED_IDENTIFIER on
Default
None
GUI Tab
Advanced tab
Interfaces File
Attribute
InterfacesFile (IF)
Purpose
The directory to the Interfaces file.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1027
Chapter 8: The Connect XE Drivers
Valid Values
file_dir
where:
file_dir
Behavior
If unspecified and a value is specified for the Server Name option, the driver looks for the path name of the
Interfaces file in the Registry under HKEY_LOCAL_MACHINE\SOFTWARE\DataDirect\InterfacesFile. If this
Registry value is empty, the driver will try to open the SQL.INI file found in the same directory where the driver
is located and use it as the Interfaces file.
Notes
• This option and the Network Address option are mutually exclusive.
Default
None
GUI Tab
General tab
Language
Attribute
Language (LANG)
Purpose
The national character set installed on the Sybase IQ server.
Valid Values
charset
where:
charset
Default
None (English)
GUI Tab
Connection tab
1028 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase IQ Wire Protocol Driver
Attribute
LoadBalanceTimeout (LBT)
Purpose
The number of seconds to keep inactive connections open in a connection pool. An inactive connection is a
database session that is not associated with an ODBC connection handle, that is, a connection in the pool that
is not in use by an application.
Valid Values
0|x
where
Behavior
If set to 0, inactive connections are kept open.
If set to x, inactive connections are closed after the specified number of seconds passes.
Notes
The Min Pool Size option may cause some connections to ignore this value.
This connection option can affect performance.
Default
0 (Disabled)
GUI Tab
Pooling tab
See Also
See Performance Considerations on page 1038 for details.
Load Balancing
Attribute
LoadBalancing (LB)
Purpose
Determines whether the driver uses client load balancing in its attempts to connect to the database servers
(primary and alternate). You can specify one or multiple alternate servers by setting the Alternate Servers
option.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1029
Chapter 8: The Connect XE Drivers
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver uses client load balancing and attempts to connect to the database servers
(primary and alternate servers) in random order.
If set to 0 (Disabled), the driver does not use client load balancing and connects to each server based on their
sequential order (primary server first, then, alternate servers in the order they are specified).
Notes
• This option has no effect unless alternate servers are defined for the Alternate Servers connection option.
Default
0 (Disabled)
GUI Tab
Failover tab
Login Timeout
Attribute
LoginTimeout (LT)
Purpose
The number of seconds the driver waits for a connection to be established before returning control to the
application and generating a timeout error. To override the value that is set by this connection option for an
individual connection, set a different value in the SQL_ATTR_LOGIN_TIMEOUT connection attribute using
the SQLSetConnectAttr() function.
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, the connection request does not time out. The driver silently ignores the
SQL_ATTR_LOGIN_TIMEOUT attribute.
If set to 0, the connection request does not time out, but the driver responds to the SQL_ATTR_LOGIN_TIMEOUT
attribute.
If set to x, the connection request times out after the specified number of seconds unless the application
overrides this setting with the SQL_ATTR_LOGIN_TIMEOUT attribute.
1030 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase IQ Wire Protocol Driver
Default
15
GUI Tab
Advanced tab
Attribute
MaxPoolSize (MXPS)
Purpose
The maximum number of connections allowed within a single connection pool. When the maximum number of
connections is reached, no additional connections can be created in the connection pool.
Valid Values
An integer from 1 to 65535
For example, if set to 20, the maximum number of connections allowed in the pool is 20.
Notes
• This connection option can affect performance.
Default
100
GUI Tab
Pooling tab
See Also
See Performance Considerations on page 1038 for details.
Attribute
MinPoolSize (MNPS)
Purpose
The minimum number of connections that are opened and placed in a connection pool, in addition to the active
connection, when the pool is created. The connection pool retains this number of connections, even when
some connections exceed their Load Balance Timeout value.
Valid Values
0|x
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1031
Chapter 8: The Connect XE Drivers
Behavior
If set to 0, no connections are opened in addition to the current existing connection.
If set to x, the start-up number of connections in the pool is 5 in addition to the current existing connection.
Notes
• This connection option can affect performance.
Example
If set to 5, the start-up number of connections in the pool is 5 in addition to the current existing connection.
Default
0
GUI Tab
Pooling tab
See Also
See Performance Considerations on page 1038 for details.
Network Address
Attribute
NetworkAddress (NA)
Purpose
A unique identifier assigned to the Sybase IQ server machine.
Valid Values
server_name | IP_address
where:
server_name
is the Sybase IQ server name specified as: named_server, port_number. For example, you can
enter SyIQserver, 2638.
IP_address
is the Sybase IQ server address specified as: IP_address, port_number. For example, you can
enter 199.226.224.34, 2638. The IP address can be specified in either IPv4 or IPv6 format, or
a combination of the two. See Using IP Addresses on page 67 for details about these formats.
Notes
• This option is mutually exclusive with the Interfaces File and the Server Name option.
1032 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase IQ Wire Protocol Driver
Default
None
GUI Tab
General tab
Packet Size
Attribute
PacketSize (PS)
Purpose
Determines the number of bytes for each database protocol packet that is transferred from the database server
to the client machine. Adjusting the packet size can improve performance. The optimal value depends on the
typical size of data that is inserted, updated, or returned by the application and the environment in which it is
running. Typically, larger packet sizes work better for large amounts of data. For example, if an application
regularly returns character values that are 10,000 characters in length, using a value of 32 (16 KB) typically
results in improved performance.
Valid Values
-1 | 0 | x
Behavior
If set to -1, the driver uses the maximum packet size that is set by the database server.
If set to 0, the driver uses the default packet size that is used by the database server.
If set to x, an integer from 1 to 127, the driver uses a packet size that is a multiple of 512 bytes. For example,
PacketSize=8 means to set the packet size to 8 * 512 bytes (4096 bytes).
Notes
• The ODBC connection attribute SQL_ATTR_PACKET_SIZE provides the same functionality as the Packet
Size option; however, SQL_ATTR_PACKET_SIZE and the Packet Size option are mutually exclusive. If
Packet Size is specified, the driver returns the message Driver Not Capable if an application attempts
to call SQLSetConnectAttr() for SQL_ATTR_PACKET_SIZE. If you do not set the Packet Size option,
application calls to SQLSetConnectAttr() for SQL_ATTR_PACKET_SIZE are accepted by the driver.
• This connection option can affect performance.
Default
0
GUI Tab
Performance tab
See Also
See Performance Considerations on page 1038 for details.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1033
Chapter 8: The Connect XE Drivers
Password
Attribute
Password (PWD)
Purpose
The password that the application uses to connect to your database. The Password option cannot be specified
through the driver Setup dialog box and should not be stored in a data source. It is specified through the Logon
dialog box or a connection string.
Valid Values
pwd
where:
pwd
is a valid password.
Default
None
GUI Tab
n/a
Query Timeout
Attribute
QueryTimeout (QT)
Purpose
The number of seconds for the default query timeout for all statements that are created by a connection. To
override the value set by this connection option for an individual statement, set a different value in the
SQL_ATTR_QUERY_TIMEOUT statement attribute on the SQLSetStmtAttr() function.
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, the query does not time out. The driver silently ignores the SQL_ATTR_QUERY_TIMEOUT attribute.
If set to 0, the query does not time out, but the driver responds to the SQL_ATTR_QUERY_TIMEOUT attribute.
1034 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase IQ Wire Protocol Driver
If set to x, all queries time out after the specified number of seconds unless the application overrides this value
by setting the SQL_ATTR_QUERY_TIMEOUT attribute.
Default
0
GUI Tab
Advanced tab
Attribute
ReportCodepageConversionErrors (RCCE)
Purpose
Specifies how the driver handles code page conversion errors that occur when a character cannot be converted
from one character set to another.
An error message or warning can occur if an ODBC call causes a conversion error, or if an error occurs during
code page conversions to and from the database or to and from the application. The error or warning generated
is Code page conversion error encountered. In the case of parameter data conversion errors, the
driver adds the following sentence: Error in parameter x, where x is the parameter number. The standard
rules for returning specific row and column errors for bulk operations apply.
Valid Values
0|1|2
Behavior
If set to 0 (Ignore Errors), the driver substitutes 0x1A for each character that cannot be converted and does
not return a warning or error.
If set to 1 (Return Error), the driver returns an error instead of substituting 0x1A for unconverted characters.
If set to 2 (Return Warning), the driver substitutes 0x1A for each character that cannot be converted and returns
a warning.
Default
0 (Ignore Errors)
GUI Tab
Advanced tab
Select Method
Attribute
SelectMethod (SM)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1035
Chapter 8: The Connect XE Drivers
Purpose
Determines whether database cursors are used for Select statements.
Valid Values
0|1
Behavior
If set to 0 (Cursor), database cursors are used. In some cases performance degradation can occur when
performing large numbers of sequential Select statements because of the amount of overhead associated with
creating database cursors.
If set to 1 (Direct), Select statements are run directly without using database cursors, and the data source is
limited to one active statement.
Notes
• This connection option can affect performance.
Default
1 (Direct)
GUI Tab
Performance tab
See Also
See Performance Considerations on page 1038 for details.
Server Name
Attribute
InterfacesFileServerName (IFSN)
Purpose
The name of the section in the Interfaces file containing the network connection information for the Sybase IQ
server. Typically, the section name is the host name of the Sybase IQ server.
Valid Values
section_name
where:
section_name
is a section in the Interfaces file containing the network connection information for the Sybase IQ
server.
Notes
• The Network Address option and the Server Name option are mutually exclusive.
1036 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase IQ Wire Protocol Driver
Default
None
GUI Tab
General tab
Attribute
TruncateTimeTypeFractions (TTTF)
Purpose
Determines whether the driver sets fractional seconds to zero (0) when converting data from the TIME data
type to TIMESTAMP, CHAR, or WCHAR data types.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver converts fractional seconds to zero when converting the TIME data type.
If set to 0 (Disabled), the driver does not set fractional seconds to zero when converting the TIME data type.
Default
0 (Disabled)
GUI Tab
Advanced tab
User Name
Attribute
LogonID (UID)
Description
The default user ID that is used to connect to your database. Your ODBC application may override this value
or you may override it in the logon dialog box or connection string.
Valid Values
userid
where:
userid
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1037
Chapter 8: The Connect XE Drivers
Default
None
GUI Tab
General tab
Workstation ID
Attribute
WorkstationID (WKID)
Purpose
An identifier for the client machine.
Valid Values
ID
where:
ID
Default
None
GUI Tab
Connection tab
Performance Considerations
The following connection options can enhance driver performance.
Application Using Threads (ApplicationUsingThreads): The driver coordinates concurrent database
operations (operations from different threads) by acquiring locks. Although locking prevents errors in the driver,
it also decreases performance. If your application does not make ODBC calls from different threads, the driver
has no reason to coordinate operations. In this case, the ApplicationUsingThreads attribute should be disabled
(set to 0).
Note: If you are using a multi-threaded application, you must enable the Application Using Threads option.
Connection Pooling (Pooling): If you enable the driver to use connection pooling, you can set additional
options that affect performance:
• Load Balance Timeout (LoadBalanceTimeout): You can define how long to keep connections in the pool.
The time that a connection was last used is compared to the current time and, if the timespan exceeds the
value of the Load Balance Timeout option, the connection is destroyed. The Min Pool Size option can cause
some connections to ignore this value.
1038 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase IQ Wire Protocol Driver
Note: The ideal setting for your application will vary. To calculate the ideal setting for this option, you must
know the size in bytes of the rows that you are fetching and the size in bytes of your Network Packet. Then,
you must calculate the number of rows that will fit in your Network Packet, leaving space for packet overhead.
For example, suppose your Network Packet size is 1024 bytes and the row size is 8 bytes. Dividing 1024 by
8 equals 128; however, the ideal setting for Fetch Array Size is 127, not 128, because the number of rows
times the row size must be slightly smaller than the Network Packet size.
Packet Size (PacketSize): Typically, it is optimal for the client to use the maximum packet size that the database
server allows. This reduces the total number of round trips required to return data to the client, thus improving
performance. Therefore, performance can be improved if the PacketSize attribute is set to the maximum packet
size of the Sybase IQ server.
Select Method (SelectMethod): If your application often executes a SQL statement before processing or
closing the previous result set, then it uses multiple active statements per connection. An active statement is
defined as a statement where all the result rows or result sets have not been fetched. Using multiple active
statements can cause high overhead on the server. The default setting (1) of this option causes the driver to
execute statements directly without the use of database cursors and limits the application to one active statement
per connection. If your application requires multiple active statements, then set Select Method to 0 (Cursor).
Keep in mind that you may see a negative impact in performance. If this option is set to 0, it should be used in
conjunction with Fetch Array Size (ArraySize). If this option is set to 1, Fetch Array Size (ArraySize) has no
effect.
Data Types
The following table shows how the Sybase IQ data types are mapped to the standard ODBC data types. Unicode
Support on page 1041 lists Sybase IQ to Unicode data type mappings.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1039
Chapter 8: The Connect XE Drivers
BIGINT SQL_BIGINT
BINARY SQL_BINARY
BIT SQL_BIT
CHAR SQL_CHAR
DATE SQL_TYPE_DATE
DATETIME SQL_TYPE_TIMESTAMP
DECIMAL SQL_DECIMAL
DOUBLE SQL_DOUBLE
IMAGE SQL_LONGVARBINARY
INT SQL_INTEGER
MONEY SQL_DECIMAL
NUMERIC SQL_NUMERIC
REAL SQL_REAL
SMALLDATETIME SQL_TYPE_TIMESTAMP
SMALLINT SQL_SMALLINT
SMALLMONEY SQL_DECIMAL
TEXT SQL_LONGVARCHAR
TIME SQL_TYPE_TIME
TIMESTAMP SQL_TYPE_TIMESTAMP
TINYINT SQL_TINYINT
UNIQUEIDENTIFIER SQL_BINARY
UNIQUEIDENTIFIERSTR SQL_CHAR
1040 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase IQ Wire Protocol Driver
VARBINARY SQL_VARBINARY
VARCHAR SQL_VARCHAR
Note: The Sybase IQ Wire Protocol driver supports extended new limits (XNL) for character and binary
columns—columns with lengths greater than 255.
See Retrieving Data Type Information on page 72 for information about retrieving data types.
Unicode Support
When connected to a Unicode database, the Sybase IQ Wire Protocol driver supports the Unicode data types
listed in the following table, in addition to standard ODBC data types listed in Data Types on page 1039.
UNIQUEIDENTIFIERSTR SQL_WCHAR
79
VARCHAR SQL_WVARCHAR
For data types that require the UTF-8 character set, set the Charset connection string attribute. See Charset
on page 1014 for information about using this connection string attribute.
The driver supports the Unicode ODBC W (Wide) function calls, such as SQLConnectW. This allows the Driver
Manager to transmit these calls directly to the driver. Otherwise, the Driver Manager would incur the additional
overhead of converting the W calls to ANSI function calls, and vice versa.
See UTF-16 Applications on UNIX and Linux on page 137 for related details.
Also, refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers
Reference for a more detailed explanation of Unicode.
Advanced Features
The driver supports the following advanced features:
• Failover
79
This data type is available only if the data source is configured to use the UTF-8 character set.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1041
Chapter 8: The Connect XE Drivers
• Connection Pooling
Failover
The driver supports failover and its related connection options. Failover connection options are located on the
Failover tab of the driver Setup dialog box. See Using Failover on page 78 for a general description of failover
and its implementation.
Connection Pooling
The driver supports connection pooling and its related connection options. Connection pooling connection
options are located on the Pooling tab of the driver Setup dialog box. See Using DataDirect Connection Pooling
on page 97 for a general description of connection pooling and its implementation.
Unexpected Characters
Users are sometimes surprised when they insert a character into a database, only to have a different character
displayed when they fetch it from the database. There are many reasons this can happen, but it most often
involves code page issues, not driver errors.
Client and server machines in a database system each use code pages, which can be identified by a name or
a number, such as Shift_JIS (Japanese) or cp1252 (Windows English). A code page is a mapping that associates
a sequence of bits, called a code point, with a specific character. Code pages include the characters and
symbols of one or more languages. Regardless of geographical location, a machine can be configured to use
a specific code page. Most of the time, a client and database server would use similar, if not identical, code
pages. For example, a client and server might use two different Japanese code pages, such as Shift_JIS and
EUC_JP, but they would still share many Japanese characters in common. These characters might, however,
be represented by different code points in each code page. This introduces the need to convert between code
pages to maintain data integrity. In some cases, no one-to-one character correspondence exists between the
two code points. This causes a substitution character to be used, which can result in displaying an unexpected
character on a fetch.
When the driver on the client machine opens a connection with the database server, the driver determines the
code pages being used on the client and the server. This is determined from the Active Code Page on a
Windows-based machine.
If the client and server code pages are compatible, the driver transmits data in the code page of the server.
Even though the pages are compatible, a one-to-one correspondence for every character may not exist. If the
client and server code pages are completely dissimilar, for example, Russian and Japanese, then many
substitutions occur because very few, if any, of the characters are mapped between the two code pages.
The following is a specific example of an unexpected character:
1042 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Sybase IQ Wire Protocol Driver
This occurs because the code points do not correspond in the two code pages. An example of syntax you
would use to insert the decimal literals is:
CREATE table cp850chars(val text)
INSERT INTO cp850chars values(CHAR(161)+CHAR(186))
This effectively inserts the hexadecimal bytes for the numbers 161 (0xA1) and 186 (0xBA) into the text column.
Each of these hexadecimal bytes is treated as the single byte code point for the character it represents. The
problem is that the character representation for these two particular hexadecimal values is different from code
page cp850 to code page cp1252. On cp850, these hexadecimal values represent í (0xA1) and || (0xBA), which
is what you thought you were inserting by using the previously described syntax. When you fetch these
hexadecimal values, however, the characters displayed on your client machine are ¡ (0xA1) and º (0xBA),
because that is what the hexadecimal values represent in code page cp1252. This is not a matter of data
corruption or substitution; these hexadecimal values simply represent different values in the two different code
pages.
This is not a driver error. It occurs because the code points map differently and because some characters do
not exist in a code page. The best way to avoid these problems is to use the same code page on both the client
and server machines.
NULL Values
When the Sybase IQ Wire Protocol driver establishes a connection, the driver sets the Sybase database option
ansinull to on. Setting ansinull to on ensures that the driver is compliant with the ANSI SQL standard, which
makes developing cross-database applications easier.
By default, Sybase IQ does not evaluate NULL values in SQL equality (=), inequity (<>), or aggregate function
comparisons in an ANSI SQL-compliant manner. For example, the ANSI SQL specification defines that
col1=NULL always evaluates to false:
Using the default database setting (ansinull=off), the same comparison evaluates to true instead of false.
Setting ansinull to on changes the default database behavior so that SQL statements must use IS NULL
instead of =NULL. For example, using the Sybase IQ Wire Protocol driver, if the value of col1 in the following
statement is NULL, the comparison evaluates to true:
SELECT * FROM table WHERE col1 IS NULL
In your application, you can restore the default Sybase IQ behavior for a connection in the following ways:
• Use the Initialization String option to specify the SQL command set ANSINULL off. For example, the
following connection string ensures that the handling of NULL values is restored to the Sybase IQ default
for the current connection:
DSN=SYB TABLES;DB=PAYROLL;IS=set ANSINULL off
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1043
Chapter 8: The Connect XE Drivers
SQL Support
The driver supports the minimum SQL grammar.
• SQLColumnPrivileges
• SQLForeignKeys
• SQLTablePrivileges
Refer to "ODBC API and scalar functions" in the Progress DataDirect for ODBC Drivers Reference for a list of
supported API functions.
1044 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for Apache Hive
The DataDirect Connect XE for ODBC and DataDirect Connect64 XE for ODBC for Apache Hive Wire Protocol
driver each support the following Apache Hive versions and distributions:
Driver Requirements
The driver has no client requirements.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1045
Chapter 8: The Connect XE Drivers
Data sources for UNIX and Linux are stored in the system information file (by default, odbc.ini). You can
configure and modify data sources directly by editing the odbc.ini file and storing default connection values
there. See Configuration Through the System Information (odbc.ini) File on page 117 for detailed information
about the specific steps necessary to configure a data source.
Connection Option Descriptions for Apache Hive on page 1052 lists driver connection string attributes that must
be used in the odbc.ini file to set the value of the attributes. Note that only the long name of the attribute can
be used in the file. The default listed in the table is the initial default value when the driver is installed.
On Windows, data sources are stored in the Windows Registry. You can configure and modify data sources
through the ODBC Administrator using a driver Setup dialog box, as described in this section.
On UNIX and Linux, data sources are stored in the odbc.ini file.
When the driver is first installed, the values of its connection options are set by default. These values appear
on the driver Setup dialog box tabs when you create a new data source. You can change these default values
by modifying the data source. In the following procedure, the description of each tab is followed by a table that
lists the connection options for that tab and their initial default values. This table links you to a complete
description of the options and their connection string attribute equivalents. The connection string attributes are
used to override the default values of the data source if you want to change these values at connection time.
• On Windows, start the ODBC Administrator by selecting its icon from the Datadirect Connect program
group.
2. Select a tab:
• User DSN: If you are configuring an existing user data source, select the data source name and click
Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the
driver and click Finish to display the driver Setup dialog box.
• System DSN: If you are configuring an existing system data source, select the data source name and
click Configure to display the driver Setup dialog box.
If you are configuring a new system data source, click Add to display a list of installed drivers. Select
the driver and click Finish to display the driver Setup dialog box.
• File DSN: If you are configuring an existing file data source, select the data source file and click Configure
to display the driver Setup dialog box.
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select
a driver. Click Advanced if you want to specify attributes; otherwise, click Next to proceed. Specify a
name for the data source and click Next. Verify the data source information; then, click Finish to display
the driver Setup dialog box.
1046 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for Apache Hive
Note: The General tab displays only fields that are required for creating a data source. The fields on all
other tabs are optional, unless noted otherwise.
3. On this tab, provide values for the options in the following table; then, click Apply. The table provides links
to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1047
Chapter 8: The Connect XE Drivers
4. Optionally, click the Advanced tab to specify additional data source settings.
Figure 114: Advanced tab
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
1048 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for Apache Hive
Default Buffer Size for Long/LOB Columns (in Kb) on page 1060 1024
Extended Options: Type a semi-colon separated list of connection options and their values. Use this
configuration option to set the value of undocumented connection options that are provided by Progress
DataDirect customer support. You can include any valid connection option in the Extended Options string,
for example:
Database=Server1; UndocumentedOption1=value[;UndocumentedOption2=value;]
If the Extended Options string contains option values that are also set in the setup dialog or data source,
the values of the options specified in the Extended Options string take precedence. However, connection
options that are specified on a connection string override any option value specified in the Extended Options
string.
Note: Do not specify the Extended Options configuration option in a connection string, or the driver will
return an error. Instead, applications should specify the individual undocumented connection options in the
connection string.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1049
Chapter 8: The Connect XE Drivers
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
6. At any point during the configuration process, you can click Test Connect to attempt to connect to the data
source using the connection options specified in the driver Setup dialog box. A logon dialog box appears
(see Using a Logon Dialog Box (Hive) on page 1051) for details). Note that the information you enter in the
logon dialog box during a test connect is not saved.
• If the driver can connect, it releases the connection and displays a Connection Established message.
Click OK.
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message. Click OK.
Note: If you are configuring alternate servers for use with the connection failover feature, be aware that
the Test Connect button tests only the primary server, not the alternate servers.
7. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
1050 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for Apache Hive
DSN=data_source_name[;attribute=value[;attribute=value]...]
FILEDSN=filename.dsn[;attribute=value[;attribute=value]...]
The DSN-less connection string specifies a driver instead of a data source. All connection information must be
entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
Connection Option Descriptions for Apache Hive on page 1052 lists the long and short names for each attribute,
as well as the initial default value when the driver is first installed. You can specify either long or short names
in the connection string.
An example of a DSN connection string with overriding attribute values for Hive is:
DSN=Accounting;UID=JOHN;PWD=XYZZY
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1051
Chapter 8: The Connect XE Drivers
Note: A user name and password are not required to connect to Hive.
Note: To configure a standard connection, complete the first two fields and skip to Step 4.
1. In the Host field, type either the name or the IP address of the server to which you want to connect.
2. The IP address can be specified in either IPv4 or IPv6 format, or a combination of the two. See Using IP
Addresses on page 67 for details concerning these formats.
3. In the Port Number field, type the port number that your Hive server is listening on. Check with your Hive
administrator for the correct number.
4. Click OK to log on to the Apache Hive server you specified and to update the values in the Registry.
Note: The User Name and Password fields are not used at this time to connect to Apache Hive Server.
Table 86: Attribute Names for the Driver for Apache Hive
1052 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for Apache Hive
LoginTimeout (LT) 30
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1053
Chapter 8: The Connect XE Drivers
AllowedOpenSSLVersions
Attribute
AllowedOpenSSLVersions (AOV)
Purpose
Important: Version 1.0.2 of the OpenSSL library has reached the end of its product life cycle and is no longer
receiving security updates. Best security practices dictate that you use the latest version of the library.
Determines which version of the OpenSSL library file the driver uses for data encryption. Although the latest
version of the OpenSSL library is the most secure, some characteristics of the library can cause connections
to certain databases to fail. This option allows you to continue using older versions of the OpenSSL library
while you transition your environment to support the latest version.
Valid Values
latest | openssl_version_number[[,openssl_version_number]...]
where:
openssl_version_number
is the version number for the OpenSSL library file to be loaded by the driver, for example, 1.0.2.
When more than one version is specified, the driver will first attempt to load the first version listed.
If the driver is unable to locate and load this file, it will attempt to load the next version in the value.
The driver currently supports versions 1.1.1 and 1.0.2. Refer to the installed readme for latest
supported versions.
Behavior
If set to latest, the driver loads the latest installed version of the OpenSSL library file provided by Progress.
If set to openssl_version_number, the driver loads the specified version of the OpenSSL library file. This
value is used to specify a version other than the latest.
1054 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for Apache Hive
Notes
• This option is ignored if OpenSSL library files are specified using the CryptoLibName and SSLLibName
options.
• This option works only with OpenSSL library files provided by Progress and user supplied OpenSSL library
files that match Progress's naming convention and installation location.
• This option works only for installations using the default directory structure.
• Consult your database administrator concerning the security settings of your server.
Default
1.1.1,1.0.2
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
AllowedOpenSSLVersions=1.0.2
See also
• Advanced tab
Array Size
Attribute
ArraySize (AS)
Purpose
The number of cells the driver retrieves from a server for a fetch. When executing a fetch, the driver divides
the value specified by the number columns in a particular table to determine the number of rows to retrieve.
By determining the fetch size based on the number of cells, the driver can avoid out of memory errors when
fetching from tables containing a large number of columns while continuing to provide improved performance
when fetching from tables containing a small number of columns.
Valid Values
x
where:
is a positive integer specifying the number of cells the driver retrieves for a fetch.
Notes
• You can improve performance by increasing the value specified for this option; however, if the number of
cells specified exceeds the available buffer memory for the Apache Hive server, an out of memory error will
be returned. If you receive this error, decrease the value specified until fetches are successfully executed.
• This connection option can affect performance.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1055
Chapter 8: The Connect XE Drivers
Default
50000
GUI Tab
Advanced tab
See Also
See Performance Considerations on page 1078 for details.
Authentication Method
Attribute
AuthenticationMethod (AM)
Purpose
Specifies the method the driver uses to authenticate the user to the server when a connection is established.
If the specified authentication method is not supported by the database server, the connection fails and the
driver generates an error.
Valid Values
0 | 4 | -1
Behavior
If set to 0 (User ID/Password), the driver sends the user ID in clear text and an encrypted password to the
server for authentication.
If set to 4 (Kerberos Authentication), the driver uses Kerberos authentication. This method supports both
Windows Active Directory Kerberos and MIT Kerberos environments.
If set to -1 (No Authentication), the driver sends the user ID and password in clear text to the server for
authentication.
Default
0 (User ID/Password)
GUI Tab
Security tab
Batch Mechanism
Attribute
BatchMechanism (BM)
1056 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for Apache Hive
Purpose
Determines the mechanism that is used to execute batch operations.
Valid Values
1|2
Behavior
If set to 1 (SingleInsert), the driver executes an insert statement for each row contained in a parameter array.
Select this setting if you are experiencing out-of-memory errors when performing batch inserts.
If set to 2 (MultiRowInsert), the driver attempts to execute a single insert statement for all the rows contained
in a parameter array. If the size of the insert statement exceeds the available buffer memory of the driver, the
driver executes multiple statements. Select this setting for substantial performance gains when performing
batch inserts.
Default
2 (MultiRowInsert)
Notes
• This connection option can affect performance.
GUI Tab
Advanced tab
See Also
See Performance Considerations on page 1078 for details.
Attribute
CryptoProtocolVersion (CPV)
Purpose
Specifies a comma-separated list of the cryptographic protocols to use when SSL is enabled using the Encryption
Method connection option (EncryptionMethod=1). When multiple protocols are specified, the driver uses the
highest version supported by the server. If none of the specified protocols are supported by the database
server, behavior is determined by the setting of the EncryptionMethod connection option.
Valid Values
cryptographic_protocol [[, cryptographic_protocol ]...]
where:
cryptographic_protocol
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1057
Chapter 8: The Connect XE Drivers
Caution: Good security practices recommend using TLSv1 or higher, due to known vulnerabilities in the SSLv2
and SSLv3 protocols.
Example
If your security environment is configured to use TLSv1.2 and TLSv1.1, specify the following values:
CryptoProtocolVersion=TLSv1.2, TLSv1.1
Notes
• This option is ignored if Encryption Method is set to 0 - No Encryption.
• Consult your database administrator concerning the data encryption settings of your server.
Default
TLSv1.2,TLSv1.1,TLSv1
GUI Tab
Security tab
See also
Encryption Method on page 1062
CryptoLibName
Attribute
CryptoLibName (CLN)
Purpose
The absolute path for the OpenSSL library file containing the cryptographic library to be used by the data source
or connection when TLS/SSL is enabled. The cryptograpic library contains the implementations of cryptographic
algorithms the driver uses for data encryption.
This option allows you to designate a different cryptographic library if you encounter issues with the default
version or want to use a library that you provide. Common issues that require designating a different library
include security vulnerabilities with specific libraries or compatibility issues with your server or application.
Valid Values
absolute_path\openssl_filename
where:
absolute_path
openssl_filename
is the name of the OpenSSL library file containing the cryptographic library to be used by your data
source or connection.
1058 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for Apache Hive
Example
C:\Progress\DataDirect\Connect64_for_ODBC_71\
Drivers\OpenSSL\1.0.0r\ddssl27.dll (64-bit Windows)
Notes
• The OpenSSL library files provided by Progress combine the cryptographic and TLS/SSL libraries into a
single file; therefore, when your drivers are using a Progress library file, the values specified for the
CryptoLibName and SSLLibName options should be the same. For non-Progress library files, the libraries
may use separate files, which would require unique values to be specified.
• This option can be used to designate OpenSSL libraries not installed by the product; however, the drivers
are only certified against libraries provided by Progress.
Default
Empty string
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
CryptoLibName=C:\Program Files\Progress\DataDirect\
Connect64_for_ODBC_71\Drivers\OpenSSL\1.0.0r\ddssl27.dll;
See Advanced tab for details.
See also
SSLLibName on page 1071
Attribute
DataSourceName (DSN)
Purpose
Specifies the name of a data source in your Windows Registry or odbc.ini file.
Valid Values
string
where:
string
Default
None
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1059
Chapter 8: The Connect XE Drivers
GUI Tab
General tab
Database
Attribute
Database (DB)
Purpose
Specifies the name of the Hive database. The database must exist, or the connection attempt will fail.
Valid Values
database_name
where:
database_name
Default
default
GUI Tab
General tab
Attribute
DefaultLongDataBuffLen (DLDBL)
Purpose
The maximum length of data (in KB) the driver can fetch from long columns in a single round trip and the
maximum length of data that the driver can send using the SQL_DATA_AT_EXEC parameter.
Valid Values
An integer in multiples of 1024
The value must be in multiples of 1024 (for example, 1024, 2048). You need to increase the default value if
the total size of any Long data exceeds 1 MB. This value is multiplied by 1024 to determine the total maximum
length of fetched data. For example, if you enter a value of 2048, the maximum length of data would be 1024
x 2048, or 2097152 (2 MB).
Notes
• This connection option can affect performance.
1060 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for Apache Hive
Default
1024
GUI tab
Advanced tab
See Also
See Performance Considerations on page 1078 for details.
Description
Attribute
Description (n/a)
Purpose
Specifies an optional long description of a data source. This description is not used as a runtime connection
attribute, but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Enable SQLDescribeParam
Attribute
EnableDescribeParam (EDP)
Purpose
Determines whether the driver uses the SQLDescribeParam function, which describes parameters as a data
type of SQL_VARCHAR with a length of 255 for statements.
Valid Values
0|1
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1061
Chapter 8: The Connect XE Drivers
Behavior
If set to 1 (enabled), the SQLDescribeParam function describes parameters as a data type of SQL_VARCHAR
with a length of 255 for statements.
If set to 0 (disabled), the SQLDescribeParam function returns the standard ODBC error IM001.
Default
0 (Disabled)
GUI tab
Advanced tab
Encryption Method
Attribute
EncryptionMethod (EM)
Purpose
The method the driver uses to encrypt data sent between the driver and the database server. If the specified
encryption method is not supported by the database server, the connection fails and the driver returns an error.
Valid Values
0|1
Behavior
If set to 0 (No Encryption), data is not encrypted.
If set to 1 (SSL), data is encrypted using the SSL protocols specified in the Crypto Protocol Version connection
option.
Notes
• This connection option can affect performance.
Default
0 (No Encryption)
GUI Tab
Security tab
See also
Performance Considerations on page 1078
Attribute
GSSClient (GSSC)
1062 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for Apache Hive
Purpose
The name of the GSS client library that the driver uses to communicate with the Key Distribution Center (KDC).
The driver uses the path defined by the PATH environment variable for loading the specified client library.
Valid Values
native | client_library
where:
client_library
Behavior
If set to client_library, the driver uses the specified GSS client library.
Note: For MIT Kerberos distributions, you must provide a full path to the MIT Library. For example, the 64-bit
version for Windows would use the following value: C:\Program
Files\MIT\Kerberos\bin\gssapi64.dll.
If set to native, the driver uses the GSS client for Windows Kerberos. All other users must provide the full
path to the library name.
Default
native
GUI Tab
Security tab
Host Name
Attribute
HostName (HOST)
Purpose
The name or the IP address of the server to which you want to connect.
Valid Values
host_name | IP_address
where:
hostname
is the name of the Apache Hive server to which you want to connect
IP_address
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1063
Chapter 8: The Connect XE Drivers
Default
None
GUI Tab
General tab
Attribute
HostNameInCertificate (HNIC)
Purpose
A host name for certificate validation when SSL encryption is enabled (Encryption Method=1) and validation
is enabled (Validate Server Certificate=1). This option provides additional security against man-in-the-middle
(MITM) attacks by ensuring that the server the driver is connecting to is the server that was requested.
Valid Values
host_name | #SERVERNAME#
where:
host_name
is the host name specified in the certificate. Consult your SSL administrator for the correct value.
Behavior
If host_name is specified, the driver examines the subjectAltName values included in the certificate. If a
dnsName value is present in the subjectAltName values, then the driver compares the value specified for Host
Name In Certificate with the dnsName value. The connection succeeds if the values match. The connection
fails if the Host Name In Certificate value does not match the dnsName value.
If no subjectAltName values exist or a dnsName value is not in the list of subjectAltName values, then the
driver compares the value specified for Host Name In Certificate with the commonName part of the Subject
name in the certificate. The commonName typically contains the host name of the machine for which the
certificate was created. The connection succeeds if the values match. The connection fails if the Host Name
In Certificate value does not match the commonName. If multiple commonName parts exist in the Subject
name of the certificate, the connection succeeds if the Host Name In Certificate value matches any of the
commonName parts.
If #SERVERNAME# is specified, the driver compares the host server name specified as part of a data source or
connection string to the dnsName or the commonName value.
Default
None
GUI Tab
Security tab
1064 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for Apache Hive
Key Password
Attribute
KeyPassword (KP)
Purpose
Specifies the password used to access the individual keys in the keystore file when SSL is enabled (Encryption
Method=1) and SSL client authentication is enabled on the database server. Keys stored in a keystore can be
individually password-protected. To extract the key from the keystore, the driver must have the password of
the key.
Valid Values
key_password
where:
key_password
Default
None
GUI Tab
Security tab
Key Store
Attribute
Keystore (KS)
Purpose
The name of the directory containing the keystore file to be used when SSL is enabled (Encryption Method=1)
and SSL client authentication is enabled on the database server. The keystore file contains the certificates that
the client sends to the server in response to the server’s certificate request. If you do not specify a directory,
the current directory is used.
Valid Values
keystore_directory
where:
keystore_directory
Notes
• The keystore and truststore files can be the same file.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1065
Chapter 8: The Connect XE Drivers
Default
None
GUI Tab
Security tab
Keystore Password
Attribute
KeystorePassword (KSP)
Purpose
The password used to access the keystore file when SSL is enabled (Encryption Method=1) and SSL client
authentication is enabled on the database server. The keystore file contains the certificates that the client sends
to the server in response to the server’s certificate request.
Valid Values
keystore_password
where:
keystore_password
Notes
• The keystore and truststore files may be the same file; therefore, they may have the same password.
Default
None
GUI Tab
Security tab
Login Timeout
Attribute
LoginTimeout (LT)
Purpose
The number of seconds the driver waits for a connection to be established before returning control to the
application and generating a timeout error. To override the value that is set by this connection option for an
individual connection, set a different value in the SQL_ATTR_LOGIN_TIMEOUT connection attribute using
the SQLSetConnectAttr() function.
1066 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for Apache Hive
Valid Values
-1 | 0 | x
where:
Behavior
If set to -1, the connection request does not time out. The driver silently ignores the
SQL_ATTR_LOGIN_TIMEOUT attribute.
If set to 0, the connection request does not time out, but the driver responds to the SQL_ATTR_LOGIN_TIMEOUT
attribute.
If set to x, the connection request times out after the specified number of seconds unless the application
overrides this setting with the SQL_ATTR_LOGIN_TIMEOUT attribute.
Default
30
GUI Tab
Advanced tab
Attribute
MaxVarcharSize (MVS)
Purpose
Specifies the maximum size of columns of type SQL_VARCHAR that the driver describes through result set
descriptions and catalog functions.
Valid Values
A positive integer from 255 to x
where:
Default
2147483647
GUI Tab
Advanced tab
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1067
Chapter 8: The Connect XE Drivers
Password
Attribute
Password (PWD)
Purpose
The password that the application uses to connect to your database. The Password option cannot be specified
through the driver Setup dialog box and should not be stored in a data source. It is specified through the Logon
dialog box or a connection string.
Valid Values
pwd
where:
pwd
is a valid password.
Default
None
GUI Tab
n/a
Port Number
Attribute
PortNumber (PORT)
Purpose
Specifies the port number of the server listener.
Valid Values
port_number
where:
port_number
is the port number of the server listener. Check with your database administrator for the correct
number.
Notes
• The default port number for the Apache Hive server is 10000. Because of reported concurrency issues, you
might want to use a different port number.
1068 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for Apache Hive
Default
10000
GUI Tab
General tab
Proxy User
Attribute
ProxyUser (PU)
Purpose
Specifies the UserID used for HiveServer2 Impersonation and HiveServer2 Trusted Impersonation. When
impersonation is enabled on the server, this value determines your identity and access rights to files when
executing queries. If no value is provided for this option or if impersonation is disabled, you will execute queries
as the user who initiated the HiveServer process.
Impersonation provides a method for administrators to control access to data. Administrators set access rights
to files by using HDFS and directory permissions on the server.
Valid Values
userid
where:
userid
Default
None
Notes
• Impersonation is not supported for HiveServer1 connections.
GUI Tab
Security tab
Attribute
RemoveColumnQualifiers (RCQ)
Purpose
Specifies whether the driver removes 3-part column qualifiers and replaces them with alias.column qualifiers.
Microsoft Access executes a Select statement using this syntax when an index is specified on a linked table.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1069
Chapter 8: The Connect XE Drivers
Valid Values
0|1
Behavior
If set to 1 (enabled) the driver removes 3-part column qualifiers and replaces them with alias.column qualifiers.
Column qualifiers are Microsoft Access compatible in this setting.
If set to 0, the driver does not modify the request.
Notes
• When using the driver with Microsoft Access in creating a linked table, it is highly recommended that you
do not specify an index. Specifying an index causes Access to execute a Select statement for each row,
which results in very slow performance.
Default
0 (Disabled)
GUI Tab
Advanced tab
Attribute
ServicePrincipalName (SPN)
Purpose
This option is supported only for HiveServer2 connections. The service principal name to be used by driver for
Kerberos authentication.
Valid Values
ServicePrincipalName
where:
ServicePrincipalName
is the three-part service principal name registered with the key distribution center (KDC).
You must specify the service principal name using the following format:
Service_Name/[email protected]
where:
Service_Name
is the name of the service hosting the instance. For example, yourservicename.
1070 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for Apache Hive
Depending on the Hive distribution you use, the name of the service is defined either automatically
by the server or manually by the user who created the service. For instance, CDH distributions
automatically generate a service name of hive, while Apache Hadoop distributions require that the
service name be manually defined by the user. Refer to your distribution's documentation for additional
information.
Fully_Qualified_Domain_Name
is the fully qualified domain name of the host machine. For example, yourserver.example.com.
REALM.COM
is the domain name of the host machine. This part of the value must be specified in upper-case
characters. For example, EXAMPLE.COM.
Example
The following is an example of a valid service principal name:
yourservicename/[email protected]
Notes
• If unspecified, the value of the Network Address option is used as the service principal name.
• If Authentication Method is set to 0 or -1, the value of the Service Principal Name option is ignored.
Default
None
GUI Tab
Security tab
SSLLibName
Attribute
SSLLibName (SLN)
Purpose
The absolute path for the OpenSSL library file containing the TLS/SSL library to be used by the data source
or connection when TLS/SSL is enabled. The SSL library contains the implementations of TLS/SSL protocols
the driver uses for data encryption.
This option allows you to designate a different SSL library if you encounter issues with the default version or
want to use a library that you provide. Common issues that require designating a different library include security
vulnerabilities with specific libraries or compatibility issues with your server or application.
Valid Values
absolute_path\openssl_filename
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1071
Chapter 8: The Connect XE Drivers
absolute_path
openssl_filename
is the name of the OpenSSL library file containing the TLS/SSL Library to be used by your data
source or connection.
Example
C:\Program Files\Progress\DataDirect\ODBC_71\
Drivers\OpenSSL\1.0.0r\ddssl27.dll (64-bit Windows)
Notes
• The OpenSSL library files provided by Progress combine the cryptographic and TLS/SSL libraries into a
single file; therefore, when your drivers are using a Progress library file, the values specified for the
CryptoLibName and SSLLibName options should be the same. For non-Progress library files, the libraries
may use separate files, which would require unique values to be specified.
• This option can be used to designate OpenSSL libraries not installed by the product; however, the drivers
are only certified against libraries provided by Progress.
Default
No default value
GUI Tab
The value for this option is specified as an option-value pair in the Extended Options field on the Advanced
tab. For example:
SSLLibName=C:\Program Files\Progress\DataDirect\
Connect64_for_ODBC_71\Drivers\OpenSSL\1.0.0r\ddssl27.dll;
See Advanced tab for details.
See also
CryptoLibName on page 1058
Attribute
StringDescribeType (SDT)
Purpose
Specifies whether all string columns are described as SQL_VARCHAR. This connection option affects
SQL_Columns, SQLDescribeCol, SQLColAttributes, etc. It does not affect SQLGetTypeInfo.
Valid Values
-10 | -9 | -1 | 12
1072 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for Apache Hive
Behavior
If set to -10 -(SQL_WLONGVARCHAR), all strings are described as SQL_WLONGVARCHAR
If set to -9 -(SQL_WVARCHAR), all string columns are described as SQL_WVARCHAR.
If set to -1 -(SQL_LONGVARCHAR), all string columns are described as SQL_LONGVARCHAR.
If set to 12 -( SQL_VARCHAR), all string columns are described as SQL_VARCHAR.
Default
12 - SQL_VARCHAR
GUI Tab
Advanced tab
Attribute
KeepAlive (KA)
Purpose
Specifies whether the driver enables TCPKeepAlive. TCPKeepAlive maintains idle TCP connections by
periodically passing packets between the client and server. If either the client or server does not respond to a
packet, the connection is considered inactive and is terminated. In addition, TCPKeepAlive prevents valid idle
connections from being disconnected by firewalls and proxies by maintaining network activity.
Valid Values
0|1
Behavior
If set to 0 (Disabled), the driver does not enable TCPKeepAlive.
If set to 1 (Enabled), the driver enables TCPKeepAlive.
Default
0 (Disabled)
GUI Tab
Advanced tab
Transaction Mode
Attribute
TransactionMode (TM)
Purpose
Specifies how the driver handles manual transactions.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1073
Chapter 8: The Connect XE Drivers
Valid Values
0|1
Behavior
If set to 1 (Ignore), the data source does not support transactions and the driver always operates in auto-commit
mode. Calls to set the driver to manual commit mode and to commit transactions are ignored. Calls to rollback
a transaction cause the driver to return an error indicating that no transaction is started. Metadata indicates
that the driver supports transactions and the ReadUncommitted transaction isolation level.
If set to 0 (No Transactions), the data source and the driver do not support transactions. Metadata indicates
that the driver does not support transactions.
Default
0 (No Transactions)
GUI Tab
Advanced tab
Truststore
Attribute
Truststore (TS)
Purpose
The directory that contains the truststore file and the truststore file name to be used when SSL is enabled
(Encryption Method=1) and server authentication is used. The truststore file contains a list of the valid Certificate
Authorities (CAs) that are trusted by the client machine for SSL server authentication. If you do not specify a
directory, the current directory is used.
Valid Values
truststore_directory\filename
where:
truststore_directory
filename
Notes
• The truststore and keystore files may be the same file.
Default
None
1074 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for Apache Hive
GUI Tab
Security tab
Attribute
TruststorePassword (TSP)
Purpose
Specifies the password that is used to access the truststore file when SSL is enabled (Encryption Method=1)
and server authentication is used. The truststore file contains a list of the Certificate Authorities (CAs) that the
client trusts.
Valid Values
truststore_password
where:
truststore_password
Notes
• The truststore and keystore files may be the same file; therefore, they may have the same password.
Default
None
GUI Tab
Security tab
Attribute
UseCurrentSchema (UCS)
Purpose
Specifies whether results are restricted to the tables and views in the current schema if a catalog function call
is made without specifying a schema or if the schema is specified as the wildcard character %. Restricting
results to the tables and views in the current schema improves performance of catalog calls that do not specify
a schema.
Valid Values
0|1
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1075
Chapter 8: The Connect XE Drivers
Behavior
If set to 1 (Enabled), results of catalog function calls are restricted to the tables and views in the current schema.
If set to 0 (Disabled), results of catalog function calls are not restricted.
Default
0 (Disabled)
GUI Tab
Advanced tab
Attribute
UseNativeCatalogFunctions (UNCF)
Purpose
This option is supported only for HiveServer2 connections. Specifies whether the driver uses native catalog
functions to retrieve information returned by the SQLTables, SQLColumns, and SQLStatistics catalog functions.
Valid Values
0|1
Behavior
If set to 0 (Disabled), the driver uses ODBC catalog functions to retrieve data source information.
If set to 1 (Enabled), the driver uses native catalog functions to retrieve information returned by the SQLTables,
SQLColumns, and SQLStatistics catalog functions.
Default
0 (Disabled)
GUI Tab
Advanced tab
User Name
Attribute
LogonID (UID)
Purpose
The default user ID that is used to connect to your database. Your ODBC application may override this value
or you may override it in the logon dialog box or connection string.
Valid Values
N/A
1076 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for Apache Hive
GUI Tab
Security tab
Attribute
ValidateServerCertificate (VSC)
Purpose
Determines whether the driver validates the certificate that is sent by the database server when SSL encryption
is enabled (Encryption Method=1). When using SSL server authentication, any certificate sent by the server
must be issued by a trusted Certificate Authority (CA). Allowing the driver to trust any certificate returned from
the server even if the issuer is not a trusted CA is useful in test environments because it eliminates the need
to specify truststore information on each client in the test environment.
Valid Values
0|1
Behavior
If set to 1 (Enabled), the driver validates the certificate that is sent by the database server. Any certificate from
the server must be issued by a trusted CA in the truststore file. If the Host Name In Certificate option is specified,
the driver also validates the certificate using a host name. The Host Name In Certificate option provides
additional security against man-in-the-middle (MITM) attacks by ensuring that the server the driver is connecting
to is the server that was requested.
If set to 0 (Disabled), the driver does not validate the certificate that is sent by the database server. The driver
ignores any truststore information specified by the Trust Store and Trust Store Password options.
Notes
• Truststore information is specified using the TrustStore and TrustStorePassword options.
Default
1 (Enabled)
GUI Tab
Security tab
Attribute
WireProtocolVersion (WPV)
Purpose
Indicates which protocol to use when connecting to the Apache Hive server.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1077
Chapter 8: The Connect XE Drivers
Valid Values
0|1|2
Behavior
If set to 0 (AutoDetect), the driver tries to connect using the HiveServer1 protocol and the HiveServer2 protocol
simultaneously. Whichever server socket accepts the connection is the one that the driver continues to use for
subsequent connections. For example, if the server socket accepts a connection request using the HiveServer2
protocol, subsequent connections from the driver use the same socket and protocol.
If set to 1 (HiveServer1), the driver only uses the HiveServer1 protocol to communicate with the server.
If set to 2 (HiveServer2), the driver only uses the HiveServer2 protocol to communicate with the server.
Notes
• If the protocol specified for WireProtocolVersion is not accepted by the Hive server to which you are
connecting, the connection fails with a login timeout error, if LoginTimeout is enabled. For example, a login
timeout error would be returned if you specify WireProtocolVersion=2 and the driver attempts to connect
to an Apache Hive server that only accepts connections using the HiveServer1 protocol.
Default
0 (AutoDetect)
GUI Tab
General tab
Performance Considerations
The following connection options can enhance driver performance.
Array Size (ArraySize): To improve throughput, consider increasing the value of Array Size. By increasing
the value of Array Size, you increase the number of rows the driver will retrieve from the server for a fetch. In
turn, increasing the number of rows that the driver can retrieve reduces the number, and expense, of network
round trips. For example, if an application attempts to fetch 100,000 rows, it is more efficient for the driver to
retrieve 2000 rows over the course of 50 round trips than to retrieve 500 rows over the course of 200 round
trips. Note that improved throughput does come at the expense of increased demands on memory and slower
response time. Furthermore, if the fetch size exceeds the available buffer memory of the server, an out of
memory error is returned when attempting to execute a fetch. If you receive this error, decrease the value
specified until fetches are successfully executed.
Batch Mechanism (BatchMechanism): If your application does not require individual update counts for each
statement or parameter set in the batch, then BatchMechanism should be set to 2 (MultiRowInsert). Unlike the
native batch mechanism, the multi-row insert mechanism only returns the total number of update counts for
batch inserts. Therefore, setting BatchMechanism to MultiRowInsert offers substantial performance gains when
performing batch inserts.
Encryption Method (EncryptionMethod): Data encryption may adversely affect performance because of the
additional overhead (mainly CPU usage) that is required to encrypt and decrypt data.
Data Types
The following table shows how the Apache Hive data types are mapped to the standard ODBC data types.
1078 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for Apache Hive
Bigint SQL_BIGINT
Boolean SQL_BIT
80
Char SQL_CHAR
Date SQL_DATE
82, 83
Decimal SQL_DECIMAL
Double SQL_DOUBLE
Float SQL_REAL
Int SQL_INTEGER
Smallint SQL_SMALLINT
84 85
String SQL_VARCHAR
85
Timestamp SQL_TYPE_TIMESTAMP
Tinyint SQL_TINYINT
81
Varchar SQL_VARCHAR
Advanced Features
The driver supports the following advanced features:
• Security
Security
The driver supports authentication and encryption. Security connection options are located on the Security tab
of the driver Setup dialog box. See Using Security on page 89 for a general description of security and its
implementation. The following security-related information is specific to the Driver for Apache Hive.
80
Supported only with Apache Hive 0.13.0 and higher.
81
Supported only with Apache Hive 0.12.0 and higher
82
Supported only with Apache Hive 0.11.0 and higher.
83
The default precision and scale for the DECIMAL data type changed in Hive 0.13. For versions prior to Hive 0.13, the precision
and scale are fixed and limited to 38 digits each. For Hive 0.13 and higher, the precision and scale are flexible with a default of
10 digits for precision and 0 digits for scale. When upgrading to Hive 0.13, you may need to change the length of precision and
scale to avoid the rounding of values that exceed the default length. Refer to the Apache Hive user documentation for more
information: https://cwiki.apache.org/confluence/display/Hive/Home.
85
Maximum of 2 GB
84
The StringDescribeType connection option setting determines where this data type maps. For example, if set to sql_varchar
(the default), this data type maps to SQL_VARCHAR
86
Supported only with Apache Hive 0.8.0 and higher.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1079
Chapter 8: The Connect XE Drivers
Apache Sentry
Apache Sentry is a modular security system that enables HiveServer2 administrators to control access to data
and metadata stored on an Apache Hadoop cluster by defining user roles and permissions. The driver works
transparently with Sentry and does not require further configuration. To use Sentry, Kerberos authentication
must be enabled, and a Kerberos logon must be provided at connection.
Note: When establishing a connection, the driver attempts to set the user's default database to be used for
the session. In environments using Sentry, the user must be granted access to this database; otherwise, the
connection will fail.
Materialized Views
Apache Hive supports views but purely as logical objects with no associated storage. As such, there is no
support for materialized views in Hive; therefore, the driver does not support materialized views.
Stored Procedures
Apache Hive has no concept of stored procedures. Therefore, they are not supported in the driver.
Unicode Support
The driver is fully Unicode enabled. On UNIX and Linux platforms, the driver supports both UTF-8 and UTF-16.
On Windows platforms, the Hive driver supports UCS-2/UTF-16 only.
The driver supports the Unicode ODBC W (Wide) function calls, such as SQLConnectW. This allows the Driver
Manager to transmit these calls directly to the driver. Otherwise, the Driver Manager would incur the additional
overhead of converting the W calls to ANSI function calls, and vice versa.
See UTF-16 Applications on UNIX and Linux on page 137 for related details.
Also, refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers
Reference for a more detailed explanation of Unicode.
SQL Support
The driver supports the core SQL grammar.
Refer to the Hive Language Manual for information about using HiveQL.
Also, see SQL Functionality for the Driver for Apache Hive.
1080 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for Apache Hive
Refer to "ODBC API and scalar functions" in the Progress DataDirect for ODBC Drivers Reference for a list of
supported API functions.
Note: Note that Apache Hive is not designed for OLTP workloads and does not offer real-time queries or
row-level updates. Instead, Hive is designed for batch type jobs over large data sets with high latency. This
means that queries such as "SELECT * FROM mytable" return quickly. However, other SELECT statements
are much slower.
Note: Because Apache HiveServer1 servers do not currently handle multiple connections well, consider using
a single Apache HiveServer1 for each connection.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1081
Chapter 8: The Connect XE Drivers
Driver Requirements
The driver requires Teradata Tools and Utilities (TTU) 8.2 or higher, which includes CLIv2, TGSS, and ICU
client software, on all platforms. It requires TTU 12.0 to support 12.0 functionality.
Note: TTU 12.0 is not available for the Itanium II platform. You can use TTU 8.2 on an Itanium II client to
connect to a Teradata 12.0 database, but functionality is limited to that of TTU 8.2.
1082 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for the Teradata Database
DSN=data_source_name[;attribute=value[;attribute=value]...]
FILEDSN=filename.dsn[;attribute=value[;attribute=value]...]
The DSN-less connection string specifies a driver instead of a data source. All connection information must be
entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
Connection Option Descriptions on page 1089 lists the long and short names for each attribute, as well as the
initial default value when the driver is first installed. You can specify either long or short names in the connection
string.
An example of a DSN connection string with overriding attribute values for Teradata is:
DSN=Teradata Tables;AS=User2;EnableDataEncryption=Yes
On Windows, data sources are stored in the Windows Registry. You can configure and modify data sources
through the ODBC Administrator using a driver Setup dialog box, as described in this section.
On UNIX and Linux, data sources are stored in the odbc.ini file. On Linux, you can configure and
modify data sources through the Linux ODBC Administrator using a driver Setup dialog box, as described in
this section.
Note: This book shows dialog box images that are specific to Windows. If you are using the drivers in the
Linux environment, the dialog box that you see may differ slightly from the Windows version. Windows-only
and UNIX-only connection options are specifically noted by icons in the Setup dialog box descriptions.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1083
Chapter 8: The Connect XE Drivers
When the driver is first installed, the values of its connection options are set by default. These values appear
on the driver Setup dialog box tabs when you create a new data source. You can change these default values
by modifying the data source. In the following procedure, the description of each tab is followed by a table that
lists the connection options for that tab and their initial default values. This table links you to a complete
description of the options and their connection string attribute equivalents. The connection string attributes are
used to override the default values of the data source if you want to change these values at connection time.
To configure a Teradata data source:
• On Windows, start the ODBC Administrator by selecting its icon from the Progress DataDirect
program group.
2. Select a tab:
• User DSN: If you are configuring an existing user data source, select the data source name and click
Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the
driver and click Finish to display the driver Setup dialog box.
• System DSN: If you are configuring an existing system data source, select the data source name
and click Configure to display the driver Setup dialog box.
If you are configuring a new system data source, click Add to display a list of installed drivers. Select
the driver and click Finish to display the driver Setup dialog box.
• File DSN: If you are configuring an existing file data source, select the data source file and click Configure
to display the driver Setup dialog box.
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select
a driver. Click Advanced if you want to specify attributes; otherwise, click Next to proceed. Specify a
name for the data source and click Next. Verify the data source information; then, click Finish to display
the driver Setup dialog box.
1084 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for the Teradata Database
Note: The General tab displays only fields that are required for creating a data source. The fields on all
other tabs are optional, unless noted otherwise.
3. On this tab, provide values for the options in the following table; then, click Apply. The table provides links
to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1085
Chapter 8: The Connect XE Drivers
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
1086 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for the Teradata Database
5. Optionally, click the Advanced tab to specify additional data source settings.
Figure 119: Advanced tab
On this tab, provide values for any of the options in the following table; then, click Apply. The table provides
links to descriptions of the connection options.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1087
Chapter 8: The Connect XE Drivers
Translate: Click Translate to display the Select Translator dialog box, which lists the translators
specified in the ODBC Translators section of the Registry. Progress DataDirect provides a translator named
OEM to ANSI that translates your data from the IBM PC character set to the ANSI character set.
Select a translator; then, click OK to close this dialog box.
6. At any point during the configuration process, you can click Test Connect to attempt to connect to the data
source using the connection options specified in the driver Setup dialog box. A logon dialog box appears
(see Using a Logon Dialog Box (Teradata) on page 1088 for details). The information you enter in the logon
dialog box during a test connect is not saved.
• If the driver can connect, it releases the connection and displays a Connection Established message.
Click OK.
• If the driver cannot connect because of an incorrect environment or connection value, it displays an
appropriate error message.
Verify that all required client software is properly installed. If it is not, you will see the message:
Specified driver could not be loaded due to system error [xxx].
Click OK.
7. Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect
to the data source. You can change these defaults by using this procedure to reconfigure your data source.
You can override these defaults by connecting to the data source using a connection string with alternate
values.
1088 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for the Teradata Database
1. Select an alias name or IP address of a Teradata server from the DBC Name or Alias drop-down list. The
choices for this list are determined by the entries in DBC Name or Alias and DBCName List on the General
tab of the driver Setup dialog box.
2. Select the Integrated Security check box to enable the user to connect to the database through Single Sign
On (SSO) using one of the authentication mechanisms that support SSO. In this case, User Name, Password,
and Domain are not required and are not available fields.
3. If you do not use Integrated Security, select a value from the Security Mechanism drop-down list to specify
the authentication mechanism used for connections to the data source.
4. Type a string of characters in the Security Parameter field that is to be regarded as a parameter to the
authentication mechanism. The string is ignored by the ODBC driver and is passed on to the TeraSSO
function that is called to set the authentication mechanism.
The characters [] {} () , ; ? * = ! @ must be enclosed in curly braces.
5. Other options that are displayed on the Logon Dialog box depend on the authentication mechanism selected.
See the descriptions of these options under Security Mechanism on page 1105.
6. Type the domain name for Third Party Sign On along with the username and password. If a domain name
is not provided, then the local domain is assumed.
7. Type a default Teradata database (optional).
8. Type an account string to be used during the creation of a user account in the Teradata Database instead
of providing account information during configuration of ODBC (optional).
9. Click OK to complete the logon and to update these values in the Registry.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1089
Chapter 8: The Connect XE Drivers
LoginTimeout (LTO) 20
1090 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for the Teradata Database
Account String
Attribute
AccountString (AS)
Purpose
An account string. For a complete description of account strings, refer to the Teradata Database Administration
Guide.
Valid Values
string
where:
string
is an account string.
Default
None
GUI Tab
General tab
Authentication Password
Attribute
AuthenticationPassword (AP)
Purpose
The password for the Kerberos, LDAP, NTLM, and TD authentication mechanisms. The Authentication Password
option cannot be specified through the driver Setup dialog box and should not be stored in a data source. It is
specified through the Logon dialog box or a connection string.
Valid Values
pwd
where:
pwd
is a valid password.
Default
None
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1091
Chapter 8: The Connect XE Drivers
GUI Tab
n/a
Authentication UserId
Attribute
AuthenticationUserId (AUI)
Purpose
The user ID for the Kerberos, LDAP, NTLM, and TD authentication mechanisms.
Valid Values
userid
where:
userid
Default
None
GUI Tab
General tab
DBCName List
Attribute
DBCName List
Attribute
n/a
Purpose
A list of IP addresses or aliases to appear in the drop-down list of the Logon dialog box (see Using a Logon
Dialog Box (Teradata) on page 1088 for a description). The DBCName List option is not used as a runtime
connection attribute.
Valid Values
ip_address | alias [,ip_address | alias][...]
where:
ip_address
1092 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for the Teradata Database
alias
Separate multiple IP addresses or aliases with commas. The same restrictions apply as described for the
DBCName or Alias option.
Default
None
GUI Tab
General tab
DBCName or Alias
Attribute
DBCName (DBCN)
Purpose
The IP address or alias of the Teradata server.
Valid Values
IP_address | alias
where:
IP_address
alias
Behavior
If set to IP_address, the time the driver waits for connections to be established is faster. The disadvantage
is that if the server designated by that IP address is unavailable, the connection fails and the driver does not
attempt to fail over to another IP address.
If set to alias, the time the driver waits for connections to be established is slower because the driver must
search a local hosts file to resolve the alias to an IP address. The advantage is that the driver fails over the
connection to an alternate IP address if the first address fails.
To use aliases, a local hosts file that maps aliases to IP addresses is required. Aliases cannot be more than
eight characters. In the hosts file, you must specify the aliases and map each of them to an IP address in the
order that you want the driver to attempt the connections. For example:
167.56.78.1 (NCR5100COP1)
167.56.78.2 (NCR5100COP2)
167.56.78.3 (NCR5100COP3)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1093
Chapter 8: The Connect XE Drivers
where NCR5100 is an alias and COPn (where n = 1, 2, 3, ..., 128) is a suffix that sets the order of failover
connection attempts. The eight-character limit on the alias does not include the suffix. You can enter a maximum
of 128 COP (communications processor) entries per host.
Notes
• Although you must add a COP suffix to the alias in the hosts file, do not specify the suffix when entering
the alias in the DBCName or Alias field of the Setup dialog box. Only specify the alias.
Default
None
GUI Tab
General tab
Default Database
Attribute
Database (DB)
Purpose
Specifies the name of the database to which you want to connect.
Valid Values
database_directory
where:
database_directory
is the full path name of the directory in which the data files are stored. If no directory is specified,
the current working directory is used.
Default
None
GUI Tab
General tab
Default Role
Attribute
TDRole (TDR)
Purpose
Specifies the Teradata role for the LDAP authentication mechanism.
1094 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for the Teradata Database
Valid Values
string
where:
string
is a valid role.
Default
None
GUI Tab
General tab
Description
Attribute
Description (n/a)
Purpose
Specifies an optional long description of a data source. This description is not used as a runtime connection
attribute, but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Attribute
EnableDataEncryption (EDE)
Purpose
Determines whether the driver uses data encryption.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1095
Chapter 8: The Connect XE Drivers
Valid Values
1|0
Behavior
If set to 1 (Enabled), the driver encrypts data and communicates with the Teradata gateway using encryption.
If set to 0 (Disabled), the driver does not encrypt data except for logon information.
Notes
• Before you use this value, verify that the server is encryption capable. Data encryption may adversely affect
performance because of the additional overhead (mainly CPU usage) required to encrypt and decrypt data.
Default
0 (Disabled)
GUI Tab
Options tab
Attribute
EnableExtendedStmtInfo (EESI)
Purpose
Determines whether the driver supports extended statement information.
Valid Values
1|0
Behavior
If set to 1 (Enabled), the driver queries the server to see if it supports the Statement Information parcel. If the
server supports the Statement Information parcel, the driver requests the Statement Information parcel and
enables auto-generated key retrieval and SQLDescribeParam support. Use this value if you want to enable
the Return Generated Keys option.
If set to 0 (Disabled), the driver does not attempt to expose auto-generated key retrieval or SQLDescribeParam.
Default
0 (Disabled)
GUI Tab
Options tab
1096 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for the Teradata Database
Enable LOBs
Attribute
EnableLOBs (EL)
Purpose
Determines whether the driver enforces native LOB data type mapping.
Valid Values
1|0
Behavior
If set to 1 (Enabled), the driver enforces native LOB data type mapping as described:
• ODBC data type SQL_LONGVARBINARY is mapped to the Teradata BLOB feature.
• ODBC data type SQL_LONGVARCHAR is mapped to the Teradata CLOB feature.
If set to 0 (Disabled), the driver provides backward compatibility for applications without LOB support that are
using a version of Teradata Database prior to V2R5.1. The mappings are:
• ODBC data type SQL_LONGVARBINARY is mapped to the Teradata VARBYTE(32000) feature.
• ODBC data type SQL_LONGVARCHAR is mapped to the Teradata LONG VARCHAR feature.
This value can improve performance if your application does not send data to, or retrieve it from, LOB columns.
You may receive an error if you disable this option and try to retrieve data from a LOB column.
Default
1 (Enabled)
GUI Tab
Options tab
Enable Reconnect
Attribute
EnableReconnect (ER)
Purpose
Determines whether the driver will reconnect after a system crash or reset is detected.
Valid Values
1|0
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1097
Chapter 8: The Connect XE Drivers
Behavior
If set to 1 (Enabled), the driver attempts to reconnect to the saved sessions; however, sessions cannot be
reconnected until the Teradata system is available. After a session has been reconnected, applications can
expect to receive error messages describing why the ODBC function failed, as well as a status report describing
the post-recovery state.
If set to 0 (Disabled), the driver does not attempt to reconnect to the saved sessions.
Default
0 (Disabled)
GUI Tab
Options tab
IANAAppCodePage
Attribute
IANAAppCodePage (IACP)
Purpose
An Internet Assigned Numbers Authority (IANA) value. You must specify a value for this option if your application
is not Unicode-enabled or if your database character set is not Unicode. The value you specify must match
the database character encoding and the system locale.
The driver uses the specified IANA code page to convert "W" (wide) functions to ANSI.
The driver and Driver Manager both check for the value of IANAAppCodePage in the following order:
• In the connection string
• In the Data Source section of the system information file (odbc.ini)
• In the ODBC section of the system information file (odbc.ini)
If the driver does not find an IANAAppCodePage value, the driver uses the default value of 4 (ISO 8859-1
Latin-1).
Valid Values
IANA_code_page
where:
IANA_code_page
is one of the valid values listed in "IANAAppCodePage values" in the Progress DataDirect for ODBC
Drivers Reference. The value must match the database character encoding and the system locale.
Notes
Refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers Reference
for details.
Default
4 (ISO 8559-1 Latin-1)
1098 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for the Teradata Database
GUI Tab
Advanced tab
Integrated Security
Attribute
IntegratedSecurity (IS)
Purpose
Determines whether the driver allows the user to connect to the database using Single Sign On (SSO) through
an authentication mechanism that supports SSO.
Valid Values
Yes | No
Behavior
If set to Yes (Enabled), SSO is allowed. The driver uses the operating system user ID and password.
If set to No (Disabled), you must specify a value for the UserID option.
Default
No (Disabled)
GUI Tab
General tab
Login Timeout
Attribute
LoginTimeout (LTO)
Purpose
The number of seconds to wait when establishing a virtual circuit with Teradata for login.
Valid Values
x
where:
is a positive integer.
Behavior
If set to x, the driver waits the specified number of seconds.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1099
Chapter 8: The Connect XE Drivers
Default
20
GUI Tab
Advanced tab
Attribute
MapCallEscapeToExec (MCETE)
Purpose
Determines whether the driver converts the {CALL <name>(...)} statement to EXEC name(...).
Valid Values
Yes | No
Behavior
If set to Yes (Enabled), the driver considers the {CALL <name>(...)} statement as the SQL for MACRO
execution and converts it to EXEC name(...).
If set to No (Disabled), the driver does not convert {CALL name(...)} statements to EXEC name(...),
and considers them as CALL statements for Stored Procedure Execution.
Default
No (Disabled)
GUI Tab
Options tab
Attribute
MaxRespSize (MRS)
Purpose
The size of the Teradata response buffer used for SQL requests. This value may be adjusted dynamically if
Teradata cannot send a result within the defined size.
Valid Values
A positive integer from 1 to 65477
Behavior
If using a slow TCP/IP interface, such as PPP or SLIP, enter a smaller value. If you expect to retrieve large
result sets in a LAN environment, set a larger value.
1100 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for the Teradata Database
Default
8192
GUI Tab
Advanced tab
Name
Attribute
DataSourceName (DSN)
Purpose
Specifies the name of a data source in your Windows Registry or odbc.ini file.
Valid Values
string
where:
string
Default
None
GUI Tab
General tab
Password
Attribute
Password (PWD)
Purpose
The password that the application uses to connect to your database. The Password option cannot be specified
through the driver Setup dialog box and should not be stored in a data source. It is specified through the Logon
dialog box or a connection string.
Valid Values
pwd
where:
pwd
is a valid password.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1101
Chapter 8: The Connect XE Drivers
Default
None
GUI Tab
n/a
Port Number
Attribute
PortNumber (PORT)
Purpose
The port number of the server listener.
Valid Values
port_name
where:
port_name
is the port number of the server listener. Check with your database administrator for the correct
number.
Default
1025
GUI Tab
Advanced tab
ProcedureWithPrintStmt
Attribute
PrintOption (PO)
Purpose
Determines whether the driver activates the print option when creating stored procedures.
Valid Values
P|N
Behavior
If set to P (Print), the driver activates the print option.
If set to N (No), the driver does not activate the print option.
1102 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for the Teradata Database
Default
N (No)
GUI Tab
Advanced tab
ProcedureWithSPLSource
Attribute
ProcedureWithSPLSource (PWSS)
Purpose
Determines whether the drive specifies SPL text when creating stored procedures.
Valid Values
Y|N
Behavior
If set to Y (Yes), the driver specifies SPL text.
If set to N (No), the driver does not specify SPL text.
Default
Y (Yes)
GUI Tab
Advanced tab
Profile
Attribute
TDProfile (TDP)
Purpose
Specifies the Teradata profile for the LDAP authentication mechanism.
Valid Values
string
where:
string
is a valid profile.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1103
Chapter 8: The Connect XE Drivers
Default
None
GUI Tab
General tab
Realm
Attribute
AuthenticationDomain (AD)
Purpose
Specifies the domain appropriate to the selected authentication mechanism
Valid Values
string
where:
string
is a valid domain.
Default
None
GUI Tab
None
Attribute
ReportCodepageConversionErrors (RCCE)
Purpose
Specifies how the driver handles code page conversion errors that occur when a character cannot be converted
from one character set to another.
An error message or warning can occur if an ODBC call causes a conversion error, or if an error occurs during
code page conversions to and from the database or to and from the application. The error or warning generated
is Code page conversion error encountered. In the case of parameter data conversion errors, the
driver adds the following sentence: Error in parameter x, where x is the parameter number. The standard
rules for returning specific row and column errors for bulk operations apply.
Valid Values
0|1|2
1104 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for the Teradata Database
Behavior
If set to 0 (Ignore Errors), the driver substitutes 0x1A for each character that cannot be converted and does
not return a warning or error.
If set to 1 (Return Error), the driver returns an error instead of substituting 0x1A for unconverted characters.
If set to 2 (Return Warning), the driver substitutes 0x1A for each character that cannot be converted and returns
a warning.
Default
0 (Ignore Errors)
GUI Tab
Options tab
Security Mechanism
Attribute
SecurityMechanism (SECM)
Purpose
The authentication method to be used by the driver for connections to the database.
Valid Values
TD1 | TD2 | ldap | KRB5 | KRB5C | NTLM | NTLMC
Behavior
If set to TD1, the driver uses Teradata 1.
If set to TD2, the driver uses Teradata 2.
If set to ldap, the driver uses LDAP.
If set to KRB5, the driver uses Kerberos on Windows clients working with Windows servers if the server is
V2R6.0.
If set to KRB5C, the driver uses Kerberos Compatibility on Windows clients working with Windows servers if
the server is pre-V2R6.0.
If set to NTLM, the driver uses NTLM on Windows clients working with Windows servers if the server is V2R6.0.
If set to NTLMC, the driver uses NTLM Compatibility on Windows clients working with Windows servers if the
server is pre-V2R6.0.
Note: Kerberos and NTLM are enabled through the Teradata client. See your Teradata documentation for
requirements.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1105
Chapter 8: The Connect XE Drivers
• LDAP
• Authentication UserID: The LDAP user ID.
• Realm: The LDAP domain. (The equivalent connection string attribute is AuthenticationDomain.)
• TD User name: The Teradata user name.
• Profile: The Teradata Profile. (The equivalent connection string attribute is TDProfile.)
• Default Role: The Teradata Role. (The equivalent connection string attribute is TDRole.)
Other parameters for the authentication mechanism can be entered in the Security Parameter field.
Default
None
GUI Tab
General tab
Security Parameter
Attribute
SecurityParameter (SP)
Purpose
A string that is passed as a parameter to the authentication method. The string is ignored by the ODBC driver
and is passed to the TeraSSO function that is called to set the authentication method.
Valid Values
string
where:
string
1106 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for the Teradata Database
Default
None
GUI Tab
General tab
Attribute
CharacterSet (CS)
Purpose
A character set used to override the Teradata character set.
Valid Values
ASCII | UTF16 (valid only for V2R6.x servers) | LATIN1252_0A | LATIN9_0A | LATIN1_0A | Shift-JIS | EUC |
BIG5 | GB | NetworkKorean
The specified character set must be installed on the database.
Default
ASCII
GUI Tab
General tab
Attribute
ShowSelectableTables (SST)
Purpose
Determines whether the driver supports X views.
Valid Values
Yes | No
Behavior
If set to Yes (Enabled), SQLTables() and SQLProcedures() use dbc.tablesX and dbc.databasesX instead of
dbc.tables and dbc.databases. Also, SQLColumns() and SQLProcedureColumns() use dbc.columnsX instead
of dbc.columns. SqlStatistics() uses dbc.tablesizeX instead of dbc.tablesize. The X tables only contain information
that the user has permission to access. These tables are optional for Teradata, so verify that they exist.
If set to No (Disabled), SQLTables() and SQLProcedures() use dbc.tables and dbc.databases. Also,
SQLColumns() and SQLProcedureColumns() use dbc.columns. SqlStatistics() uses dbc.tablesize.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1107
Chapter 8: The Connect XE Drivers
Default
Yes (Enabled)
GUI Tab
Options tab
TDUserName
Attribute
TDUserName (TDUN)
Purpose
Specifies the Teradata user name for the LDAP authentication mechanism.
Valid Values
user_name
where:
user_name
Default
None
GUI Tab
General tab
UserID
Attribute
UserID (UID)
Purpose
The default user ID that is used to connect to your database. Your ODBC application may override this value
or you may override it in the logon dialog box or connection string.
Valid Values
userid
where:
userid
1108 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for the Teradata Database
Behavior
The user name is interpreted in the context of the authentication mechanism. If, for example, the authentication
mechanism is NTLM, the user name is assumed to be a Windows user name.
If TeraSSO allows fully qualified user names, the user name may contain a domain or realm, for example,
{judy@linedata}. Values containing a character such as @ must be enclosed in curly braces.
SSO is indicated by the absence of a UserID.
Default
None
GUI Tab
General tab
Data Types
The following table shows how the Teradata data types map to the standard ODBC data types.
Teradata ODBC
87
Blob SQL_LONGVARBINARY
88
Bigint SQL_BIGINT
Byte SQL_BIT
Byteint SQL_TINYINT
Char SQL_CHAR
89
Clob SQL_LONGVARCHAR
Date SQL_TYPE_DATE
90
Decimal SQL_DECIMAL
Double SQL_DOUBLE
Float SQL_FLOAT
Integer SQL_INTEGER
87
If no LOB support, VARBYTE(32000).
88
Supported only on Teradata 6.2 and higher.
89
If no LOB support, LONGVARCHAR.
90
Precision of 18 unless on a Teradata 6.2 or higher server that supports large decimal types.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1109
Chapter 8: The Connect XE Drivers
Teradata ODBC
Number SQL_DOUBLE
92
Number (p) SQL_BIGINT | SQL_DECIMAL
Numeric SQL_NUMERIC
Real SQL_REAL
Smallint SQL_SMALLINT
Time SQL_TYPE_TIME
Timestamp SQL_TYPE_TIMESTAMP
Varchar SQL_VARCHAR
See Retrieving Data Type Information on page 72 for information about retrieving data types.
Unicode Support
The driver supports Unicode data types. The following table shows how the Teradata data types map to the
Unicode data types, but only when CharacterSet is set to UTF-16.
91
Supported only on Teradata 6.2 and higher when EnableExtendedStmtInfo is enabled.
92
When precision is less than or equal to 19, Number maps to SQL_BIGINT. When precision is greater than 19, it maps to Decimal.
1110 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
The Driver for the Teradata Database
Teradata Unicode
The driver supports the Unicode ODBC W (Wide) function calls, such as SQLConnectW. This allows the Driver
Manager to transmit these calls directly to the driver. Otherwise, the Driver Manager would incur the additional
overhead of converting the W calls to ANSI function calls, and vice versa.
See UTF-16 Applications on UNIX and Linux on page 137 for related details.
Also, refer to "Internationalization, localization, and Unicode" in the Progress DataDirect for ODBC Drivers
Reference for a more detailed explanation of Unicode.
SQL Support
The driver supports the minimum SQL grammar.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1111
Chapter 8: The Connect XE Drivers
1112 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
9
Supported SQL Statements and Extensions
This chapter includes information on supported SQL functionality for the Apache Hive, Impala Wire Protocol,
Salesforce, and flat-file drivers.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1113
Chapter 9: Supported SQL Statements and Extensions
Select List
The following sections apply to the way the Select list can be used with the driver.
From Clause
LEFT, RIGHT, and FULL OUTER JOINs are supported, as are LEFT SEMI JOINs and CROSS JOINs using
the equal comparison operator, as shown in the following examples
SELECT a.* FROM a JOIN b ON (a.id = b.id AND a.department = b.department)
However, the following syntax fails because of the use of non-equal comparison operators.
SELECT a.* FROM a JOIN b ON (a.id <> b.id)
HiveQL does not support join syntax in the form of a comma-separated list of tables. The driver, however,
overcomes this limitation by translating the SQL into HiveQL, as shown in the following examples.
1114 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Functionality for the Driver for Apache Hive
ANSI SQL 92 Query Driver for Apache Hive Wire HiveQL Translation
SELECT * FROM t1, t2 WHERE a = SELECT * FROM t1 t1 JOIN t2 t2 WHERE a = b
b
SELECT * FROM t1 y, t2 x WHERE SELECT * FROM t1 y JOIN t2 x WHERE a = b
a = b
SELECT * FROM t2, (SELECT * SELECT * FROM t2 t2 JOIN (SELECT * FROM t1 t1) x
FROM t1) x
Group By Clause
The Group By clause is supported, with the following Entry SQL level restrictions:
• The COLLATE clause is not supported.
• SELECT DISTINCT is not supported.
• The grouping column reference cannot be an alias. Both of the following queries fail, because fc is an alias
for the intcol column:
SELECT intcol AS fc, COUNT (*) FROM p_gtable GROUP BY fc
SELECT f(col) as fc, COUNT (*) FROM table_name GROUP BY fc
Having Clause
The Having Clause is supported, with the following Entry SQL level restriction: a GROUP BY clause is required.
Insert
Insert statements are supported using the following syntax:
INSERT INTO TABLE <table_name> VALUES (<expression> [,<expression>]...)
where:
table_name
is the name of the table into which you want to insert rows.
expression
Notes
• The following conditions apply for the successful execution of an insert:
• Values for all columns must be specified in order.
• Column lists cannot be used.
• Casts and other functions cannot be used.
• String values must be enclosed in single quotation marks (’).
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1115
Chapter 9: Supported SQL Statements and Extensions
• By default, the driver supports multi-row inserts for parameterized arrays. For a multi-row insert, the driver
attempts to execute a single insert for all the rows contained in a parameter array. If the size of the insert
statement exceeds the available buffer memory of the driver, the driver executes multiple statements. This
behavior provides substantial performance gains for batch inserts.
• The driver modifies the HQL statement to perform a multi-row insert. Therefore, the default multi-row insert
behavior may not be desirable in all scenarios. You can disable this behavior by setting the Batch Mechanism
connection option to SingleInsert. When Batch Mechanism is set to SingleInsert, Hive's native batch
mechanism is used to execute batch operations, and an insert statement is executed for each row contained
in a parameter array.
Order By Clause
The Order By clause is supported, with the following Entry SQL level restrictions:
• An integer sort key is not allowed.
• The COLLATE clause is not supported.
Set Operators
Supported, with the following Entry SQL level restrictions:
• UNION is not supported.
• UNION ALL is supported only in a subquery.
The following example fails with Apache Hive because UNION ALL is used in a standard syntax:
SELECT * FROM t1 UNION ALL SELECT * FROM t2
To make the query work with Apache Hive, use a subquery:
SELECT * FROM (SELECT * FROM t1 UNION ALL SELECT * FROM t2) sq
In addition, INTERSECT or EXCEPT are not supported.
Subqueries
A query is an operation that retrieves data from one or more tables or views. In this reference, a top-level query
is called a Select statement, and a query nested within a Select statement is called a subquery.
Subqueries are supported, with the following Entry SQL level restriction: subqueries can only exist in the FROM
clause, that is, in a derived table. In the following example, the second Select statement is a subquery:
SELECT * FROM (SELECT * FROM t1 UNION ALL SELECT * FROM t2) sq
Although Apache Hive currently does not support IN or EXISTS subqueries, you can efficiently implement the
semantics by rewriting queries to use LEFT SEMI JOIN.
1116 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Functionality for the Driver for Apache Hive
SQL Expressions
An expression is a combination of one or more values, operators, and SQL functions that evaluate to a value.
You can use expressions in the Where and Having clauses of Select statements.
Expressions enable you to use mathematical operations as well as character string manipulation operators to
form complex queries.
Valid expression elements are:
• Constants on page 1117
• Numeric Operators on page 1117
• Character Operator on page 1118
• Relational Operators on page 1118
• Logical Operators on page 1118
• Functions on page 1119
Constants
Apache Hive servers prior to Apache Hive 0.8 do not support literal values expressed in scientific notation.
Numeric Operators
You can use a numeric operator in an expression to negate, add, subtract, multiply, and divide numeric values.
The result of this operation is also a numeric value. The + and - operators are also supported in date/time fields
to allow date arithmetic.
The following table lists the supported arithmetic operators.
N/A % (Mod)
* Supported
+ Supported
- Supported
/ Supported
N/A ^ (XOR)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1117
Chapter 9: Supported SQL Statements and Extensions
Character Operator
The concatenation operator (||) is not supported; however, the CONCAT function is supported by HiveQL.
SELECT CONCAT('Name is', ’(ename FROM emp)’)
Relational Operators
Relational operators compare one expression to another.
The following table lists the supported relational operators.
<> Supported
< Supported
<= Supported
= Supported
> Supported
>= Supported
[NOT] IN Supported
EXISTS Supported
RLIKE Supported
REGEXP Supported
Logical Operators
A logical operator combines the results of two component conditions to produce a single result or to invert the
result of a single condition. The following table lists the supported logical operators.
1118 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Functionality for the Driver for Apache Hive
NOT ! Supported
OR || Supported
Functions
The driver supports a number of functions that you can use in expressions, as listed in the following tables.
Count Supported
AVG Supported
MIN Supported
MAX Supported
SUM Supported
DISTINCT Supported
ALL Supported
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1119
Chapter 9: Supported SQL Statements and Extensions
Substring Supported
TRIM Supported.
COALESCE Supported.
CAST Supported.
Restrictions
This section describes some of the functional restrictions of Apache Hive.
1120 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements for Flat-File Drivers
Column lists are not supported. Values for all columns must be specified.
Stored Procedures
Apache Hive has no concept of stored procedures. Therefore, they are not supported by the driver.
Views
Apache Hive supports views but purely as logical objects with no associated storage. As such, there is no
support for materialized views in Hive; therefore, the Apache Hive Wire Protocol driver does not support
materialized views.
Apache Hive does not automatically update the view's schema after it is created; therefore, subsequent changes
to underlying tables are not reflected in the view's schema. Any modifications that render the view incompatible
will cause queries on the view to fail. Views are intended for Read Only access. LOAD, INSERT, and ALTER
statements on a view will return an error.
Other Restrictions
The Apache Hive server has the following restrictions:
• Column values and parameters are always nullable
• No ROWID support
• No support for synonyms
• Primary and foreign keys are not supported.
• The length of a SQL string is limited to 2 GB.
• Support for indexes is incomplete.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1121
Chapter 9: Supported SQL Statements and Extensions
Select Statement
The form of the Select statement supported by the flat-file drivers is:
Select Clause
Follow Select with a list of column expressions you want to retrieve or an asterisk (*) to retrieve all fields.
SELECT [DISTINCT] {* | column_expression, [[AS] column_alias]. . .}
column_expression can be simply a field name (for example, LAST_NAME). More complex expressions
may include mathematical operations or string manipulation (for example, SALARY * 1.05). See SQL Expressions
on page 1125 for details.
column_alias can be used to give the column a descriptive name. For example, to assign the alias
DEPARTMENT to the column DEP:
SELECT dep AS department FROM emp
Separate multiple column expressions with commas (for example, LAST_NAME, FIRST_NAME, HIRE_DATE).
Field names can be prefixed with the table name or alias. For example, EMP.LAST_NAME or E.LAST_NAME,
where E is the alias for the table EMP.
The Distinct operator can precede the first column expression. This operator eliminates duplicate rows from
the result of a query. For example:
SELECT DISTINCT dep FROM emp
Aggregate Functions
Aggregate functions can also be a part of a Select clause. Aggregate functions return a single value from a set
of rows. An aggregate can be used with a field name (for example, AVG(SALARY)) or in combination with a
more complex column expression (for example, AVG(SALARY * 1.07)). The column expression can be preceded
by the Distinct operator. The Distinct operator eliminates duplicate values from an aggregate expression. For
example:
COUNT (DISTINCT last_name)
In this example, only distinct last name values are counted.
The following table lists valid aggregate functions.
Aggregate Returns
SUM The total of the values in a numeric field expression. For example, SUM(SALARY)
returns the sum of all salary field values.
1122 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements for Flat-File Drivers
AVG The average of the values in a numeric field expression. For example, AVG(SALARY)
returns the average of all salary field values.
COUNT The number of values in any field expression. For example, COUNT(NAME) returns
the number of name values. When using COUNT with a field name, COUNT returns
the number of non-NULL field values. A special example is COUNT(*), which returns
the number of rows in the set, including rows with NULL values.
MAX The maximum value in any field expression. For example, MAX(SALARY) returns the
maximum salary field value.
MIN The minimum value in any field expression. For example, MIN(SALARY) returns the
minimum salary field value.
From Clause
The From clause indicates the tables to be used in the Select statement. The format of the From clause is:
FROM table_names [table_alias]
table_names can be one or more simple table names in the current working directory or complete path names.
table_alias is a name used to refer to a table in the rest of the Select statement. Database field names
may be prefixed by the table alias. Given the table specification:
FROM emp E
you may refer to the LAST_NAME field as E.LAST_NAME. Table aliases must be used if the Select statement
joins a table to itself. For example:
SELECT * FROM emp E, emp F WHERE E.mgr_id = F.emp_id
The equal sign (=) includes only matching rows in the results.
If you are joining more than one table, you can use LEFT OUTER JOIN, which includes non-matching rows in
the first table you name. For example:
SELECT * FROM T1 LEFT OUTER JOIN T2 on T1.key = T2.key
Where Clause
The Where clause specifies the conditions that rows must meet to be retrieved. The Where clause contains
conditions in the form:
WHERE expr1rel_operatorexpr2
expr1 and expr2 can be field names, constant values, or expressions.
rel_operator is the relational operator that links the two expressions. See SQL Expressions on page 1125
for details.
For example, the following Select statement retrieves the names of employees that make at least $20,000.
SELECT last_name,first_name FROM emp WHERE salary >= 20000
Group By Clause
The Group By clause specifies the names of one or more fields by which the returned values should be grouped.
This clause is used to return a set of aggregate values. It has the following form:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1123
Chapter 9: Supported SQL Statements and Extensions
GROUP BY column_expressions
column_expressions must match the column expression used in the Select clause. A column expression
can be one or more field names of the database table, separated by a comma (,) or one or more expressions,
separated by a comma (,). See SQL Expressions on page 1125 for details.
The following example sums the salaries in each department:
SELECT dept_id, sum(salary) FROM emp GROUP BY dept_id
This statement returns one row for each distinct department ID. Each row contains the department ID and the
sum of the salaries of the employees in the department.
Having Clause
The Having clause enables you to specify conditions for groups of rows (for example, display only the
departments that have salaries totaling more than $200,000). This clause is valid only if you have already
defined a Group By clause. It has the following form:
HAVING expr1rel_operatorexpr2
expr1 and expr2 can be field names, constant values, or expressions. These expressions do not have to
match a column expression in the Select clause.
rel_operator is the relational operator that links the two expressions. See SQL Expressions on page 1125
for details.
The following example returns only the departments whose sums of salaries are greater than $200,000:
SELECT dept_id, sum(salary) FROM emp
GROUP BY dept_id HAVING sum(salary) > 200000
Union Operator
The Union operator combines the results of two Select statements into a single result. The single result is all
the returned rows from both Select statements. By default, duplicate rows are not returned. To return duplicate
rows, use the All keyword (UNION ALL). The form is:
SELECT statement
UNION ALL
SELECT statement
When using the Union operator, the Select lists for each Select statement must have the same number of
column expressions with the same data types, and must be specified in the same order. For example:
SELECT last_name, salary, hire_date FROM emp
UNION
SELECT name, pay, birth_date FROM person
This example has the same number of column expressions, and each column expression, in order, has the
same data type.
The following example is not valid because the data types of the column expressions are different (salary from
emp has a different data type than last_name from raises). This example does have the same number of column
expressions in each Select statement but the expressions are not in the same order by data type.
SELECT last_name, salary FROM emp
UNION
SELECT salary, last_name FROM raises
1124 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements for Flat-File Drivers
Order By Clause
The Order By clause indicates how the rows are to be sorted. The form is:
ORDER BY {sort_expression [DESC | ASC]}, ...
sort_expression can be field names, expressions, or the positioned number of the column expression to
use.
The default is to perform an ascending (ASC) sort.
For example, to sort by last_name and then by first_name, you could use either of the following Select
statements:
SELECT emp_id, last_name, first_name FROM emp
ORDER BY last_name, first_name
or
SELECT emp_id, last_name, first_name FROM emp
ORDER BY 2,3
In the second example, last_name is the second column expression following Select, so Order By 2 sorts by
last_name.
SQL Expressions
Expressions are used in the Where clauses, Having clauses, and Order By clauses of SQL Select statements.
Expressions enable you to use mathematical operations as well as character string and date manipulation
operators to form complex database queries.
The most common expression is a simple field name. You can combine a field name with other expression
elements.
Valid expression elements are as follows:
• Field Names
• Constants
• Exponential notation
• Numeric operators
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1125
Chapter 9: Supported SQL Statements and Extensions
• Character operators
• Date operators
• Relational operators
• Logical operators
• Functions
Constants
Constants are values that do not change. For example, in the expression PRICE * 1.05, the value 1.05 is a
constant.
You must enclose character constants in pairs of single (') or double (") quotation marks. To include a single
quotation mark in a character constant enclosed by single quotation marks, use two single quotation marks
together (for example, 'Don''t'). Similarly, if the constant is enclosed by double quotation marks, use two double
quotation marks to include one.
You must enclose date and time constants in braces ({}), for example, {01/30/89} and {12:35:10}. The form for
date constants is MM/DD/YY or MM/DD/YYYY. The form for time constants is HH:MM:SS.
The logical constants are .T. and 1 for True and .F. and 0 for False. For portability, use 1 and 0.
Exponential Notation
You can include exponential notation in expression elements. For example:
SELECT col1, 3.4E+7 FROM table1 WHERE calc < 3.4E-6 * col2
Numeric Operators
You can include the following operators in numeric expressions:
Operator Meaning
+ Addition
– Subtraction
* Multiplication
/ Division
** Exponentiation
^ Exponentiation
The following table shows examples of numeric expressions. For these examples, assume salary is 20000.
You can precede numeric expressions with a unary plus (+) or minus (–). For example, –(salary * 1.1)
is -22000.
1126 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements for Flat-File Drivers
Character Operators
Character expressions can include the following operators:
Operator Meaning
+ Concatenation, keeping trailing blanks.
– Concatenation, moving trailing blanks to the end.
The following table shows examples of character expressions. In the examples, last_name is 'JONES ' and
first_name is 'ROBERT '.
Note: Some flat-file drivers return character data with trailing blanks as shown in the table; however, you
cannot rely on the driver to return blanks. If you want an expression that works regardless of whether the drivers
return trailing blanks, use the TRIM function before concatenating strings to make the expression portable. For
example:
TRIM(first_name) + '' + TRIM(last_name)
Date Operators
You can include the following operators in date expressions:
Operator Meaning
+ Add a number of days to a date to produce a new date.
– The number of days between two dates, or subtract a number of days from
a date to produce a new date.
The following table shows examples of date expressions. In these examples, hire_date is {01/30/1990}.
Relational Operators
Relational operators separating any two expressions can be any one of those listed in the following table.
Operator Meaning
= Equal.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1127
Chapter 9: Supported SQL Statements and Extensions
Operator Meaning
Any Compares a value to each value returned by a subquery. Any must be prefaced by =,
<>, >, >=, <, or <=.=Any is equivalent to In.
All Compares a value to each value returned by a subquery. All must be prefaced by =,
<>, >, >=, <, or <=.
Logical Operators
Two or more conditions may be combined to form more complex criteria. When two or more conditions are
present, they must be related by AND or OR. For example:
salary = 40000 AND exempt = 1
The logical NOT operator is used to reverse the meaning. For example:
NOT (salary = 40000 AND exempt = 1)
1128 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements for Flat-File Drivers
Operator Precedence
As expressions become more complex, the order in which the expressions are evaluated becomes important.
The following table shows the order in which the operators are evaluated. The operators in the first line are
evaluated first, then those in the second line, and so on. Operators in the same line are evaluated left to right
in the expression.
Precedence Operator
1 Unary -, Unary +
2 **
3 *, /
4 +, -
5 =, <>, <, <=, >, >=, LIKE, NOT LIKE, IS NULL, IS NOT NULL, BETWEEN, IN, EXISTS,
ANY, ALL
6 NOT
7 AND
8 OR
Because AND is evaluated first, this query retrieves employees in department D101 hired after January 30,
1989, as well as every employee making more than $40,000, no matter what department or hire date.
To force the clause to be evaluated in a different order, use parentheses to enclose the conditions to be
evaluated first. For example:
WHERE (salary > 40000 OR hire_date > {01/30/1989})
AND dept = 'D101'
retrieves employees in department D101 that either make more than $40,000 or were hired after January 30,
1989.
Functions
The flat-file drivers support a number of functions that you may use in expressions. In the following tables, the
functions are grouped according to the type of result they return.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1129
Chapter 9: Supported SQL Statements and Extensions
Function Description
SUBSTR Returns a substring of a string. Parameters are the string, the first character to extract,
and the number of characters to extract (optional).
SUBSTR('Conrad',2,3) returns onr.
SUBSTR('Conrad',2) returns onrad.
1130 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements for Flat-File Drivers
Function Description
DTOC Converts a date to a character string. An optional second parameter determines the
format of the result:
0 (the default) returns MM/DD/YY.
1 returns DD/MM/YY.
2 returns YY/MM/DD.
10 returns MM/DD/YYYY.
11 returns DD/MM/YYYY.
12 returns YYYY/MM/DD.
An optional third parameter specifies the date separator character. If not specified, a
slash (/) is used.
DTOC({01/30/1997}) returns 01/30/97.
DTOC({01/30/1997}, 0) returns 01/30/97.
DTOC({01/30/1997}, 1) returns 30/01/97.
DTOC({01/30/1997}, 2,'-') returns 97-01-30.
IIF Returns one of two values, true or false. Parameters are a logical expression, the true
value, and the false value. If the logical expression evaluates to true, the function returns
the true value. Otherwise, it returns the false value.
IIF(salary>20000,'BIG','SMALL') returns BIG if salary is greater than 20000.
If not, it returns SMALL.
STR Converts a number to a character string. Parameters are the number, the total number
of output characters (including the decimal point), and optionally the number of digits
to the right of the decimal point.
STR(12.34567,4) returns 12.
STR(12.34567,4,1) returns 12.3.
STR(12.34567,6,3) returns 12.346.
TIME Returns the time of day as a character string.At 9:49 PM, TIME() returns 21:49:00.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1131
Chapter 9: Supported SQL Statements and Extensions
Function Description
TTOC
Note: This function applies only to flat-file drivers that support SQL_TIMESTAMP: the
Btrieve driver and the dBASE (access to FoxPro 3.0) driver.
USERNAME For Btrieve, the logon ID specified at connect time is returned. For all other flat-file
drivers, an empty string is returned.
Function Description
MOD Divides two numbers and returns the remainder of the division.
MOD(10,3) returns 1.
1132 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements for Flat-File Drivers
Function Description
NUMVAL Converts a character string to a number. If the character string is not a valid number,
a zero (0) is returned.
NUMVAL('123') returns the number 123.
VAL Converts a character string to a number. If the character string is not a valid number,
a zero (0) is returned.
VAL('123') returns the number 123.
Function Description
The following examples use some of the number and date functions.
Retrieve all employees that have been with the company at least 90 days:
SELECT first_name, last_name FROM emp
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1133
Chapter 9: Supported SQL Statements and Extensions
Create Table
The form of the Create Table statement is:
CREATE TABLE table_name (col_definition[,col_definition,...])
table_name can be a simple table name or a full path name. A table name is preferred for portability to other
SQL data sources. If a table name is used, the file is created in the directory you specified as the database
directory in the connection string. If you did not specify a database directory in the connection string, the file
is created in the directory specified as the database directory in .odbc.ini. If you did not specify a database
directory in either place, the file is created in the current working directory at connect time.
col_definition is the column name, followed by the data type, followed by an optional column constraint
definition. Values for column names are database specific. The data type specifies a column’s data type.
The only column constraint definition currently supported by some flat-file drivers is "not NULL." Not all flat-file
tables support "not NULL" columns. In the cases where "not NULL" is not supported, this restriction is ignored
and the driver returns a warning if "not NULL" is specified for a column. The "not NULL" column constraint
definition is allowed in the driver so that you can write a database-independent application (and not be concerned
about the driver raising an error on a Create Table statement with a "not NULL" restriction).
A sample Create Table statement to create an employee database table is:
CREATE TABLE emp (last_name CHAR(20) NOT NULL,
first_name CHAR(12) NOT NULL,
salary NUMERIC (10,2) NOT NULL,
hire_date DATE NOT NULL)
Drop Table
The form of the Drop Table statement is:
DROP TABLE table_name
table_name can be a simple table name (emp) or a full path name. A table name is preferred for portability
to other SQL data sources. If a table name is used, the file is dropped from the directory you specified as the
database directory in the connection string. If you did not specify a database directory in the connection string,
the file is deleted from the directory specified as the database directory in .odbc.ini. If you did not specify a
database directory in either of these places, the file is dropped from the current working directory at connect
time.
A sample Drop Table statement to delete the emp table is:
DROP TABLE emp
1134 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements for Flat-File Drivers
Insert Statement
The Insert statement is used to add new rows to a database table. With it, you can specify either of the following
options:
In this type of Insert statement, the number of columns to be inserted must match the number of columns in
the Select statement. The list of columns to be inserted must correspond to the columns in the Select statement
just as it would to a list of value expressions in the other type of Insert statement. That is, the first column
inserted corresponds to the first column selected; the second inserted to the second, and so forth.
The size and data type of these corresponding columns must be compatible. Each column in the Select list
should have a data type that the driver accepts on a regular Insert/Update of the corresponding column in the
Insert list. Values are truncated when the size of the value in the Select list column is greater than the size of
the corresponding Insert list column.
The Select statement is evaluated before any values are inserted. This query cannot be made on the table into
which values are inserted.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1135
Chapter 9: Supported SQL Statements and Extensions
Update Statement
The Update statement is used to change rows in a database file. The form of the Update statement supported
for flat-file drivers is:
UPDATE table_name SET col_name = expr, ...
[ WHERE { conditions | CURRENT OF cursor_name } ]
table_name can be a simple table name or a full path name. A table name is preferred for portability to other
SQL data sources.
col_name is the name of a column whose value is to be changed. Several columns can be changed in one
statement.
expr is the new value for the column. The expression can be a constant value or a subquery. Character string
values must be enclosed with single (’) or double (") quotation marks, date values must be enclosed by braces
{}, and logical values that are letters must be enclosed by periods (for example, .T. or .F.). Subqueries must
be enclosed in parentheses.
The Where clause (any valid clause described in Select Statement on page 1122) determines which rows are to
be updated.
The Where Current Of cursor_name clause can be used only by developers coding directly to the ODBC
API. It causes the row at which cursor_name is positioned to be updated. This is called a "positioned update."
You must first execute a Select...For Update statement with a named cursor and fetch the row to be updated.
An example of an Update statement on the emp table is:
UPDATE emp SET salary=32000, exempt=1
WHERE emp_id = 'E10001'
The Update statement changes every record that meets the conditions in the Where clause. In this case, the
salary and exempt status are changed for all employees having the employee ID E10001. Because employee
IDs are unique in the emp table, only one record is updated.
An example using a subquery is:
UPDATE emp SET salary = (SELECT avg(salary) FROM emp)
WHERE emp_id = 'E10001'
In this case, the salary is changed to the average salary in the company for the employee having employee ID
E10001.
Delete Statement
The Delete statement is used to delete rows from a database table. The form of the Delete statement supported
for flat-file drivers is:
DELETE FROM table_name
[ WHERE { conditions | CURRENT OF cursor_name } ]
table_name can be a simple table name or a full path name. A table name is preferred for portability to other
SQL data sources.
The Where clause determines which rows are to be deleted. If you include only the keyword Where, all rows
in the table are deleted, but the file is left intact.
1136 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Functionality for the Impala Wire Protocol Driver
The Where Current Of cursor_name clause can be used only by developers coding directly to the ODBC
API. It causes the row at which cursor_name is positioned to be deleted. This is called a "positioned delete."
You must first execute a Select...For Update statement with a named cursor and fetch the row to be deleted.
An example of a Delete statement on the emp table is:
DELETE FROM emp WHERE emp_id = 'E10001'
Each Delete statement removes every record that meets the conditions in the Where clause. In this case, every
record having the employee ID E10001 is deleted. Because employee IDs are unique in the employee table,
at most, one record is deleted.
Reserved Keywords
The following words are reserved for use in SQL statements. If they are used for file or column names in a
database that you use, you must enclose them in double (") quotation marks in any SQL statement where they
appear as file or column names.
FOR LEFT OR
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1137
Chapter 9: Supported SQL Statements and Extensions
Select List
The following sections apply to the way the Select list can be used with the driver.
SELECT table1.col1,
table2.col2 FROM schema.table1 table1 JOIN schema.table2 table2
WHERE table1.col3 = table2.col3
From Clause
LEFT, RIGHT, and FULL OUTER JOINs are supported, as are LEFT SEMI JOINs and CROSS JOINs using
the equal comparison operator, as shown in the following examples:
SELECT a.* FROM a JOIN b ON (a.id = b.id AND a.department = b.department)
However, the following syntax fails because of the use of non-equal comparison operators.
SELECT a.* FROM a JOIN b ON (a.id <> b.id)
Impala SQL does not support join syntax in the form of a comma-separated list of tables. The driver, however,
overcomes this limitation by translating the SQL into Impala SQL, as shown in the following examples.
1138 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Functionality for the Impala Wire Protocol Driver
Group By Clause
The Group By clause is supported, with the following Entry SQL level restrictions:
• The COLLATE clause is not supported.
• SELECT DISTINCT is not supported.
Having Clause
The Having Clause is supported, with the following Entry SQL level restriction: a GROUP BY clause is required.
Order By Clause
The Order By clause is supported, with the following Entry SQL level restrictions:
• An integer sort key is not allowed.
• The COLLATE clause is not supported.
• A LIMIT clause or a default ORDER BY limit for result sets is required.
If set to x, the number of rows returned by a SQL statement containing an ORDER BY clause are limited to
the specified number of rows for the session. To override this value, specify a new value in a LIMIT clause in
the statement that is being executed.
If set to -1(disabled), there is no default limit the number of rows returned by a statement containing an ORDER
BY clause. The application must limit the number of rows returned by SQL statements that contain an ORDER
BY clause, or Impala will return an error.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1139
Chapter 9: Supported SQL Statements and Extensions
Set Operators
Supported, with the following restrictions: INTERSECT or EXCEPT are not supported.
Subqueries
A query is an operation that retrieves data from one or more tables or views. In this reference, a top-level query
is called a Select statement, and a query nested within a Select statement is called a subquery.
Subqueries are supported, with the following Entry SQL level restriction: subqueries can only exist in the FROM
clause, that is, in a derived table. In the following example, the second Select statement is a subquery:
SELECT * FROM (SELECT * FROM t1 UNION ALL SELECT * FROM t2) sq
Although Impala currently does not support IN or EXISTS subqueries, you can efficiently implement the
semantics by rewriting queries to use LEFT SEMI JOIN.
SQL Expressions
An expression is a combination of one or more values, operators, and SQL functions that evaluate to a value.
You can use expressions in the Where and Having clauses of Select statements.
Expressions enable you to use mathematical operations as well as character string manipulation operators to
form complex queries.
Valid expression elements are:
• Constants on page 1140
• Numeric Operators on page 1140
• Character Operator on page 1141
• Relational Operators on page 1141
• Logical Operators on page 1142
• Functions on page 1142
Constants
Impala uses binary literals for internal functions. Although the driver supports binary literals, no useful information
is returned.
Numeric Operators
You can use a numeric operator in an expression to negate, add, subtract, multiply, and divide numeric values.
The result of this operation is also a numeric value. The + and - operators are also supported in date/time fields
to allow date arithmetic.
The following table lists the supported arithmetic operators.
1140 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Functionality for the Impala Wire Protocol Driver
N/A % (Mod)
* Supported
+ Supported
- Supported
/ Supported
N/A ^ (XOR)
Character Operator
The concatenation operator (||) is not supported; however, the CONCAT function is supported by Impala SQL.
SELECT CONCAT('Name is', ’(ename FROM emp)’)
Relational Operators
Relational operators compare one expression to another.
The following table lists the supported relational operators.
<> Supported
< Supported
<= Supported
= Supported
<=> Supported
> Supported
>= Supported
[NOT] IN Supported
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1141
Chapter 9: Supported SQL Statements and Extensions
EXISTS Supported
RLIKE Supported
REGEXP Supported
Logical Operators
A logical operator combines the results of two component conditions to produce a single result or to invert the
result of a single condition. The following table lists the supported logical operators.
NOT ! Supported
OR || Supported
Functions
The following tables show how SQL-92 functions are supported in the Impala Query Language. Additional
methods may be supported with ODBC Escapes.
Count Supported
AVG Supported
MIN Supported
MAX Supported
SUM Supported
DISTINCT Supported
ALL Supported
1142 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Functionality for the Impala Wire Protocol Driver
Substring Supported
TRIM Supported.
93
CURRENT_TIME( ) Not supported
93
CURRENT_TIMESTAMP Not supported. Use UNIX_TIMESTAMP() .
COALESCE Supported.
93
Supported by ODBC Escapes
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1143
Chapter 9: Supported SQL Statements and Extensions
CAST Supported.
Restrictions
This section describes some of the functional restrictions of Impala.
Stored Procedures
Impala has no concept of stored procedures. Therefore, they are not supported by the driver.
Views
Impala has no concept of views. Therefore, they are not supported by the driver.
Other Restrictions
The Impala server has the following restrictions:
• Column values and parameters are always nullable
• No ROWID support
• No support for synonyms
• Primary and foreign keys are not supported.
• The length of a SQL string is limited to 2 GB.
• Support for indexes is incomplete.
1144 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
Purpose
The Alter Cache statement changes the definition of a cache on a remote table or view. An error is returned if
the remote table or view specified does not exist.
Syntax
ALTER CACHE ON {remote_table | view}
[REFERENCING (remote_table_ref[,remote_table_ref]...)]
[REFRESH_INTERVAL {0 | -1 | interval_value [{M, H, D}]}]
[INITIAL_CHECK [ONFIRSTCONNECT | FIRSTUSE | DEFAULT}]
[PERSIST {TEMPORARY | MEMORY | DISK | DEFAULT}]
[ENABLED {YES | TRUE | NO | FALSE}]
[CALL_LIMIT {0 | -1 | max_calls}]
[FILTER (expression)]
where:
remote_table
is the name of the remote table cache definition to be modified. The remote table name can be a
two-part name: schemaname.tablename. When specifying a two-part name, the specified remote
table must be defined in the specified schema, and you must have the privilege to alter objects in
the specified schema. When altering a relational cache, remote_table must specify the primary
table of the relational cache.
view
is the name of the view cache definition to be modified. The view name can be a two-part name:
schemaname.viewname. When specifying a two-part name, the specified view must be defined in
the specified schema, and you must have the privilege to alter objects in the specified schema.
Caches on views are not currently supported in the product.
REFERENCING
is an optional clause that specifies the name of the remote table(s) for which a relationship cache is
to be created. See Relational Caches on page 1146 and Referencing Clause on page 1156 for a complete
explanation.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1145
Chapter 9: Supported SQL Statements and Extensions
REFRESH_INTERVAL
is an optional clause that specifies the length of time the data in the cached table can be used before
being refreshed. See Refresh Interval Clause on page 1157 for a complete explanation.
INITIAL_CHECK
is an optional clause that specifies when the driver initially checks whether the data in the cache
needs refreshed. See Initial Check Clause on page 1157 for a complete explanation.
PERSIST
is an optional clause that specifies the life span of the data in the cached table or view. See Persist
Clause on page 1158 for a complete explanation.
ENABLED
is an optional clause that specifies whether the cache is enabled or disabled for use with SQL
statements. See Enabled Clause on page 1158 for a complete explanation.
CALL_LIMIT
is an optional clause that specifies the maximum number of Web service calls that can be used to
populate or refresh the cache. See Call Limit Clause on page 1159 for a complete explanation.
FILTER
is an optional clause that specifies a filter for the primary table to limit the number of rows that are
cached in the primary table. See Filter Clause on page 1160 for a complete explanation.
Notes
• At least one of the optional clauses must be used. If two or more are specified, they must be specified in
the order shown in the grammar description.
Relational Caches
If the Referencing clause is specified, the Alter Cache statement drops the existing cache and any referenced
caches and creates a new set of related caches, one for each of the tables specified in the statement. The
cache attributes for the existing cache are the default cache attributes for the new relational cache. Any attributes
specified in the Alter Cache statement override the default attributes. If the Referencing clause is not specified,
the existing cache references, if any, are used.
If the cache being altered is a relational cache, the attributes specified in the Alter Cache statement apply to
all of the caches that comprise the relational cache.
Alter Index
Purpose
The Alter Index statement changes the name of an existing index. Index names must not conflict with other
user-defined or system-defined names.
1146 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
Syntax
ALTER INDEX index_name RENAME TO new_name
where:
index_name
new_name
Alter Sequence
Purpose
The Alter Sequence statement resets the next value of an existing sequence.
Syntax
ALTER SEQUENCE sequence_name RESTART WITH value
where:
sequence_name
value
specifies the next value to be returned through the Next Value For clause (see Next Value For Clause
on page 1162).
Notes
• Indexes on remote tables cannot be created, altered or dropped. Indexes can only be defined on local tables
by the driver.
Purpose
The Alter Session statement changes various attributes of a database session or a remote session. A database
session maintains the state of the overall connection. A remote session maintains the state that pertains to a
particular remote data source connection.
Syntax
ALTER SESSION SET attribute_name=value
where:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1147
Chapter 9: Supported SQL Statements and Extensions
attribute_name
specifies the name of the attribute to be changed. Attributes apply to either database sessions or
remote sessions.
value
The following table lists the database and remote session attributes, and provides their descriptions.
Current_Schema Database Sets the current schema for the database session. The current
schema is the schema used when an identifier in a SQL statement
is unqualified. The string value must be the name of a schema visible
in the database session. For example:
ALTER SESSION SET CURRENT_SCHEMA=sforce
Stmt_Call_Limit Database Sets the maximum number of Web service calls the driver can make
in executing a statement. Setting the Stmt_Call_Limit attribute has
the same effect as setting the StmtCallLimit connection option. It sets
the default Web service call limit used by any statement on the
connection. Executing this command on a statement overrides the
previously set StmtCallLimit for the connection. The value specified
must be a positive integer or 0. The value 0 means that no call limit
exists. For example:
ALTER SESSION SET STMT_CALL_LIMIT=10
Ws_Call_Count Remote Resets the Web service call count of a remote session to the value
specified. The value must be zero or a positive integer.
WS_Call_Count represents the total number of Web service calls
made to the remote data source instance for the current session. For
example:
ALTER SESSION SET sforce.WS_CALL_COUNT=0
The current value of WS_Call_Count can be obtained by referring
to the System_Remote_Sessions system table (see
SYSTEM_REMOTE_SESSIONS Catalog Table in "The Salesforce
Driver" chapter for details). For example:
SELECT * FROM
information_schema.system_remote_sessions WHERE
session_id = cursessionid()
1148 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
Alter Table
Purpose
The Alter Table statement adds or removes a column. The table being altered can be either a remote or local
table. A remote table is a Salesforce object and is exposed in the SFORCE schema. A local table is maintained
by the driver and is local to the machine on which the driver is running. A local table is exposed in the PUBLIC
schema.
Syntax
ALTER TABLE table_name[add_clause] [drop_clause]
where:
table_name
add_clause
specifies a column or a foreign key constraint to be added to the table. See Add Clause: Columns
on page 1149 and Add Clause: Constraints on page 1150 for a complete explanation.
drop_clause
specifies a column to be dropped from the table. See Drop Clause: Columns on page 1151 for a
complete explanation.
Notes
• You cannot drop a constraint from a remote table.
Purpose
Use the Add clause to add a column to an existing table. It is optional.
This clause adds a column to the table. It defines a column with the same syntax as the Create Table command
(see Column Definition for Remote Tables on page 1163).
Syntax
ADD [COLUMN] column_nameDatatype ... [DEFAULT default_value] [[NOT]NULL] [EXT_ID]
[PRIMARY KEY] [START WITH starting_value]
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1149
Chapter 9: Supported SQL Statements and Extensions
default_value
is the default value to be assigned to the column. See Column Definition for Remote Tables on page
1163 for details.
starting_value
is the starting value for the Identity column. The default start value is 0.
Notes
• If NOT NULL is specified and the table is not empty, a default value must be specified. In all other respects,
this command is the equivalent of a column definition in a Create Table statement.
• You cannot specify ANYTYPE, BINARY, COMBOBOX, or TIME data types in the column definition of Alter
Table statements.
• If a SQL view includes SELECT * FROM for the table to which the column was added in the view’s Select
statement, the new column is added to the view.
Example A
Assuming the current schema is SFORCE, this example adds the status column with a default value of
ACTIVE to the test table.
ALTER TABLE test ADD COLUMN status TEXT(30) DEFAULT 'ACTIVE'
Example B
Assuming the current schema is SFORCE, this example adds a deptId column that can be used as a foreign
key column.
ALTER TABLE test ADD COLUMN deptId TEXT(18)
Purpose
Use the Add clause to add a constraint to an existing table. It is optional.
This command adds a constraint using the same syntax as the Create Table command (see Column Definition
for Remote Tables on page 1163).
Syntax
ADD [CONSTRAINT constraint_name] ...
Notes
• The only type of constraint you can add is a foreign key constraint.
• When adding a foreign key constraint, the table that contains the foreign key must be empty.
Example A
Assuming the current schema is SFORCE, a foreign key constraint is added to the deptId column of the test
table, referencing the rowId of the dept table. For the operation to succeed, the dept table must be empty.
ALTER TABLE test ADD FOREIGN KEY (deptId) REFERENCES dept(rowId)
1150 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
Purpose
Use the Drop clause to drop a column from an existing table. It is optional.
Syntax
DROP {[COLUMN] column_name | [CONSTRAINT] constraint_name}
where:
column_name
Notes
• The column being dropped cannot have a constraint defined on it.
• Drop fails if a SQL view includes the column.
Example A
This example drops the status column. For the operation to succeed, the status column cannot have a
constraint defined on it and cannot be used in a SQL view.
ALTER TABLE test DROP COLUMN status
Syntax
ALTER TABLE table_name [add_clause] [drop_clause] [rename_clause]
where:
table_name
add_clause
specifies a column or constraint to be added to the table. See Add Clause: Columns on page 1152
and Add Clause: Constraints on page 1150 for a complete explanation.
drop_clause
specifies a column or constraint to be dropped from the table. See Drop Clause: Columns on page
1151 and Drop Clause: Constraints on page 1153 for a complete explanation.
rename_clause
specifies a new name for the table. See Rename Clause on page 1154 for a complete explanation.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1151
Chapter 9: Supported SQL Statements and Extensions
Purpose
Use the Add clause to add a column to an existing table. It is optional.
This clause adds a column to the end of the column list. It defines a column with the same syntax as the Create
Table command (see Column Definition for Remote Tables on page 1163). If NOT NULL is specified and the
table is not empty, a default value must be specified. In all other respects, this command is the equivalent of
a column definition in a Create Table statement.
Syntax
ADD [COLUMN] column_nameDatatype ... [BEFORE existing_column]
Notes
• You cannot specify ANYTYPE, BINARY, COMBOBOX, or TIME data types in the column definition of Alter
Table statements.
• The optional Before existing_column can be used to specify the name of an existing column so that
the new column is inserted in a position just before the existing column.
• The optional Before existing_column can be used to specify the name of an existing column so that
the new column is inserted in a position just before the existing column.
• If a SQL view includes SELECT * FROM for the table to which the column was added in the view’s Select
statement, the new column is added to the view.
Example A
Assuming the current schema is PUBLIC, this example adds the status column with a default value of ACTIVE
to the test table.
ALTER TABLE test ADD COLUMN status VARCHAR(30) DEFAULT 'ACTIVE'
Example B
Assuming the current schema is PUBLIC, this example adds a deptId column that can be used as a foreign
key column.
ALTER TABLE test ADD COLUMN deptId VARCHAR(18)
Purpose
Use the Add clause to add a constraint to an existing table. It is optional.
This command adds a constraint using the same syntax as the Create Table command (see Constraint Definition
for Local Tables on page 1169).
Syntax
ADD [CONSTRAINT constraint_name] ...
Notes
• You cannot add a Unique constraint if one is already assigned to the same column list. A Unique constraint
works only if the values of the columns in the constraint columns list for the existing rows are unique or
include a Null value.
1152 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
• Adding a foreign key constraint to the table fails if, for each existing row in the referring table, a matching
row (with equal values for the column list) is not found in the referenced table.
Example A
Assuming the current schema is PUBLIC, this example adds a foreign key constraint to the deptId column
of the test table that references the rowId of the dept table.
ALTER TABLE test ADD CONSTRAINT test_fk FOREIGN KEY (deptId) REFERENCES dept(id)
Purpose
Use the Drop clause to drop a column from an existing table. It is optional.
Syntax
DROP {[COLUMN] column_name}
where:
column_name
Notes
• Drop fails if a SQL view includes the column.
Example A
This example drops the status column. For the operation to succeed, the status column cannot have a
constraint defined on it and cannot be used in a SQL view.
ALTER TABLE test DROP COLUMN status
Purpose
Use the Drop clause to drop a constraint from an existing table. It is optional.
Syntax
DROP {[CONSTRAINT] constraint_name}
where:
constraint_name
Notes
• The specified constraint cannot be a primary key constraint or unique constraint.
Example A
This example drops the test_fk constraint.
ALTER TABLE test DROP CONSTRAINT test_fk
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1153
Chapter 9: Supported SQL Statements and Extensions
Rename Clause
Purpose
Use the Rename clause to rename an existing table. It is optional.
Syntax
RENAME TO new_name
where:
new_name
Example A
This example renames the table to test2.
ALTER TABLE test RENAME TO test2
Checkpoint
Purpose
The Checkpoint statement ensures that all database changes in memory are committed to disk. Executing the
Checkpoint statement closes the database files, rewrites the script file, deletes the log file, and reopens the
database.
Syntax
CHECKPOINT [DEFRAG]
Notes
• If DEFRAG is specified, this statement evaluates abandoned space in the database data (.data) file and
shrinks the data file to its minimum size.
Purpose
The Create Cache statement creates a cache that holds the data of a remote table. The data is not loaded into
the cache when the Create Cache statement is executed; the data is loaded the first time that the remote table
is executed or when a Refresh Cache statement on the remote table is executed. An error is returned if the
remote table specified does not exist.
Syntax
CREATE CACHE ON {remote_table}
[REFERENCING (remote_table_ref[,remote_table_ref]...)]
[REFRESH_INTERVAL {0 | -1 | interval_value [{M, H, D}]}]
[INITIAL_CHECK [{ONFIRSTCONNECT | FIRSTUSE | DEFAULT}]
1154 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
where:
remote_table
is the name of the remote table from which data is to be cached on the client. The name of the cached
table is the same as the name of the remote table. When the table name is specified in a query, the
cached table is accessed, not the remote table.
The remote table name can be a two-part name: schemaname.tablename. When specifying a two-part name,
the specified remote table must be defined in the specified schema, and you must have the privilege to create
objects in the specified schema.
REFERENCING
is an optional clause that specifies the name of the remote table(s) for which a relationship cache is
to be created. See Relational Caches on page 1146 and Referencing Clause on page 1156 for a complete
explanation.
REFRESH_INTERVAL
is an optional clause that specifies the length of time the data in the cached table can be used before
being refreshed. See Refresh Interval Clause on page 1157 for a complete explanation.
INITIAL_CHECK
is an optional clause that specifies when the driver initially checks whether the data in the cache
needs refreshed. See Initial Check Clause on page 1157 for a complete explanation.
PERSIST
is an optional clause that specifies the life span of the data in the cached table or view. See Persist
Clause on page 1158 for a complete explanation.
ENABLED
is an optional clause that specifies whether the cache is enabled or disabled for use with SQL
statements. See Enabled Clause on page 1158 for a complete explanation.
CALL_LIMIT
is an optional clause that specifies the maximum number of Web service calls that can be used to
populate or refresh the cache. See Call Limit Clause on page 1159 for a complete explanation.
FILTER
is an optional clause that specifies a filter for the primary table to limit the number of rows that are
cached in the primary table. See Filter Clause on page 1160 for a complete explanation.
Notes
• Caches on views are not supported.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1155
Chapter 9: Supported SQL Statements and Extensions
• If two or more optional clauses are specified, they must be specified in the order shown in the grammar
description.
Relational Caches
If the Referencing clause is specified, the Create Cache statement creates a set of related caches, one for
each of the tables specified in the statement. This set of caches is referred to as a related or relational cache.
The set of caches in a relational cache is treated as a single entity. They are refreshed, altered, and dropped
as a unit. Any attributes specified in the Create Cache statement apply to the cache created for the primary
table and to the caches created for all of the referenced tables specified.
A database session can have both standalone and relational caches defined, but only one cache can be defined
on a table. If a table is referenced in a relational cache definition, a standalone cache cannot be created on
that table.
Referencing Clause
Purpose
The Referencing clause specifies the name of the remote table(s) for which a relationship cache is to be created;
it is optional. The specified remote table must be related to either the primary table being cached or one of the
other specified related tables. The remote table name cannot include a schema name. The referenced tables
must exist in the same schema as the primary table.
Syntax
REFERENCING (remote_table_ref[,remote_table_ref]...)]
where:
remote_table_ref
represents remote_table[.foreign_key_name]
remote_table
specifies one or more tables related to the primary table that are to be cached in conjunction with
the primary table.
foreign_key_name
specifies the name of the foreign key relationship between the remote table and the primary table
(or, optionally, another related table). If a foreign key name is not specified, the driver attempts to
find a relationship between the remote table and one of the other tables specified in the relational
cache. The driver first looks for a relationship to the primary table. If a relationship to the primary
table does not exist, the driver then looks for a relationship to other referenced tables.
1156 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
Purpose
The Refresh Interval clause specifies the length of time the data in the cached table can be used before being
refreshed; it is optional. The driver maintains a timestamp of when the data in a table was last refreshed. When
a cached table is used in a query, the driver checks if the current time is greater than the last refresh time plus
the value of Refresh_Interval. If it is, the driver refreshes the data in the cached table before processing the
query.
Syntax
[REFRESH_INTERVAL {0 | -1 | interval_value [{M, H, D}]}]
where:
specifies that the cache is refreshed manually. You can use the Refresh Cache statement to refresh
the cache manually.
-1
interval_value
is a positive integer that specifies the amount of time between refreshes. The default unit of time is
hours (H). You can also specify M for minutes or D for days. For example, 60M would set the time
between refreshes to 60 minutes.The default refresh interval is 12 hours.
Purpose
The Initial Check clause specifies when the driver performs its initial check of the data in the cache to determine
whether it needs to be refreshed; it is optional.
Syntax
[INITIAL_CHECK [ONFIRSTCONNECT | FIRSTUSE | DEFAULT}]
where:
ONFIRSTCONNECT
specifies that the initial check is performed the first time a connection for a user is established.
Subsequently, it is performed each time the table or view is used. A driver session begins on the
first connection for a user and the session is active as long as at least one connection is open for
the user.
FIRSTUSE
specifies that the initial check is performed the first time the table or view is used in a query.
Subsequently, it is performed each time the table or view is used.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1157
Chapter 9: Supported SQL Statements and Extensions
DEFAULT
Persist Clause
Purpose
The Persist clause specifies the life span of the data in the cached table or view; it is optional.
Syntax
[PERSIST {TEMPORARY | MEMORY | DISK | DEFAULT}]
where:
TEMPORARY
specifies that the data exists for the life of the driver session. When the driver session ends, the data
is discarded. A driver session begins on the first connection for a user and the session is active if at
least one connection is open for the user.
MEMORY
specifies that the data exists beyond the life of the connection. While the connection is active, the
cached data is stored in memory. When the connection is closed, the cached data is persisted to
disk. If the connection ends abnormally, changes to the cached data may not be persisted to disk.
This is the default.
DISK
specifies that the data exists beyond the life of the connection. A portion of the cached data is stored
in memory while the connection is active. If the size of the cached data exceeds the cache memory
threshold, the remaining data is stored on disk. When the connection is closed, the portion of the
cached data that is in memory is persisted to disk. If the connection ends abnormally, changes to
the cached data held in memory may not be persisted to disk.
DEFAULT
Notes
• You can design your application to force all cached data held in memory to be persisted to disk at any time
by using the Checkpoint on page 1154 statement.
• If you specify a value of MEMORY or DISK for the Persist clause, the remote data remains on the client past
the lifetime of the application.
Enabled Clause
Purpose
The Enabled clause specifies whether the cache is enabled or disabled for use with SQL statements; it is
optional.
1158 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
Syntax
[ENABLED {YES | TRUE | NO | FALSE}]
where:
YES | TRUE
specifies that the cache is enabled. When a cache is enabled, the driver accesses the cached data
for the remote table or view when a query is executed.
The driver does not check whether the cache needs to be refreshed when the Alter Cache statement
is used to enable the cache. The check occurs the next time that the cache is accessed.
NO | FALSE
specifies that the cache is disabled, which means that the driver accesses the data in the remote
table or view rather than the cache when a query is executed. The driver does not update the cache
when inserts, updates, and deletes are performed on a remote table or view. To use the cache, you
must enable it.
All data in an existing cache is persisted on the client even when the cache is disabled, except for
the case where PERSIST is set to TEMPORARY.
Purpose
The Call Limit clause specifies the maximum number of Web service calls that can be used to populate or
refresh the cache; it is optional.
Syntax
[CALL_LIMIT {0 | -1 | max_calls}]
where:
-1
resets the call limit back to its default, which is 0 (no call limit).
max_calls
is a positive integer that specifies the maximum number of Web service calls.
Notes
• The call limit for a cache is independent of the Stmt_Call_Limit set on a database session. See Alter Session
(EXT) on page 1147 for details.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1159
Chapter 9: Supported SQL Statements and Extensions
If the call limit of a cache is exceeded during the population or refresh of the cache, the cache is marked
as partially initialized. At the next refresh opportunity, the driver attempts to complete the population or
refresh of the cache. If the call limit (or other error) occurs during this second attempt, the cache becomes
invalid and is disabled. All data in the cache is discarded after the second attempt to populate or refresh
the cache fails. Before re-enabling the cache, consider altering the cache definition to allow more Web
service calls or specify a more restrictive filter, or both.
Filter Clause
Purpose
Filter is an optional clause that specifies a filter for the primary table to limit the number of rows that are cached
in the primary table. This clause is not supported for views.
Syntax
[FILTER (expression)]
where:
expression
is any valid Where clause. See Where Clause on page 1186 for details. Do not include the Where
keyword in the clause. The filter for an existing cache can be removed by specifying an empty string
for the filter expression, for example, FILTER().
Example
The following example filters by last activity date.
FILTER (lastactivitydate >= {d'2010-01-01'})
Example A
The Referencing clause allows multiple related tables to be cached as a single entity. The following example
creates a cache on the remote table account. The cache is populated with all accounts that had activity in 2010.
Additionally, caches are created for the following remote tables: opportunity, contact, and
opportunitylineitem. These caches are populated with the opportunities and contacts that are associated
with the accounts stored in the accounts cache and the opportunity line items associated with the opportunities
stored in the opportunity cache.
CREATE CACHE ON account REFERENCING (opportunity, contact, opportunitylineitem)
FILTER (lastactivitydate >= {d'2010-01-01'})
Example B
The following example caches all rows of the account table with a refresh interval of 12 hours, checks whether
data of the cached table needs to be refreshed on the first use, persists the data beyond the life of the connection,
and stores the data in memory while the connection is active.
CREATE CACHE ON account
Example C
The following example caches all active accounts in the account table with a refresh interval of 1 day, checks
whether data of the cached table needs to be refreshed when the connection is established, and discards the
data when the connection is closed.
1160 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
Create Index
Purpose
The Create Index statement creates an index on one or more columns in a local table.
Syntax
CREATE [UNIQUE] INDEX index_name ON table_name (column_name [, ...])
where:
UNIQUE
index_name
table_name
column_name
Notes
• The driver cannot create an index in a remote table; the driver returns an error indicating that the operation
cannot be performed on a remote table.
• Creating a unique constraint is the preferred way to specify that the values of a column must be unique.
Create Sequence
Purpose
The Create Sequence statement creates an auto-incrementing sequence for a local table.
Syntax
CREATE SEQUENCE sequence_name [AS {INTEGER | BIGINT}] [START WITH start_value]
[INCREMENT BY increment_value]
where:
sequence_name
specifies the name of the sequence. By default, the sequence type is INTEGER.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1161
Chapter 9: Supported SQL Statements and Extensions
start_value
specifies the starting value of the sequence. The default start value is 0.
increment_value
specifies the value of the increment; the value must be a positive integer. The default increment is
1.
Purpose
Use the Next Value For clause to specify the next value for a sequence that is used in a Select, Insert, or
Update statement.
Syntax
NEXT VALUE FOR sequence_name
where:
sequence_name
specifies the name of the sequence from which to retrieve the value.
Example
The following example retrieves the next value or set of values in Sequence1:
SELECT NEXT VALUE FOR Sequence1 FROM Account
Create Table
For information on... See...
Creating a remote table Creating a Remote Table on page 1162
Creating a local table Creating a Local Table on page 1167
Purpose
Use the Create Table statement to create a new table. You can create either a remote or local table. A remote
table is a Salesforce object and is exposed in the SFORCE schema. Creating a table in the SFORCE schema
creates a remote table. A local table is maintained by the driver and is local to the machine on which the driver
is running. A local table is exposed in the PUBLIC schema. Creating a table in the PUBLIC schema creates a
local table.
Syntax
CREATE TABLE table_name (column_definition [, ...] [, constraint_definition...])
where:
1162 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
table_name
specifies the name of the new remote table. The table name can be qualified by a schema name
using the format schema.table. If the schema is not specified, the table is created in the current
schema. See Alter Session (EXT) on page 1147 for information about changing the current schema.
column_definition
specifies the definition of a column in the new table. See Column Definition for Remote Tables on
page 1163 for a complete explanation.
constraint_definition
specifies constraints on the columns of the new table. See Constraint Definition for Remote Tables
on page 1164 for a complete explanation.
Notes
• Creating tables in Salesforce is not a quick operation. It can take several minutes for Salesforce to create
the table and its relationships.
Purpose
Defines the syntax to define a column for remote tables.
Syntax
column_name Datatype [(precision[,scale])...] [DEFAULT
default_value][[NOT]NULL][EXT_ID][PRIMARY KEY] [START WITH starting_value]
where:
column_name
Datatype
is the data type of the column to be created. See Data Types in "The Salesforce Driver" chapter of
the DataDirect Connect Series for ODBC User’s Guide for a list of supported Salesforce data types.
You cannot specify ANYTYPE, BINARY, COMBOBOX, ENCRYPTEDTEXT, or TIME data types in
the column definition of Create Table statements.
precision
is the total number of digits for DECIMAL columns, the number of seconds for DATETIME columns,
and the length of HTML, LONGTEXTAREA, and TEXT columns.
scale
is the number of digits to the right of the decimal point for DECIMAL columns.
default_value
is the default value to be assigned to the column. The following default values are allowed in column
definitions for remote tables:
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1163
Chapter 9: Supported SQL Statements and Extensions
is the starting value for the Identity column. The default start value is 0.
[NOT]NULL
is used to specify whether NULL values are allowed or not allowed in a column. If NOT NULL is
specified, all rows in the table must have a column value. If NULL is specified or if neither NULL or
NOT NULL is specified, NULL values are allowed in the column.
EXT_ID
PRIMARY KEY
can only be specified when the data type of the column is ID. ID columns are always the primary
key column for Salesforce.
START WITH
specifies the sequence of numbers generated for the Identity column. It can only be used when the
data type of the column definition is AUTONUMBER.
Example A
Assuming the current schema is SFORCE, the remote table Test is created in the SFORCE schema. The id
column has a starting value of 1000.
CREATE TABLE Test (id AUTONUMBER START WITH 1000, Name TEXT(30))
Example B
The table name is qualified with a schema name that is not the current schema, creating the Test table in the
SFORCE schema. The table is created with the following columns: id, Name, and Status. The Status column
contains a default value of ACTIVE.
CREATE TABLE SFORCE.Test (id NUMBER(9, 0), Name TEXT(30), Status TEXT(10) DEFAULT
'ACTIVE')
Example C
Assuming the current schema is SFORCE, the remote table dept is created with the name and deptId
columns. The deptId column can be used as an external ID column.
CREATE TABLE dept (name TEXT(30), deptId NUMBER(9, 0) EXT_ID)
Purpose
Defines the syntax to define a contraint for a remote table.
1164 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
Syntax
[CONSTRAINT [constraint_name]
{foreign_key_constraint}]
where:
constraint_name
Is ignored. The driver uses the Salesforce relationship naming convention to generate the constraint
name.
foreign_key_constraint
Defines a link between related tables. See Foreign Key Clause on page 1166 for syntax.
A column defined as a foreign key in one table references a primary key in the related table. Only
values that are valid in the primary key are valid in the foreign key. The following example is valid
because the foreign key values of the dept id column in the EMP table match those of the id column
in the referenced table DEPT:
DEPT EMP
(Foreign Key)
1 Dev 1 Mark 1
2 Finance 1 Jim 3
3 Sales 1 Mike 2
The following example, however, is not valid. The value 4 in the dept id column does not match any
value in the referenced id column of the DEPT table.
DEPT EMP
(Foreign Key)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1165
Chapter 9: Supported SQL Statements and Extensions
1 Dev 1 Mark 1
2 Finance 1 Jim 3
3 Sales 1 Mike 4
Purpose
Defines the syntax to specify a foreign key for a constraint.
Syntax
FOREIGN KEY (fcolumn_name) REFERENCES ref_table (pcolumn_name)
where:
fcolumn_name
specifies the foreign key column to which the constraint is applied. The data type of this column must
be the same as the data type of the column it references.
ref_table
pcolumn_name
specifies the primary key column in the referenced table. For Salesforce, the primary key column is
always the rowId column.
Example
Assuming the current schema is SFORCE, the remote table emp is created with the name, empId, and deptId
columns. The table contains a foreign key constraint on the deptId column, referencing the rowId in the
dept table created in Example C on page 1164. For the operation to succeed, the data type of the deptId
column must be the same as that of the rowId column.
CREATE TABLE emp (name TEXT(30), empId NUMBER(9, 0) EXT_ID, deptId TEXT(18),
FOREIGN KEY(deptId) REFERENCES dept(rowId))
1166 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
Syntax
CREATE [{MEMORY | DISK | [GLOBAL] {TEMPORARY | TEMP}]
TABLE table_name (column_definition [, ...]
[, constraint_definition...]) [ON COMMIT {DELETE | PRESERVE} ROWS
where:
MEMORY
creates the new table in memory. The data for a memory table is held entirely in memory for the
duration of the database session. When the database is closed, the data for the memory table is
persisted to disk.
DISK
creates the new table on disk. A disk table caches a portion of its data in memory and the remaining
data on disk.
are equivalent and create the new table as a global temporary table. The GLOBAL qualifier is optional.
The definition of a global temporary table is visible to all connections. The data written to a global
temporary table is visible only to the connection used to write the data.
Note: If MEMORY, DISK, or TEMPORARY/TEMP is not specified, the new table is created in
memory.
table_name
column_definition
specifies the definition of a column in the new table. See Column Definition for Local Tables on page
1168 for a complete explanation.
constraint_definition
specifies constraints on the columns of the new table. See Constraint Definition for Local Tables on
page 1169 for a complete explanation.
preserves row values in a temporary table while the connection is open; this is the default action.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1167
Chapter 9: Supported SQL Statements and Extensions
Purpose
Use the following syntax to define a column for local tables.
Syntax
column_name Datatype [(precision[,scale])]
[{DEFAULT default_value | GENERATED BY DEFAULT AS IDENTITY
(START WITH n[, INCREMENT BY m])}] | [[NOT] NULL]
[IDENTITY] [PRIMARY KEY]
where:
column_name
Datatype
is the data type of the column to be created. See Data Types in "The Salesforce Driver" chapter of
the DataDirect Connect Series for ODBC User’s Guide for a list of supported Salesforce data types.
You cannot specify ANYTYPE, BINARY, COMBOBOX, or TIME data types in the column definition
of Create Table statements.
precision
is the number characters for CHAR and VARCHAR columns, the number of bytes for BINARY and
VARBINARY columns, and the total number of digits for DECIMAL columns.
scale
is the number of digits to the right of the decimal point for DECIMAL columns and the number of
seconds for DATETIME columns.
default_value
is the default value to be assigned to the column. The following default values are allowed in column
definitions for local tables:
• For character columns, a single-quoted string or NULL. The only SQL function that can be used is
CURRENT_USER.
• For datetime columns, a single-quoted Date, Time, or Timestamp value or NULL. You can also use the
following datetime SQL functions: CURRENT_DATE, CURRENT_TIME, CURRENT_ TIMESTAMP, TODAY,
or NOW.
• For boolean columns, the literals FALSE, TRUE, NULL.
• For numeric columns, any valid number or NULL.
• For binary columns, any valid hexadecimal string or NULL.
IDENTITY | GENERATED BY DEFAULT AS IDENTITY
defines an auto-increment column. Either clause can be specified only on INTEGER or BIGINT
columns. Identity columns are considered primary key columns, so a table can have only one Identity
column.
1168 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
The GENERATED BY DEFAULT AS IDENTITY clause is the standard SQL syntax for specifying
an Identity column.
specifies the sequence of numbers generated for the Identity column. n and m are the starting and
incrementing values, respectively, for an Identity column. The default start value is 0 and the default
increment value is 1.
Example A
Assuming the current schema is PUBLIC, a local table is created. id is an identity column with a starting value
of 0 and an increment value of 1 because no Start With and Increment By clauses are specified.
CREATE TABLE Test (id INTEGER GENERATED BY DEFAULT AS IDENTITY, name VARCHAR(30))
This example is equivalent to the previous example.
CREATE TABLE Test (id INTEGER IDENTITY, name VARCHAR(30))
Example B
Assuming the current schema is PUBLIC, a local table is created. id is an identity column with a starting value
of 2 and an increment of 2.
CREATE TABLE Test (id INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 2,
INCREMENT BY 2), name VARCHAR(30))
Purpose
Defines the syntax to define a contraint for a local table.
Syntax
[CONSTRAINT [constraint_name]
{unique_constraint |
primary_key_constraint |
foreign_key_constraint}]
where:
constraint_name
unique_constraint
specifies a constraint on a single column in the table. See Unique Clause for syntax.
Values in the constrained column cannot be repeated, except in the case of null values. For example:
ColA
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1169
Chapter 9: Supported SQL Statements and Extensions
NULL
NULL
primary_key_constraint
specifies a constraint on one or more columns in the table. See Primary Key Clause for syntax.
Values in a single column primary key column must be unique. Values across multiple constrained
columns cannot be repeated, but values within a column can be repeated. Null values are not allowed.
For example:
Col A Col B
2 1
3 1
4 2
5 2
6 2
foreign_key_constraint
defines a link between related tables. See Foreign Key Clause on page 1166 for syntax.
A column defined as a foreign key in one table references a primary key in the related table. Only
values that are valid in the primary key are valid in the foreign key. The following example is valid
because the foreign key values of the dept id column in the EMP table match those of the id column
in the referenced table DEPT:
DEPT EMP
(Foreign Key)
1170 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
1 Dev 1 Mark 1
2 Finance 1 Jim 3
3 Sales 1 Mike 2
The following example, however, is not valid. The value 4 in the dept id column does not match any
value in the referenced id column of the DEPT table.
DEPT EMP
(Foreign Key)
1 Dev 1 Mark 1
2 Finance 1 Jim 3
3 Sales 1 Mike 4
Unique Clause
UNIQUE (column_name [,column_name...])
where:
column_name
specifies the column to which the constraint is applied. Multiple columns names must be separated
by commas.
column_name
specifies the primary key column to which the constraint is applied. Multiple column names must be
separated by commas.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1171
Chapter 9: Supported SQL Statements and Extensions
fcolumn_name
specifies the foreign key column to which the constraint is applied. Multiple column names must be
separated by commas.
ref_table
pcolumn_name
specifies the primary key column or columns referenced in the referenced table. Multiple column
names must be separated by commas.
ON DELETE
is a clause that defines the operation performed when a row in the table referenced by a foreign key
constraint is deleted. One of the following operators must be specified in the On Delete clause:
where:
• CASCADE specifies that all rows in the foreign key table that reference the deleted row in the
primary key table are also deleted.
• SET DEFAULT specifies that the value of the foreign key column is set to the column default
value for all rows in the foreign key table that reference the deleted row in the primary key table.
• SET NULL specifies that the value of the foreign key column is set to NULL for all rows in the
foreign key table that reference the deleted row in the primary key table.
ON UPDATE
is a clause that defines the operation performed when the primary key of a row in the table referenced
by a foreign key constraint is updated. One of the following operators must be specified in the On
Update clause:
• CASCADE specifies that the value of the foreign key column for all rows in the foreign key table
that reference the row in the primary key table that had the primary key updated are updated with
the new primary key value.
• SET DEFAULT specifies that the value of the foreign key column is set to the column default
value for all rows in the foreign key table that reference the row that had the primary key updated
in the primary key table.
• SET NULL specifies that the value of the foreign key column is set to NULL for all rows in the
foreign key table that reference the row that had the primary key updated in the primary key table.
Notes
• You must specify at least one constraint.
• Both the On Delete and On Update clauses can be used in a single foreign key definition.
1172 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
Example
Assuming the current schema is PUBLIC, the emp table is created with the name, empId, and deptId columns.
The table contains a foreign key constraint on the deptId column that references the id column in the dept
table. In addition, it sets the value of any rows in the deptId column to NULL that point to a deleted row in the
referenced dept table.
CREATE TABLE emp (name VARCHAR(30), empId INTEGER, deptId INTEGER, FOREIGN
KEY(deptId) REFERENCES dept(id)) ON DELETE SET NULL)
Create View
Purpose
The Create View statement creates a new view. A view is analogous to a named query. The view's query can
refer to any combination of remote and local tables as well as other views. Views are read-only; they cannot
be updated.
Syntax
CREATE VIEW view_name[(view_column,...)] AS
SELECT ... FROM ... [WHERE Expression]
[ORDER BY order_expression [, ...]]
[LIMIT limit [OFFSET offset]];
where:
view_name
view_column
specifies the column associated with the view. Multiple column names must be separated by commas.
The other commands used for Create View are the same as those used for Select (see Select on page 1181).
Notes
• A view can be thought of as a virtual table. A Select statement is stored in the database; however, the data
accessible through a view is not stored in the database. The result set of the Select statement forms the
virtual table returned by the view. You can use this virtual table by referring to the view name in SQL
statements the same way you refer to a table. A view is used to perform any or all of these functions:
• Restrict a user to specific rows in a table.
• Restrict a user to specific columns.
• Join columns from multiple tables so that they function like a single table.
• Aggregate information instead of supplying details. For example, the sum of a column, or the maximum
or minimum value from a column can be presented.
• Views are created by defining the Select statement that retrieves the data to be presented by the view.
• The Select statement in a View definition must return columns with distinct names. If the names of two
columns in the Select statement are the same, use a column alias to distinguish between them. Alternatively,
you can define a list of new columns for a view.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1173
Chapter 9: Supported SQL Statements and Extensions
Example A
This example creates a view named myOpportunities that selects data from three database tables to present
a virtual table of data.
CREATE VIEW myOpportunities AS
SELECT a.name AS AccountName,
o.name AS OpportunityName,
o.amount AS Amount,
o.description AS Description
FROM Opportunity o INNER JOIN Account a
ON o.AccountId = a.id
INNER JOIN User u
ON o.OwnerId = u.id
WHERE u.name = 'MyName'
AND o.isClosed = 'false'
ORDER BY Amount desc
You can then refer to the myOpportunities view in statements just as you would refer to a table. For example:
SELECT * FROM myOpportunities;
Example B
The myOpportunities view contains a detailed description for each opportunity, which may not be needed when
only a summary is required. A view can be built that selects only specific myOpportunities columns as shown
in the following example:
CREATE VIEW myOpps_NoDesc as
SELECT AccountName,
OpportunityName,
Amount
FROM myOpportunities
The view selects the name column from both the opportunity and account tables. These columns are assigned
the alias OpportunityName and AccountName, respectively.
Delete
Purpose
The Delete statement is used to delete rows from a table.
Syntax
DELETE FROM table_name [WHERE search_condition]
where:
table_name
specifies the name of the table from which you want to delete rows.
search_condition
1174 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
Notes
• The Where clause determines which rows are to be deleted. Without a Where clause, all rows of the table
are deleted, but the table is left intact. See Where Clause on page 1186 for information about the syntax of
Where clauses. Where clauses can contain subqueries.
Example A
This example shows a Delete statement on the emp table.
DELETE FROM emp WHERE emp_id = 'E10001'
Each Delete statement removes every record that meets the conditions in the Where clause. In this case, every
record having the employee ID E10001 is deleted. Because employee IDs are unique in the employee table,
at most, one record is deleted.
Example B
This example shows using a subquery in a Delete clause.
DELETE FROM emp WHERE dept_id = (SELECT dept_id FROM dept WHERE dept_name =
'Marketing')
The records of all employees who belong to the department named Marketing are deleted.
Purpose
The Drop Cache statement drops the cache defined on a remote table. To drop a relational cache, the specified
table must be the primary table of the relational cache. If a relational cache is specified, the cache for the
primary table and all referenced caches are dropped.
Syntax
DROP CACHE ON {remote_table} [IF EXISTS]
where:
remote_table
is the name of the remote table cache to be dropped. The remote table name can be a two-part
name: schemaname.tablename. When specifying a two-part name, the specified remote table
must be mapped in the specified schema, and you must have the privilege to drop objects in the
specified schema.
IF EXISTS
specifies that an error is not to be returned if a cache for the remote table or view does not exist.
Notes
• Caches on views are not supported.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1175
Chapter 9: Supported SQL Statements and Extensions
Drop Index
Purpose
The Drop Index statement drops an index for a local table.
Syntax
DROP INDEX index_name [IF EXISTS]
where:
index_name
IF EXISTS
specifies that an error is not to be returned if the index does not exist. The Drop Index command
generates an error if an index that is associated with a UNIQUE or FOREIGN KEY constraint is
specified.
Notes
• Indexes on a remote table cannot be dropped. Only indexes on local tables can be created, altered, and
dropped.
Drop Sequence
Purpose
The Drop Sequence statement drops a sequence for local tables.
Syntax
DROP SEQUENCE sequence_name [IF EXISTS] [RESTRICT|CASCADE]
where:
sequence_name
IF EXISTS
specifies that an error is not to be returned if the sequence does not exist.
RESTRICT
is in effect by default, meaning that the drop fails if any view refers to the sequence.
CASCADE
1176 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
Drop Table
Purpose
The Drop Table statement drops (removes) a remote or local table, its data, and its indexes. A remote table is
a Salesforce object and is exposed in the SFORCE schema. Dropping a table in the SFORCE schema drops
a remote table. A local table is maintained by the driver and is local to the machine on which the driver is
running. A local table is exposed in the PUBLIC schema. Dropping a table in the PUBLIC schema drops a local
table.
Syntax
DROP TABLE table_name [IF EXISTS] [RESTRICT | CASCADE]
where:
table_name
IF EXISTS
specifies that an error is not to be returned if the table does not exist.
RESTRICT
is in effect by default, meaning that the drop fails if any tables or views reference this table.
CASCADE
specifies that the drop extends to linked objects. If the specified table is a local table, it drops all
dependent views and any foreign key constraints that link this table to other tables. If the specified
table is a remote table, any tables that reference the specified table are dropped also.
Drop View
Purpose
The Drop View statement drops a view.
Syntax
DROP VIEW view_name [IF EXISTS] [RESTRICT | CASCADE]
where:
view_name
IF EXISTS
specifies that an error is not to be returned if the view does not exist.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1177
Chapter 9: Supported SQL Statements and Extensions
RESTRICT
is in effect by default, meaning that the drop fails if any other view refers to this view.
CASCADE
Explain Plan
Purpose
The Explain Plan statement can be used with any query to retrieve a detailed list of the elements in the execution
plan. Explain Plan generates a result set with a single column named OPERATION. The individual elements
that comprise the plan are returned as rows in the result set.
Syntax
EXPLAIN PLAN FOR {SELECT ... | DELETE ... | INSERT ... | UPDATE ...}
The returned list of elements includes the indexes used for performing the query and can be used to optimize
the query.
Insert
Purpose
The Insert statement is used to add new rows to a table. You can specify either of the following options:
• List of values to be inserted as a new row
• Select statement that copies data from another table to be inserted as a set of new rows
Syntax
INSERT INTO table_name [(column_name[,column_name]...)] {VALUES (expression
[,expression]...) | select_statement}
table_name
column_name
is optional and specifies an existing column. Multiple column names (a column list) must be separated
by commas. A column list provides the name and order of the columns, the values of which are
specified in the Values clause. If you omit a column_name or a column list, the value expressions
must provide values for all columns defined in the table and must be in the same order that the
columns are defined for the table. Table columns that do not appear in the column list are populated
with the default value, or with NULL if no default value is specified. See Specifying an External ID
Column on page 1179 for more information.
1178 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
expression
is the list of expressions that provides the values for the columns of the new record. Typically, the
expressions are constant values for the columns. Character string values must be enclosed in single
quotation marks (’). See Literals on page 1193 for more information.
select_statement
is a query that returns values for each column_name value specified in the column list. Using a
Select statement instead of a list of value expressions lets you select a set of rows from one table
and insert it into another table using a single Insert statement. The Select statement is evaluated
before any values are inserted. This query cannot be made on the table into which values are inserted.
See Select on page 1181 for information about Select statements.
EXT_ID
is used to specify that the column specified by ext_id_column is used to look up the rowid to be
inserted into the column specified by column_name.
schema_name
is the name of the schema of the table that contains the foreign key column being specified as the
external ID column.
table_name
is the name of the table that contains the foreign key column being specified as the external ID
column.
ext_id_column
Example A
The following example uses a list of expressions to insert records. Each Insert statement adds one record to
the database table. In this case, one record is added to the table emp. Values are specified for five columns.
The remaining columns in the table are assigned the default value or NULL if no default value is specified.
INSERT INTO emp (last_name,
first_name,
emp_id,
salary,
hire_date)
VALUES ('Smith', 'John', 'E22345', 27500, {1999-04-06})
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1179
Chapter 9: Supported SQL Statements and Extensions
Example B
The following example uses a Select statement to insert records. The number of columns in the result of the
Select statement must match exactly the number of columns in the table if no column list is specified, or it must
match the number of column names specified in the column list. A new entry is created in the table for every
row of the Select result.
INSERT INTO emp1 (first_name,
last_name,
emp_id,
dept,
salary)
SELECT first_name, last_name, emp_id, dept, salary FROM emp
WHERE dept = 'D050'
Example C
The following example uses a list of expressions to insert records and specifies an external ID column (a foreign
key column) named accountId that references a table that has an external ID column named AccountNum.
Purpose
The Refresh Cache statement forces the data in the cache for the specified remote table to be refreshed.
Syntax
REFRESH CACHE ON {remote_table | ALL} [CLEAN]
where:
remote_table
is the name of the remote table cache to be refreshed. The remote table name can be a two-part
name: schemaname.tablename. When specifying a two-part name, the specified remote table
must be mapped in the specified schema, and you must have the privilege to insert, update, and
delete objects in the specified schema.
ALL
CLEAN
is optional and discards the data in the cache for the specified table or view, or all cache data if ALL
is specified, and repopulates the cache with the data in the remote table or view.
Notes
• Caches on views are not supported.
1180 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
Purpose
The Refresh Schema statement updates the remote object mapping and other information contained in a
remote schema.
Syntax
REFRESH SCHEMA schema_name
where:
schema_name
Select
Purpose
Use the Select statement to fetch results from one or more tables. The Select statement can operate on local
and remote tables in any combination.
Syntax
SELECT select_clausefrom_clause
[where_clause]
[groupby_clause]
[having_clause]
[{UNION [ALL | DISTINCT] |
{MINUS [DISTINCT] | EXCEPT [DISTINCT]} |
INTERSECT [DISTINCT]} select_statement]
[orderby_clause]
[limit_clause]
where:
select_clause
specifies the columns from which results are to be returned by the query. See Select Clause on page
1182 for a complete explanation.
from_clause
specifies one or more tables on which the other clauses in the query operate. See From Clause on
page 1184 for a complete explanation.
where_clause
is optional and restricts the results that are returned by the query. See Where Clause on page 1186
for a complete explanation.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1181
Chapter 9: Supported SQL Statements and Extensions
groupby_clause
is optional and allows query results to be aggregated in terms of groups. See Group By Clause on
page 1186 for a complete explanation.
having_clause
is optional and specifies conditions for groups of rows (for example, display only the departments
that have salaries totaling more than $200,000). See Having Clause on page 1187 for a complete
explanation.
UNION
is an optional operator that combines the results of the left and right Select statements into a single
result. See Union Operator on page 1187 for a complete explanation.
INTERSECT
is an optional operator that returns a single result by keeping any distinct values from the results of
the left and right Select statements. See Intersect Operator on page 1188 for a complete explanation.
EXCEPT | MINUS
are synonymous optional operators that returns a single result by taking the results of the left Select
statement and removing the results of the right Select statement. See Except and Minus Operators
on page 1189 for a complete explanation.
orderby_clause
is optional and sorts the results that are returned by the query. See Order By Clause on page 1190 for
a complete explanation.
limit_clause
is optional and places an upper bound on the number of rows returned in the result. See Limit Clause
on page 1190 for a complete explanation.
Select Clause
Purpose
Use the Select clause to specify with a list of column expressions that identify columns of values that you want
to retrieve or an asterisk (*) to retrieve the value of all columns.
Syntax
SELECT [{LIMIT offsetnumber | TOP number}] [ALL | DISTINCT] {* | column_expression
[[AS] column_alias] [,column_expression [[AS] column_alias], ...]}
[INTO [DISK | TEMP] new_table]
where:
creates the result set for the Select statement first and then discards the first number of rows specified
by offset and returns the number of remaining rows specified by number. To not discard any of
1182 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
the rows, specify 0 for offset, for example, LIMIT 0 number. To discard the first offset
number of rows and return all the remaining rows, specify 0 for number, for example, LIMIT offset0.
TOP number
column_expression
can be simply a column name (for example, last_name). More complex expressions may include
mathematical operations or string manipulation (for example, salary * 1.05). See SQL Expressions
on page 1193 for details. column_expression can also include aggregate functions. See Aggregate
Functions on page 1183 for details.
column_alias
can be used to give the column a descriptive name. For example, to assign the alias department to
the column dep:
DISTINCT
eliminates duplicate rows from the result of a query. This operator can precede the first column
expression. For example:
INTO
copies the result set into new_table. INTO DISK creates the new table in cached memory. INTO
TEMP creates a temporary table.
Notes
• Separate multiple column expressions with commas (for example, SELECT last_name, first_name,
hire_date).
• Column names can be prefixed with the table name or table alias. For example, SELECT emp.last_name
or e.last_name, where e is the alias for the table emp.
• NULL values are not treated as distinct from each other. The default behavior is that all result rows be
returned, which can be made explicit with the keyword ALL.
Aggregate Functions
The result of a query can be the result of one or more aggregate functions. Aggregate functions return a single
value from a set of rows. An aggregate can be used with a column name (for example, AVG(salary)) or in
combination with a more complex column expression (for example, AVG(salary * 1.07)). The column
expression can be preceded by the DISTINCT operator. The DISTINCT operator eliminates duplicate values
from an aggregate expression.
The following table lists supported aggregate functions.
Aggregate Returns
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1183
Chapter 9: Supported SQL Statements and Extensions
AVG The average of the values in a numeric column expression. For example, AVG(salary)
returns the average of all salary column values.
COUNT The number of values in any column expression. For example, COUNT(name) returns
the number of name values. When using COUNT with a column name, COUNT returns
the number of non-NULL column values. A special example is COUNT(*), which returns
the number of rows in the set, including rows with NULL values.
MAX The maximum value in any column expression. For example, MAX(salary) returns
the maximum salary column value.
MIN The minimum value in any column expression. For example, MIN(salary) returns
the minimum salary column value.
SUM The total of the values in a numeric column expression. For example, SUM(salary)
returns the sum of all salary column values.
Except for COUNT(*), all aggregate functions exclude NULL values. The returned value type for COUNT is
INTEGER and for MIN, MAX, and AVG it is the same type as the column.
Example A
In the following example, only distinct last name values are counted. The default behavior is that all duplicate
values be returned, which can be made explicit with ALL.
COUNT (DISTINCT last_name)
Example B
The following example uses the COUNT, MAX, and AVG aggregate functions:
SELECT
COUNT(amount) AS numOpportunities,
MAX(amount) AS maxAmount,
AVG(amount) AS avgAmount
FROM opportunity o INNER JOIN user u
ON o.ownerId = u.id
WHERE o.isClosed = 'false' AND
u.name = 'MyName'
From Clause
Purpose
The From clause indicates the tables to be used in the Select statement.
Syntax
FROM table_name [table_alias] [,...]
where:
table_name
is the name of a table or a subquery. Multiple tables define an implicit inner join among those tables.
Multiple table names must be separated by a comma. For example:
1184 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
Subqueries can be used instead of table names. Subqueries must be enclosed in parentheses. See
Subquery in a From Clause on page 1185 for an example.
table_alias
is a name used to refer to a table in the rest of the Select statement. When you specify an alias for
a table, you can prefix all column names of that table with the table alias.
Example
The following example specifies two table aliases, e for emp and d for dep:
The equal sign (=) includes only matching rows in the results.
Purpose
You can use a Join as a way to associate multiple tables within a Select statement. Joins may be either explicit
or implicit. For example, the following is the example from the previous section restated as an explicit inner
join:
SELECT e.name, d.deptName FROM emp e INNER JOIN dep d ON e.deptId = d.id;
Syntax
FROM table_name {RIGHT OUTER | INNER | LEFT OUTER | CROSS} JOIN table.key ON
search-condition
Example
In this example, two tables are joined using LEFT OUTER JOIN. T1, the first table named includes nonmatching
rows.
SELECT * FROM T1 LEFT OUTER JOIN T2 ON T1.key = T2.key
If you use a CROSS JOIN, no ON expression is allowed for the join.
Example
SELECT * FROM (SELECT * FROM emp WHERE sal > 10000) new_emp, dept WHERE
new_emp.deptno = dept.deptno
See also
For more information about subqueries, see Subqueries on page 1205.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1185
Chapter 9: Supported SQL Statements and Extensions
Where Clause
Purpose
The Where clause specifies the conditions that rows must meet to be retrieved.
Grammar
WHERE expr1rel_operatorexpr2
where:
expr1
expr2
is either a column name, literal, expression, or subquery. Subqueries must be enclosed in parentheses.
rel_operator
Example
The following Select statement retrieves the first and last names of employees that make at least $20,000.
SELECT last_name, first_name FROM emp WHERE salary >= 20000
See also
See Subqueries on page 1205 for complete information about subqueries.
See SQL Expressions on page 1193 for details about expressions.
Group By Clause
Purpose
The Group By clause specifies the names of one or more columns by which the returned values are grouped.
This clause is used to return a set of aggregate values.
Grammar
GROUP BY column_expression [,...]
where:
column_expression
is either a column name or a SQL expression. Multiple values must be separated by a comma. If
column_expression is a column name, it must match one of the column names specified in the Select
clause. Also, the Group By clause must include all non-aggregate columns specified in the Select
list.
Example
The following example totals the salaries in each department:
1186 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
See also
SQL Expressions on page 1193
Having Clause
Purpose
The Having clause specifies conditions for groups of rows (for example, display only the departments that have
salaries totaling more than $200,000). This clause is valid only if you have already defined a Group By clause.
Grammar
HAVING expr1rel_operatorexpr2
where:
expr1 | expr2
can be column names, constant values, or expressions. These expressions do not have to match a
column expression in the Select clause. See SQL Expressions on page 1193 for details regarding SQL
expressions.
rel_operator
Example
The following example returns only the departments that have salaries totaling more than $200,000:
SELECT dept_id, sum(salary) FROM emp GROUP BY dept_id HAVING sum(salary) > 200000
Union Operator
Purpose
The Union operator combines the results of two Select statements into a single result. The single result is all
the returned rows from both Select statements. By default, duplicate rows are not returned. To return duplicate
rows, use the All keyword (UNION ALL).
Grammar
select_statement
UNION [ALL | DISTINCT] | {MINUS [DISTINCT] | EXCEPT [DISTINCT]} | INTERSECT
[DISTINCT]select_statement
Notes
• When using the Union operator, the Select lists for each Select statement must have the same number of
column expressions with the same data types and must be specified in the same order.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1187
Chapter 9: Supported SQL Statements and Extensions
Example A
The following example has the same number of column expressions, and each column expression, in order,
has the same data type.
SELECT last_name, salary, hire_date FROM emp
UNION
SELECT name, pay, birth_date FROM person
Example B
The following example is not valid because the data types of the column expressions are different (salary
FROM emp has a different data type than last_name FROM raises). This example does have the same
number of column expressions in each Select statement but the expressions are not in the same order by data
type.
SELECT last_name, salary FROM emp
UNION
SELECT salary, last_name FROM raises
Intersect Operator
Purpose
Intersect operator returns a single result set. The result set contains rows that are returned by both Select
statements. Duplicates are returned unless the Distinct operator is added.
Syntax
select_statement
INTERSECT [DISTINCT]
select_statement
where:
DISTINCT
Notes
• When using the Intersect operator, the Select lists for each Select statement must have the same number
of column expressions with the same data types and must be specified in the same order.
Example A
The following example has the same number of column expressions, and each column expression, in order,
has the same data type.
SELECT last_name, salary, hire_date FROM emp
INTERSECT [DISTINCT]
SELECT name, pay, birth_date FROM person
1188 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
Example B
The following example is not valid because the data types of the column expressions are different (salary
FROM emp has a different data type than last_name FROM raises). This example does have the same
number of column expressions in each Select statement but the expressions are not in the same order by data
type.
SELECT last_name, salary FROM emp
INTERSECT
SELECT salary, last_name FROM raises
Purpose
The Except and Minus are synonymous operators that return the rows from the left Select statement that are
not included in the result of the right Select statement.
Syntax
select_statement
{EXCEPT [DISTINCT] | MINUS [DISTINCT]}
select_statement
where:
DISTINCT
Notes
• When using one of these operators, the Select lists for each Select statement must have the same number
of column expressions with the same data types and must be specified in the same order.
Example A
The following example has the same number of column expressions, and each column expression, in order,
has the same data type.
SELECT last_name, salary, hire_date FROM emp
EXCEPT
SELECT name, pay, birth_date FROM person
Example B
The following example is not valid because the data types of the column expressions are different (salary
FROM emp has a different data type than last_name FROM raises). This example does have the same
number of column expressions in each Select statement but the expressions are not in the same order by data
type.
SELECT last_name, salary FROM emp
EXCEPT
SELECT salary, last_name FROM raises
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1189
Chapter 9: Supported SQL Statements and Extensions
Order By Clause
Purpose
The Order By clause specifies how the rows are to be sorted.
Syntax
ORDER BY sort_expression [DESC | ASC] [,...]
where:
sort_expression
is either the name of a column, a column alias, a SQL expression, or the positioned number of the
column or expression in the select list to use.
Example
To sort by last_name and then by first_name, you could use either of the following Select statements:
SELECT emp_id, last_name, first_name FROM emp
ORDER BY last_name, first_name
or
SELECT emp_id, last_name, first_name FROM emp
ORDER BY 2,3
In the second example, last_name is the second item in the Select list, so ORDER BY 2,3 sorts by last_name
and then by first_name.
See also
See SQL Expressions on page 1193 for details regarding SQL expressions.
Limit Clause
Purpose
The Limit clause places an upper bound on the number of rows returned in the result.
Syntax
LIMIT number_of_rows [OFFSET offset_number]
where:
number_of_rows
specifies a maximum number of rows in the result. A negative number indicates no upper bound.
OFFSET
specifies how many rows to skip at the beginning of the result set. offset_number is the number
of rows to skip.
1190 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
Notes
• In a compound query, the Limit clause can appear only on the final Select statement. The limit is applied
to the entire query, not to the individual Select statement to which it is attached.
Example
The following example returns a maximum of 20 rows.
SELECT last_name, first_name FROM emp WHERE salary > 20000 ORDER BY dept_idc LIMIT
20
Purpose
The Set Checkpoint Defrag statement is used in conjunction with the Checkpoint on page 1154 statement. Set
Checkpoint Defrag sets the threshold for triggering a Checkpoint Defrag.
Syntax
SET CHECKPOINT DEFRAG size
where:
size
Notes
• When a Checkpoint on page 1154 statement is performed, either as a result of the .log file reaching the limit
set by Set Logsize on page 1191 or by the user issuing a Checkpoint statement, the amount of abandoned
space in the database data (.data) file is checked. If it is larger than the value of size, a CHECKPOINT
DEFRAG, which eliminates the abandoned space, is performed instead of CHECKPOINT.
Set Logsize
Purpose
The Set Logsize statement sets the maximum size to which the driver’s embedded database log file can grow
before a Checkpoint on page 1154 statement is performed.
Syntax
SET LOGSIZE size
where:
size
specifies the maximum size in MB of the .log file. The default is 200 MB. A value of 0 means no limit
is imposed on the size of the log file.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1191
Chapter 9: Supported SQL Statements and Extensions
Notes
• When the log file exceeds the specified size, the Checkpoint statement closes and then reopens the database
files, resetting the .log file.
Update
Purpose
An Update statement changes the value of columns in selected rows of a table.
Syntax
UPDATE table_name SET column_name = expression
[, column_name = expression] [WHERE conditions]
table_name
is the name of the table for which you want to update values.
column_name
is the name of a column, the value of which is to be changed. Multiple column values can be changed
in a single statement.
expression
is the new value for the column. The expression can be a constant value or a subquery that returns
a single value. Subqueries must be enclosed in parentheses.
Notes
• A Where clause can be used to restrict which rows are updated.
See also
See Subqueries on page 1205 for complete information about subqueries.
See Where Clause on page 1186 for details.
Example A
The following example changes every record that meets the conditions in the Where clause. In this case, the
salary and exempt status are changed for all employees having the employee ID E10001. Because employee
IDs are unique in the emp table, only one record is updated.
UPDATE emp SET salary=32000, exempt=1
WHERE emp_id = 'E10001'
Example B
The following example uses a subquery. In this example, the salary is changed to the average salary in the
company for the employee having employee ID E10001.
UPDATE emp SET salary = (SELECT avg(salary) FROM emp)
WHERE emp_id = 'E10001'
1192 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
SQL Expressions
An expression is a combination of one or more values, operators, and SQL functions that evaluate to a value.
You can use expressions in the Where, Having, and Order By clauses of Select statements; and in the Set
clauses of Update statements.
Expressions enable you to use mathematical operations as well as character string manipulation operators to
form complex queries.
The Salesforce driver supports both unquoted and quoted identifiers. An unquoted identifier must start with an
ASCII alpha character and can be followed by zero or more ASCII alphanumeric characters. Unquoted identifiers
are converted to uppercase before being used.
Quoted identifiers must be enclosed in double quotation marks (""). A quoted identifier can contain any Unicode
character including the space character. The Salesforce driver recognizes the Unicode escape sequence \uxxxx
as a Unicode character. You can specify a double quotation mark in a quoted identifier by escaping it with a
double quotation mark.
The maximum length of both quoted and unquoted identifiers is 128 characters.
Valid expression elements are:
• Column names
• Literals
• Operators
• Functions
Column Names
The most common expression is a simple column name. You can combine a column name with other expression
elements.
Literals
Literals are fixed data values. For example, in the expression PRICE * 1.05, the value 1.05 is a constant.
Literals are classified into types, including the following:
• Binary
• Character string
• Date
• Floating point
• Integer
• Numeric
• Time
• Timestamp
The following table describes the literal format for supported SQL data types.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1193
Chapter 9: Supported SQL Statements and Extensions
BIGINT n 12 or -34 or 0
where
n is any valid integer value in the range of the
INTEGER data type
INTEGER n 12 or -34 or 0
where n is a valid integer value in the range
of the INTEGER data type
1194 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
Example
'Hello' 'Jim''s friend is Joe'
Integer Literals
Integer literals are represented by a string of numbers that are not enclosed in quotation marks and do not
contain decimal points.
Notes
• Integer constants must be whole numbers; they cannot contain decimals.
• Integer literals can start with sign characters (+/-).
Example
1994
-2
Numeric Literals
Unquoted numeric values are treated as numeric literals. If the unquoted numeric value contains a decimal
point or exponent, it is treated as a real literal; otherwise, it is treated as an integer literal.
Example
+1894.1204
Binary Literals
Binary literals are represented with single quotation marks. The valid characters in a binary literal are 0-9, a-f,
and A-F.
Example
'00af123d'
Date/Time Literals
Date and time literal values are:
• A Date literal is enclosed in single quotation marks (' '). The format is yyyy-mm-dd.
• A Time literal is enclosed in single quotation marks (' '). The format is hh:mm:ss.
• A Timestamp is enclosed in single quotation marks (' '). The format is yyyy-mm-dd hh:mm:ss.SSSSSS.
Operators
This section describes the operators that can be used in SQL expressions.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1195
Chapter 9: Supported SQL Statements and Extensions
Unary Operator
A unary operator operates on only one operand.
operator operand
Binary Operator
A binary operator operates on two operands.
operand1 operator operand2
If an operator is given a null operand, the result is always null. The only operator that does not follow this rule
is concatenation (||).
Arithmetic Operators
You can use an arithmetic operator in an expression to negate, add, subtract, multiply, and divide numeric
values. The result of this operation is also a numeric value. The + and - operators are also supported in date/time
fields to allow date arithmetic. The following table lists the supported arithmetic operators.
+- Denotes a positive or negative expression. These SELECT * FROM emp WHERE comm = -1
are unary operators.
*/ Multiplies, divides. These are binary operators. UPDATE emp SET sal = sal + sal *
0.10
+- Adds, subtracts. These are binary operators. SELECT sal + comm FROM emp WHERE
empno > 100
Concatenation Operator
The concatenation operator manipulates character strings. The following table lists the only supported
concatenation operator.
The result of concatenating two character strings is the data type VARCHAR.
Comparison Operators
Comparison operators compare one expression to another. The result of such a comparison can be TRUE,
FALSE, or UNKNOWN (if one of the operands is NULL). The Salesforce driver considers the UNKNOWN result
as FALSE.
The following table lists the supported comparison operators.
1196 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
>< “Greater than" and "less than" SELECT * FROM emp WHERE sal >
tests. 1500 SELECT * FROM emp WHERE
sal < 1500
>=<= “Greater than or equal to" and "less SELECT * FROM emp WHERE sal >=
than or equal to" tests. 1500 SELECT * FROM emp WHERE
sal <= 1500
ESCAPE clause in LIKE The Escape clause is supported in SELECT * FROM emp WHERE ENAME
operator the LIKE predicate to indicate the LIKE 'J%\_%' ESCAPE '\'
escape character. Escape
LIKE ’pattern string’ ESCAPE This matches all records with names that
characters are used in the pattern
’c’ start with letter 'J' and have the '_'
string to indicate that any wildcard
character in them.
character that is after the escape
character in the pattern string SELECT * FROM emp WHERE ENAME
should be treated as a regular LIKE 'JOE\_JOHN' ESCAPE '\'
character.
This matches only records with name
The default escape character is ’JOE_JOHN’.
backslash (\)
.
[NOT] IN “Equal to any member of" test. SELECT * FROM emp WHERE job IN
('CLERK','ANALYST') SELECT *
FROM emp WHERE sal IN (SELECT
sal FROM emp WHERE deptno =
30)
[NOT] BETWEEN x AND y "Greater than or equal to x" and SELECT * FROM emp WHERE sal
"less than or equal to y." BETWEEN 2000 AND 3000
IS [NOT] NULL Tests whether the value of the SELECT * FROM emp WHERE ename
column or expression is NULL. IS NOT NULL SELECT * FROM emp
WHERE ename IS NULL
Logical Operators
A logical operator combines the results of two component conditions to produce a single result or to invert the
result of a single condition. The following table lists the supported logical operators.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1197
Chapter 9: Supported SQL Statements and Extensions
Example
In the Where clause of the following Select statement, the AND logical operator is used to ensure that managers
earning more than $1000 a month are returned in the result:
SELECT * FROM emp WHERE jobtitle = manager AND sal > 1000
Operator Precedence
As expressions become more complex, the order in which the expressions are evaluated becomes important.
The following table shows the order in which the operators are evaluated. The operators in the first line are
evaluated first, then those in the second line, and so on. Operators in the same line are evaluated left to right
in the expression.You can change the order of precedence by using parentheses. Enclosing expressions in
parentheses forces them to be evaluated together.
Precedence Operator
1 + (Positive), - (Negative)
2 *(Multiply), / (Division)
3 + (Add), - (Subtract)
4 || (Concatenate)
7 AND
8 OR
1198 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
Example A
The query in the following example returns employee records for which the department number is 1 or 2 and
the salary is greater than $1000:
SELECT * FROM emp WHERE (deptno = 1 OR deptno = 2) AND sal > 1000
Because parenthetical expressions are forced to be evaluated first, the OR operation takes precedence over
AND.
Example B
In the following example, the query returns records for all the employees in department 1, but only employees
whose salary is greater than $1000 in department 2.
SELECT * FROM emp WHERE deptno = 1 OR deptno = 2 AND sal > 1000
The AND operator takes precedence over OR, so that the search condition in the example is equivalent to the
expression deptno = 1 OR (deptno = 2 AND sal > 1000).
Functions
The Salesforce driver supports a number of functions that you can use in expressions, as listed and described
in the following tables.
BITOR(a,b) Returns a or b.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1199
Chapter 9: Supported SQL Statements and Extensions
CONCAT(str1,str2) Returns the string that results from concatenating str1 + str2.
1200 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
LOCATE(search,s,[start]) Returns the first index (1=left, 0=not found) where search is found
in s, starting at start.
OCTET_LENGTH(str) Returns the length of the string in bytes (twice the number of
characters).
SUBSTRING(s,start[,len]) Returns the substring starting at start (1=left) with length len.
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1201
Chapter 9: Supported SQL Statements and Extensions
DATEDIFF(string, datetime1, datetime2) Returns the count of units of time elapsed from datetime1 to
datetime2. The string indicates the unit of time and can have the
following values:
• 'ms'='millisecond'
• 'ss'='second'
• 'mi'='minute'
• 'hh'='hour'
• 'dd'='day'
• 'mm'='month'
• 'yy' = 'year'
Both the long and short form of the strings can be used.
1202 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
CURRENT_USER SQL standard function, returns the user name of this connection.
IDENTITY( ) Returns the last identity value that was inserted by this connection.
COALESCE(expr1, expr2, ...) If expr1 is not Null, then it is returned; otherwise, expr2 is
evaluated and, if not Null, it is returned, and so on. This is an
ANSISQL standard system function.
CASE value1 WHEN value2 THEN When value1 equals value2, then value3 is returned;
value3 [ELSE value4] END otherwise, value4 or Null is returned in the absence of ELSE.
CASE WHEN expr1 THEN value1 When expr1 is true, then value1 is returned (optionally repeated
[WHEN expr2 THEN value2] [ELSE for more cases); otherwise value4 or Null is returned in the
value4] END absence of ELSE.
EXTRACT ({YEAR | MONTH | DAY | HOUR Any of the date and time terms can be extracted from
| MINUTE| SECOND} FROM datetime_value.
datetime_value)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1203
Chapter 9: Supported SQL Statements and Extensions
TRIM([{LEADING | TRAILING | BOTH}] When returned, either the leading or trailing spaces, or both, are
FROM string_expression) trimmed from string_expression.
Conditions
A condition specifies a combination of one or more expressions and logical operators that evaluates to either
TRUE, FALSE, or UNKNOWN. You can use a condition in the Where clause of the Delete, Select, and Update
statements; and in the Having clauses of Select statements. The following describes supported conditions.
Condition Description
1204 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
Condition Description
Subqueries
A query is an operation that retrieves data from one or more tables or views. In this reference, a top-level query
is called a Select statement, and a query nested within a Select statement is called a subquery.
A subquery is a query expression that appears in the body of another expression such as a Select, an Update,
or a Delete statement. In the following example, the second Select statement is a subquery:
SELECT * FROM emp WHERE deptno IN (SELECT deptno FROM dept)
IN Predicate
Purpose
The In predicate specifies a set of values against which to compare a result set. If the values are being compared
against a subquery, only a single column result set is returned.
Syntax
value [NOT] IN (value1, value2,...)
OR
value [NOT] IN (subquery)
Example
SELECT * FROM emp WHERE deptno IN
(SELECT deptno FROM dept WHERE dname <> 'Sales')
EXISTS Predicate
Purpose
The Exists predicate is true only if the cardinality of the subquery is greater than 0; otherwise, it is false.
Syntax
EXISTS (subquery)
Example
SELECT empno, ename, deptno FROM emp e WHERE EXISTS
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1205
Chapter 9: Supported SQL Statements and Extensions
UNIQUE Predicate
Purpose
The Unique predicate is used to determine whether duplicate rows exist in a virtual table (one returned from a
subquery).
Syntax
UNIQUE (subquery)
Example
SELECT * FROM dept d WHERE UNIQUE
(SELECT deptno FROM emp e WHERE e.deptno = d.deptno)
Correlated Subqueries
Purpose
A correlated subquery is a subquery that references a column from a table referred to in the parent statement.
A correlated subquery is evaluated once for each row processed by the parent statement. The parent statement
can be a Select, Update, or Delete statement.
A correlated subquery answers a multiple-part question in which the answer depends on the value in each row
processed by the parent statement. For example, you can use a correlated subquery to determine which
employees earn more than the average salaries for their departments. In this case, the correlated subquery
specifically computes the average salary for each department.
Syntax
SELECT select_list
FROM table1 t_alias1
WHERE expr rel_operator
(SELECT column_list
FROM table2 t_alias2
WHERE t_alias1.columnrel_operatort_alias2.column)
UPDATE table1 t_alias1
SET column =
(SELECT expr
FROM table2 t_alias2
WHERE t_alias1.column = t_alias2.column)
DELETE FROM table1 t_alias1
WHERE column rel_operator
(SELECT expr
FROM table2 t_alias2
WHERE t_alias1.column = t_alias2.column)
Notes
• Correlated column names in correlated subqueries must be explicitly qualified with the table name of the
parent.
1206 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6
SQL Statements and Extensions for the Salesforce Driver
Example A
The following statement returns data about employees whose salaries exceed their department average. This
statement assigns an alias to emp, the table containing the salary information, and then uses the alias in a
correlated subquery:
SELECT deptno, ename, sal FROM emp x WHERE sal >
(SELECT AVG(sal) FROM emp WHERE x.deptno = deptno)
ORDER BY deptno
Example B
This is an example of a correlated subquery that returns row values:
SELECT * FROM dept "outer" WHERE 'manager' IN
(SELECT managername FROM emp
WHERE "outer".deptno = emp.deptno)
Example C
This is an example of finding the department number (deptno) with multiple employees:
SELECT * FROM dept main WHERE 1 <
(SELECT COUNT(*) FROM emp WHERE deptno = main.deptno)
Example D
This is an example of correlating a table with itself:
SELECT deptno, ename, sal FROM emp x WHERE sal >
(SELECT AVG(sal) FROM emp WHERE x.deptno = deptno)
DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6 1207
Chapter 9: Supported SQL Statements and Extensions
1208 DataDirect Connect Series for ODBC: User's Guide: Version 7.1.6