Pivotal Knowledge Base

Follow

How to set additional connection properties with ODBC Driver

Applies To

ODBC Driver for GemFire XD 1.0 or later

Purpose

This document describes how you can set additional connection properties within the connection strings for the Thin Client JDBC Driver to manage connection behavior as shown in the following:

jdbc:gemfirexd://myLocatorAddress:1527/;secondary-locators=mySecondaryLocatorAddress:1527,anotherSecondaryLocatorAddress:1527

Description

You can set additional connection properties for the ODBC Driver within the ODBC configuration file (odbc.ini). First, you will need to change the property name from the Thin Client JDBC Driver's format to its ODBC equivalent. For example, the "secondary-locators" property for Thin Client JDBC Driver should be changed to "SecondaryLocators" for the ODBC Driver by removing hyphens between words and changing the first letter of each word to uppercase.

For example, a complete odbc.ini might look like the following:

[ODBC Data Sources]
data_source_name = testdsn

[testdsn]
Driver = /usr/lib/gphd/gfxd/odbc/64/libgemfirexdodbc.so
DESCRIPTION = GemFire XD ODBC driver
SERVER = myLocatorAddress
PORT = 1527
SecondaryLocators = mySecondaryLocatorAddress:1527,anotherSecondaryLocatorAddress:1527
UID =
PASSWORD =
LogFile = gfxdodbc.log

Additional Information

Example settings for the Thin Client JDBC Driver are available in the product documentation. Although it's not mentioned in the product documentation, you can set these same connection properties with ODBC Driver as this article illustrates.

The ODBC Driver for GemFire XD is based on the existing Thin Client JDBC Driver, so all connection properties available to the Thin Client JDBC Driver may also be used with the ODBC Driver.

Comments

Powered by Zendesk