Showing posts with label teradata datasource. Show all posts
Showing posts with label teradata datasource. Show all posts

Wednesday, September 24, 2014

Teradata datasource creation in weblogic server

If you have a requirement to create a web application talking to Teradata DB and deploy the application to Weblogic server then you need a generic datasource pointing to the Teradata DB and jndi name for the DS.

I have faced similar requirement to create an ADF application talking to Teradata DB  and I created the DS created using the following steps. I am able to successful use the JNDI corresponding to the datasource in ADF model Applciation Module configurations.

The below are the instructions to create a datasource.
  1. Make sure Teradata jdbc libraries terajdbc4.jar and tdgssconfig.jar are present in the weblogic server classpath. You can download these libraries from Teradata forums.
    • Copy the jars terajdbc4.jar and tdgssconfig.jar to WLS installation directory <WLS_HOME>\server\lib
    •  Add these two jars to the WEBLOGIC_CLASSPATH variable in commEnv.sh configuration file. 
      • File location: in the WLS installation directory <WL_HOME>\common\bin\commEnv.sh
      • Add classpath: ${CLASSPATHSEP}${WL_HOME}/server/lib/terajdbc4.jar${CLASSPATHSEP}${WL_HOME}/server/lib/tdgssconfig.jar
      • Note: Here the CLASSPATHSEP is a delimiter

  1.         Login to WLS console and navigate to Service à Data Sources
  2. New à Generic Data Source
    • Name: teradataDS
    • JNDI Name:  jdbc/teradataDS
    • Database Type: Other
  3. Next à Next à Uncheck ‘Supports Global Transactions’ à Next 
    • Database User Name:  tera_username 
    • Password: *****
  4.  Nextà
    • Driver Class Name: com.teradata.jdbc.TeraDriver
    • Connection URL: jdbc:teradata://<database host >
    • Properties: user=tera_username
  5. Next à
    • Select Targets: managedserver_1
  6. Save the changes and bounce the servers if required.
Hope it is useful.

Reference: http://developer.teradata.com/doc/connectivity/jdbc/reference/current/WebLogic103.html