Configuring TNS Datasources in ColdFusion 8 - oracle

I'm researching how to set up a Coldfusion 8 (CF) data source that uses Oracle TNS under CentOS. I checked out this Stackoverflow article. But, I'm still having some difficulty. I got a copy of our tnsnames.ora file and put it on the server at /coldfusion/install/folder/TNSNamesFolder/TNSNames.ora. I downloaded the latest Oracle JDBC drivers for 11g, put them in a folder in the class path and restarted CF. I verified that the new JAR files were picked up by viewing the settings summary. The JDBC URL I'm using is:
jdbc:oracle:thin:TNSNamesFile=/coldfusion/install/folder/TNSNamesFolder/TNSNames.ora/TNSNames.ora; TNSServerName=%TNSEntry%
But, I'm getting the following error: The Network Adapter could not establish the connection. Another issue that occurred to me is that if there's another JDBC driver for Oracle in the class path, how do I know what JAR it's in? How do I make sure that these new JDBC drivers are the only ones in use for Oracle?

JDBC URL : jdbc:macromedia:oracle:TNSNamesFile=C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\tnsnames.ora;TNSServerName=db9d1.db
Driver Class : oracle.jdbc.OracleDriver

Related

How to connect to Oracle 21c in Oracle Cloud from DataGrip

I have created an Autonomous Transaction Processing database in Oracle Cloud. There are no ready-for-use JDBC links around, but there are "wallets". There is an instance wallet and regional wallet. Oracle says one of them, preferably instance wallet, should be used to connect to this DB instance.
A wallet is a ZIP file with a dozen of files inside. I've downloaded an instance wallet and unzipped it. Now I'm trying to connect DataGrip to this instance.
There is a TNS connection type in DataGrip and there is a famous tnsnames.ora in the wallet, so I guess I should use them. TNS connection type accepts a TNSADMIN parameter, which, I guess, is a directory of that wallet. tnsnames.ora from the wallet lists a few service names, AFAIU they differ by their priority, e.g. one for low-priority queries, another for medium-priority and one for the highest priorities question. I'm OK with medium priority, so I did this:
As you see, I'm getting an error:
[08006][17002] IO Error: The Network Adapter could not establish the connection
SSO KeyStore not available.
I've googled around, but this topic seems to be complicated. Oracle has a lot of connection parameters with certificates involved in the connection process, and I'm really new and I just want to connect to this instance. Why it should be so complicated? Can I use this wallet directly in DataGrip?
It seems that I've did everything correctly and the only problem is actually the driver version.
As of today, 2021-02-02, the latest available Oracle driver version in DataGrip is 19.8.0.0:
To fix the issue I've just created another Oracle driver in DataGrip and manually provided the latest JARs:
Go to the Oracle Database 21c (21.1) JDBC Driver & UCP Downloads
Download the ZIPped JDBC driver and companion JARs corresponding to your Java version: 8 or 11. Or just download the version for Java 8 (ojdbc8-full.tar.gz). It should work with any modern Java.
Create new subdirectory in the DataGrip's drivers directory for you driver. Something like ~/.config/JetBrains/DataGrip2020.3/jdbc-drivers/Oracle/21.1 for Linix.
Unzip the driver in that directory.
Configure new driver in DataGrip. Just clone the existing Oracle driver and replace the "Driver Files" with the ones from the ZIP.
Use this new driver to connect to the instance:
DataGrip 2021.1 provides Oracle JDBC Driver 21.1.0.0 with all required jar files.
Also, read DataGrip article about connection to Oracle using wallets.

JDBC Connection between Tableau and Apache Druid

I have been trying to connect to Druid from Tableau using a JDBC Driver.
I have successfully connected using an ODBC Driver as per my answer to this post Connecting Tableau to Apache Druid
However, I want to be able to use a JDBC driver as well.
Though I have followed the steps in this post: https://support.imply.io/hc/en-us/articles/360025589574-Connecting-Tableau-to-Druid-with-JDBC,
I keep getting the error: "No suitable Driver installed or the URL is incorrect".
As per the article, I have ensured that the avatica driver is downloaded and installed in ~/Library/Tableau/Drivers, as I am on a mac.
I am also sure I am giving the right URL to my broker which I am otherwise able to access on a browser at port 8082.
Any pointers what might be wrong?
the issue may be that you don't have the avatica driver in your classpath. please see https://calcite.apache.org/docs/adapter.html
I found from this article: https://kb.tableau.com/articles/issue/locating-library-jdbc-directory-in-mac-to-install-the-athena-drivers-for-tableau-prep
that Tableau actually looks for the JDBC driver in the ~/Library/JDBC folder on mac (and it does not seem to read from ~/Library/Tableau/Drivers folder as mentioned in the original article in my question). Once I placed the avatica driver in this folder, Tableau desktop was able to find the driver.

Tableau Other Databases (JDBC) Connection to SAS datasets

I am trying to get an Other Databases (JDBC) connection from Tableau to SAS using SAS' integrated object model (sasiom jdbc) but running into this error:
Error:
Bad Connection: Tableau could not connect to the data source.
Trying to connect an http1.x server
Generic JDBC connection error
Trying to connect an http1.x server
Configuration Details
I believe my configuration is somewhat correct so far but I think that Tableau is not identifying the correct driver class to use when making a JDBC connection to SAS.
At a high level here is what a JDBC connection to SAS looks like:
JDBC Connection String: jdbc:sasiom://companyserver.company.com:port
Driver class name: com.sas.rio.MVADriver
Driver jar files location for Tableau to access: C:\Program Files\Tableau\Drivers
In this extract below from the Tableau Desktop logs it looks like 'dialect' and 'class' being used are genericjdbc which I think I want the class to be com.sas.rio.MVADriver to use the classname for sasiom but I'm not certain
{"attributes":{":protocol-customizations":"","class":"genericjdbc","dbname":"","dialect":"genericjdbc","jdbcproperties":"","jdbcurl":"jdbc:sasiom://companyserver.company.com:8591","password":"***","schema":"","username":"username","warehouse":""},"closed-protocols-count":"0","connection-limit":"16","group-id":"3","in-construction-count":"0","protocols-count":"0","this":"0x0000018511611140"}}
Properties file attempted without success
I've tried to add a properties file to force the class to be com.sas.rio.MVADriver in the hopes that I get a connection successful or at least a different error if anything else needs to change but no luck with a properties file.
Please provide some help or direction if anyone has successfully created a custom JDBC connection in Tableau and how you got it working? What configuration steps am I missing?
Is there a way to verify that Tableau is using the correct driver class for the jdbc connection? I have not seen the correct class of com.sas.rio.MVADriver referenced at all in the Tableau logs
The answer to this question is a Type 4.0 JDBC Driver is needed to automatically register the driver class name with the JDBC driver manager. The public SAS .jar files contain a Type 2.0 JDBC Driver which requires a manual JDBC driver class specification, which Tableau does not allow to my knowledge. It appears this is not possible currently.

Oracle SQL Developer - Issue with JDBC Driver

I've:
Windows 7 x64
My 11G Oracle client as per below
C:\Oracle\product\11.2.0\client_1
My SQL Developer (downloaded the kit with JDK 8 included, but installed the JSK separately just in case) dir as per below
C:\sqldeveloper
When I try to connect using TNS I have
no ocijdbc12 in java.library.path
If I go to Settings -> Database -> Advanced and choose my Oracle dir manually I get this:
Testing the Oracle Home located at C:\Oracle\product\11.2.0\client_1
Testing client directory ... OK Testing loading Oracle JDBC driver ...
OK Testing checking Oracle JDBC driver version ... Failed: Minimum
driver version 11.2.0.3 required, specified driver version is
11.2.0.1.0
So I looked into upgrading the JDBC driver, but I can't use the check for updates feature, since it appears to be blocked in my virtual machine.
I got the ojdbc7.jar from the SQL developer directory and copied it to C:\Oracle\product\11.2.0\client_1\jdbc\lib, and now I get the error below:
Testing the Oracle Home located at C:\Oracle\product\11.2.0\client_1
Testing client directory ... OK Testing loading Oracle JDBC driver ...
OK Testing checking Oracle JDBC driver version ... OK Driver
version: 12.1.0.2.0 Testing testing native OCI library load ...
Failed: Error loading the native OCI library The native OCI driver
could not be loaded. The system propertyjava.library.path contains the
entries from the environment variable PATH. Check it to verify that
the expected native library directory
C:\Oracle\product\11.2.0\client_1\bin is present and precedes any
other client installations. java.library.path =
C:\sqldeveloper\jdk\jre\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Oracle\product\10.2.0\client_1\bin;C:\Oracle\product\11.2.0\client_1\bin;C:\Oracle\product\11.2.0\client_2;C:\Oracle\product\11.2.0\client_2\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ARQDISP\;C:\Program
;.
Have no idea what I'm doing at this point. Could you please help?
Its missing drivers. So in my case I installed Oracle Client from http://www.oracle.com/technetwork/topics/winx64soft-089540.html
and set the path variable accordingly.
Here's a blog post that shows how to tell SQL Developer where and which installed client to use :
https://www.thatjeffsmith.com/archive/2014/01/oracle-sql-developer-4-and-the-oracle-client/
Restart your SQL Developer.
I had similar issue. Moving from sqldeveloper 4.0 to 4.1, imported all my connections, but in 4.1, I would get 'no ocijdbc12 in java.library.path'.
I opened up my current connections (right-click on any connection and choose properties) all of which the connection Type is TNS. The 'Connect Identifier' was checked with the connections network alias name entered there. I checked on the 'Network Alias' check box and selected the same name and then the connection worked.
I went back to 4.0 to examine my connections there and it appears that the alias name works fine with the 'Connect Identifier' selected but not in 4.1
I had to update all my many connections to use 'Network Alias'.
Error loading the native OCI libraryThe native OCI driver could not be loaded and when trying to connect to a database i was getting no ocijdbc12 in java.library.path
For me the error was solved after i have created a new variable ORACLE_HOME with the value ....(path of the folder where the sql developer was insataled)\jdk\jre. Then i have added at the begging of the Path variable %ORACLE_HOME%\bin.
At first i have created a system variable that was pointing to the folder of the installation of the dev express and that was not working
For database selecting the connection properties and changing the connection type from TNS to Basic and providing the other details (Service name/SID) for the connection resolved the issue for me
Maybe it helps having a look into answer of my post about similar topic:
How to get Sqldeveloper 19.1 64-bit working with instantclient_12_2 on Windows enterprise PC without admin privileges?
The mentioned .bat file shows all you need.
If you have admin privileges or permissions to change any environment variables, then it will probably be the better way without using .bat file.
When I try to connect using TNS I have
no ocijdbc12 in java.library.path
It is so stupid and funny, at the same time, what I found.
I get the same error and the only difference between when it is OK and when is not is...
the TNS definition in tnsnames.ora
Simply add (maybe once again if it disappeared) the TNS definition of your database, like:
XE.WORLD=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=localhost)
(PORT=1521)
)
(CONNECT_DATA=
(SERVICE_NAME=XE.WORLD)
(SERVER = DEDICATED)
)
)
and restart SQL Developer.
Connection configuration will keep the name (XE.WORLD) even if it is already gone from tnsnames.ora. If it is not there, on the connection attempt, it will return that misleading error.
My setup: SQL Developer 4.1.4.21, ojdbc8.jar, connection to Oracle 19c.

Connect teradata JDBC driver on coldfusion 11

I tried to install TERADATA JDBC on ColdFusion 11 using this link.
Everything is fine, but when I try to create the datasource, I get following errors:
"Connection verification failed for data source: TeraJDBC4
java.sql.SQLException: No suitable driver available for TeraJDBC4,
please check the driver setting in resources file, error:
com.teradata.jdbc.TeraDriver The root cause was that:
java.sql.SQLException: No suitable driver available for TeraJDBC4,
please check the driver setting in resources file, error:
com.teradata.jdbc.TeraDriver"
ColdFusion Class Path: C:\td\tdgssconfig.jar, C:\td\terajdbc4.jar
I am using ColdFusion 11 and WAMP web server. How can I solve this issue?
The error you are getting, is due to the missing driver from ColdFusion repository.
You need to place the jdbc driver jar file(s) at \ColdFusion11\cfusion\runtime\lib\ and restart ColdFusion 11 Application Service.
Do check, if the DB you are using, is supported with ColdFusion 11 or not here.

Resources