QuerySurge Technical Whitepaper No. 5
Setting up the QuerySurge Agent with the Teradata JDBC Driver and LDAP
QuerySurge has supported Teradata via the Teradata JDBC driver nearly since its inception. The QuerySurge deployment for Teradata is a standard JDBC-based deployment, where each QuerySurge Agent has a Teradata JDBC driver on its classpath for handling queries against Teradata. The Teradata JDBC driver is installed on each Agent via the QuerySurge installer. Connections to your Teradata instance(s) are created using the QuerySurge Connection Wizard. These connections require standard per-connection authentication, which is part of the setup via the Wizard. This whitepaper is for users who want to take advantage of the LDAP connectivity features of the Teradata driver while querying Teradata from QuerySurge. For this use case, a modified setup path is required.
The Teradata Driver Deployment with the QuerySurge Agent
The QuerySurge Agent is typically deployed with the Teradata JDBC driver with no special JDBC connection properties beyond those required to make a connection (remember, you need to deploy one JDBC driver with each QuerySurge Agent). However, in order to use the LDAP feature of the Teradata JDBC driver, some special properties need to be used. This can be set up in QuerySurge by selecting the Generic Data Source in the Connection Wizard (and not the Teradata Data Source), using a modified URL containing the required properties.
Using QuerySurge's Connection Extensiblity Feature
The major parameters needed for creating an extensible Connection in the QuerySurge Connection Wizard include the Driver Class, the Connection URL, user credentials and (if desired) a Test Query. Full details are available here. The required values for LDAP setup with the Teradata driver are:
- Driver Class: com.teradata.jdbc.TeraDriver
- Connection URL: jdbc:teradata://<server name>/database=<db name>,
- Test Query: SELECT 1
You will, of course, need to specify the server name of your Teradata server, and the database name of your database in the URL. The authentication details (username and password) are not entered as properties on the URL, but rather are entered in separate fields in the Wizard, so that QuerySurge can store these values in an encrypted format.
Note that in the URL above, the QuerySurge Teradata connection has
tmode=ANSI. The ANSI mode (
tmode=ANSI) is recommended (see the Teradata documentation here). However, if your organization uses
tmode=DEFAULT, you can feel free to use these settings. Finally, also note that the LOGDATA parameter is not necessary for performing SELECT statements, and so is omitted here.