Monday, November 18, 2019

Connecting to Teradata Database With LDAP Using Oracle SQL Developer

In this article, I will describe how to connect to the Teradata database via LDAP. We will do this with Oracle SQL Developer.
With Oracle SQL Developer, it is possible to connect to many databases with JDBC driver, not just an Oracle database. Some of these are DB2, Teradata, Access, MSSQL, and MySQL. In this article, I will describe how to connect to a Teradata database configured with LDAP Authentication.
I want to connect to Teradata database version 15. The version of Oracle SQL Developer is 4.1.5.
First, I need a Teradata JDBC driver to connect to Teradata from Oracle SQL Developer. You can download this driver by following the link.
After downloading the ZIP/TAR file containing the driver, we need to extract it to the appropriate location on our computer. Then, we need to show the files tdgssconfig.jar and terajdbc4.jar, which will come out of this file in Oracle SQL Developer.
We extract the files from Oracle SQL Developer by clicking on the Add Entry button in the window accessed by following the corresponding path (Tools > Preferences > Database > Third-Party JDBC Drivers). Then click the OK button to close the screen.
jar_ext
Now that we have the relevant drivers displayed, let's open the new connection setup screen through Oracle SQL Developer.
teradata
When we open the connection screen, we see that the Teradata connection tab comes right next to the Oracle option — proof that your JAR files are correctly defined. Now, we have the last step we need to make to connect. In the last step, we will add the LOGMECH parameter to our connection to determine how to provide our connection via LDAP. Since we do not have this option on the connection screen by default, we will click the Add button to add this parameter, and when we press the OK button after selecting LOGMECH parameter in the popup window, we will see that this parameter is added as a selection button on the connection setup screen. Then, we will select LDAP with this selection button and we will complete the process.
teradatacon teradatacon2
Now we can connect to the Teradata database using our LDAP information and database connection string.

Open Source Softwares

Using SQL Developer to connect to SQL Server databases


Apparently, being able to use Oracle’s SQL Developer to connect to SQL Server databases has been around for a while (via third party drivers), but I only started using it today for the first time, with SQL Developer 4 EA2 after my colleague mentioned it to me this afternoon ðŸ™‚
First of all, thanks to DJ’s blog here as a base for the instructions that follow.  Here’s how you can set this up:
  1. Download the jTDS 3rd party JDBC driver, version 1.2.8 from here (I’ve not personally tested with other versions).
  2. Save and extract the contents of the jtds-1.2.8-dist.zip file somewhere safe (I extracted mine under “C:\oracle\sqldeveloper\add-ons\jtds-1.2.8-dist\”).
  3. Start SQL Developer go to Tools > Preferences > Database > Third Party JDBC Drivers.
  4. Click “Add Entry”, point to the ‘jtds-1.2.8.jar’ file location, then select it and click OK.
  5. Create a new connection, and choose the “SQLServer” tab.
  6. Enter the following details: Connection Name (required for database retrieval), Username, Password, Hostname, and Port.
  7. Click “Retrieve database” and select the appropriate database, then Save/Test/Connect as you would do normally.
SQL Server connection in SQL Developer
You’ll notice from the screen shot above that you can also use this to connect to Sybase databases, although I’ve not tried this out myself.
UPDATE: If you at any point decide to use Windows authentication to connect (like I just did), then you might hit this error:
Status : Failure -I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.
…I quickly found a work around, which involved copying the “..\jtds-1.2\x64\SSO\ntlmauth.dll” file from the jTDS directory to the “%JAVA_HOME%\jre\bin” folder.  Then I restarted SQL Developer and it all worked fine ðŸ˜‰

ewallet p12 vs cwallet sso

The  ewallet.p12  stores credentials and certificates protected by a user password, while  cwallet.sso  provides an obfuscated, random passw...