JDBC Driver for Teradata

Build 22.0.8462

Establishing a Connection

Creating a JDBC Data Source

You can create a JDBC data source to connect from your Java application. Creating a JDBC data source based on the CData JDBC Driver for Teradata consists of three basic steps:

  • Add the driver JAR file to the classpath. The JAR file is located in the lib subfolder of the installation directory. Note that the .lic file must be located in the same folder as the JAR file.
  • Provide the driver class. For example:
    cdata.jdbc.teradata.TeradataDriver
  • Provide the JDBC URL. For example:
    jdbc:teradata:User=Admin;Password=test123;Database=Northwind;DataSource=127.0.0.1
    
    or
    
    jdbc:cdata:teradata:User=Admin;Password=test123;Database=Northwind;DataSource=127.0.0.1

    The second format above can be used whenever there is a conflict in your application between drivers using the same URL format to ensure you are using the CData driver. The URL must start with either "jdbc:teradata:" or "jdbc:cdata:teradata:" and can include any of the connection properties in name-value pairs separated with semicolons.

Deploying the Driver

To connect using the CData JDBC Driver for Teradata, you need to add the JAR files for both the CData JDBC Driver for Teradata and the official Teradata JDBC driver to your Java classpath. For example:

  • cdata.jdbc.teradata.jar
  • terajdbc4.jar
  • tdgssconfig.jar (Only included and required for versions prior to 16.20.00.13 of the official Teradata JDBC driver)

The driver wraps the official Teradata Database driver; you can connect to the CData JDBC Driver for Teradata using the same connection properties and access the same functionality as the underlying Teradata driver. You also need to install the official driver alongside the CData JDBC Driver for Teradata.

Connecting to Teradata

Required Properties

To connect to Teradata, provide the following authentication information and specify the database server name.

  • AuthScheme: Set this to either TD2 (default) or LDAP depending on the required authentication mechanism of your Teradata server.
  • User: Set this to the user name of a Teradata user.
  • Password: Set this to the password of the Teradata user.
  • DataSource: Specify the Teradata server name, DBC Name, or TDPID.
  • Port: Specify the port the server is running on.
  • Database: Specify the database name. If not specified, the driver connects to the default database.
Refer to the Teradata JDBC Driver documentation for more information on the available properties.

TLS/SSL Configuration

Set EncryptData to ON to encrypt connections with TLS/SSL.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462