20 The Greenplum Wire Protocol Driver : Connection Option Descriptions

Connection Option Descriptions
The following connection option descriptions are listed alphabetically by the GUI name that appears on the driver Setup dialog box. The connection string attribute name, along with its short name, is listed immediately underneath the GUI name.
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.
Table 20-1 lists the connection string attributes supported by the Greenplum Wire Protocol driver.
Alternate Servers
Attribute
AlternateServers (ASRV)
Description
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
Application Using Threads
Attribute
ApplicationUsingThreads (AUT)
Description
Determines whether the driver works with applications using multiple ODBC threads.
This connection option can affect performance. See “Performance Considerations” for details.
Valid Values
0 | 1
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
Connection Pooling
Attribute
Pooling (POOL)
Description
Specifies whether to use the driver’s connection pooling.
NOTE: The application must be thread-enabled to use connection pooling.
This connection option can affect performance. See “Performance Considerations” for details.
Valid Values
0 | 1
If set to 1 (Enabled), the driver uses connection pooling.
If set to 0 (Disabled), the driver does not use connection pooling.
Default
0 (Disabled)
GUI Tab
Pooling tab
Connection Reset
Attribute
ConnectionReset (CR)
Description
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.
This connection option can affect performance. See “Performance Considerations” for details.
Valid Values
0 | 1
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.
Default
0 (Disabled)
GUI Tab
Pooling tab
Connection Retry Count
Attribute
ConnectionRetryCount (CRC)
Description
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 x is a positive integer from 1 to 65535.
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
Connection Retry Delay
Attribute
ConnectionRetryDelay (CRD)
Description
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 x is a positive integer from 1 to 65535.
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
Data Source Name
Attribute
DataSourceName (DSN)
Description
The name of a data source in your Windows Registry or odbc.ini file.
Valid Values
string
where string is the name of a data source.
Default
None
GUI Tab
General tab
Database Name
Attribute
Database (DB)
Description
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.
Default
None
GUI Tab
General tab
Description
Attribute
Description (n/a)
Description
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 is a description of a data source.
Default
None
GUI Tab
General tab
Enable Keyset Cursors
Attribute
EnableKeysetCursors (EKC)
Description
Determines whether the driver emulates keyset cursors to provide scrollable keyset cursors to an ODBC application.
Valid Values
0 | 1
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)
Description
Determines whether SQLDescribeParam returns the Datatype, ParameterSize, DecimalDigits, and Nullable information for parameters in a prepared statement.
Valid Values
0 | 1
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
Extended Column Metadata
Attribute
ExtendedColumnMetaData (ECMD)
Description
Determines how the driver returns column metadata when using SQLDescribeCol and SQLColAttribute.
Valid Values
0 | 1
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:
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:
Default
0 (Disabled)
GUI Tab
Advanced tab
Failover Granularity
Attribute
FailoverGranularity (FG)
Description
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
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)
Description
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
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)
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
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)
Description
Determines whether the driver returns refcursors from stored procedures as results sets.
Valid Values
0 | 1
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
Fetch TSWTZ as Timestamp
Attribute
FetchTSWTZasTimestamp (FTSWTZAT)
Description
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
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
Fetch TWFS as Time
Attribute
FetchTWFSasTime (FTWFSAT)
Description
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
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
NOTE: 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
Host Name
Attribute
HostName (HOST)
Description
The name or the IP address of the server to which you want to connect.
Valid Values
server_name | IP_address
where:
server_name is the name of the server to which you want to connect.
IP_address is the IP address of the server to which you want to connect.
The IP address must be in IPv4 format.
Default
None
GUI Tab
General tab
IANAAppCodePage
Attribute
IANAAppCodePage (IACP)
Description
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. Refer to Chapter 4 “Internationalization, Localization, and Unicode” in the DataDirect Connect Series for ODBC Reference for details.
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:
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 Chapter 1 “Values for the Attribute IANAAppCodePage” in the DataDirect Connect Series for ODBC Reference. The value must match the database character encoding and the system locale.
Default
4 (ISO 8559-1 Latin-1)
GUI Tab
Advanced tab
Initialization String
Attribute
InitializationString (IS)
Description
A SQL command that is issued immediately after connecting to the database to manage session settings.
NOTE: If the statement fails to execute, the connection fails and the driver reports the error returned from the server.
Valid Values
SQL_command
where SQL_command is a valid SQL command that is supported by the database.
Example
To set the date format on every connection, specify:
Set DateStyle='ISO, MDY'
Default
None
GUI Tab
Advanced tab
Keyset Cursor Options
Attribute
KeysetCursorOptions (KCO)
Description
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.
NOTE: This option has no effect unless the Enable Keyset Cursors connection option is enabled.
Valid Values
0 | 1
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.
Default
0
GUI Tab
Advanced tab
Load Balance Timeout
Attribute
LoadBalanceTimeout (LBT)
Description
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.
NOTE: The Min Pool Size option may cause some connections to ignore this value.
This connection option can affect performance. See “Performance Considerations” for details.
Valid Values
0 | x
where x is a positive integer that specifies a number of seconds.
If set to 0, inactive connections are kept open.
If set to x, inactive connections are closed after the specified number of seconds passes.
Default
0
GUI Tab
Pooling 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
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).
NOTE: 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)
Description
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 x is a positive integer that specifies a number of seconds.
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
Specifies how often, in seconds, the driver checks the maintenance thread. A single maintenance thread is used to enforce minimum and maximum pool sizes in the connection pool. This option is not used as a runtime connection option, but does appear in the ODBC.INI section of the Registry and in the odbc.ini file.
Max Long Varchar Size
Attribute
MaxLongVarcharSize (MLVS)
Description
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 255 to x
where x is maximum size of the SQL_LONGVARCHAR data type.
Default
None. The actual size of the columns from the database is persisted to the application.
GUI Tab
Advanced
Max Pool Size
Attribute
MaxPoolSize (MXPS)
Description
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.
This connection option can affect performance. See “Performance Considerations” for details.
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
Max Varchar Size
Attribute
MaxVarcharSize (MVS)
Description
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 x is maximum size of the SQL_VARCHAR data type.
Default
None. The actual size of the columns from the database is persisted to the application.
GUI Tab
Advanced
Min Pool Size
Attribute
MinPoolSize (MNPS)
Description
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
where x is an integer from 1 to 65535.
For example, if set to 5, the start-up number of connections in the pool is 5 in addition to the current existing connection.
If set to 0, no connections are opened in addition to the current existing connection.
Default
0
GUI Tab
Pooling tab
Password
Attribute
Password (PWD)
Description
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)
Description
The port number of the server listener.
Valid Values
port_name
where the 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)
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
-1 | 0 | x
where x is a positive integer that specifies a number of seconds.
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
Report Codepage Conversion Errors
Attribute
ReportCodepageConversionErrors (RCCE)
Description
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
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
Transaction Error Behavior
Attribute
TransactionErrorBehavior (TEB)
Description
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
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
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 is a valid user ID with permissions to access the database.
Default
None
GUI Tab
Advanced tab
XML Describe Type
Attribute
XMLDescribeType (XDT)
Description
The SQL data type that is returned by SQLGetTypeInfo for the XML data type.
See “Using the XML Data Type” for further information about the XML data type.
Valid Values
-4 | -10
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