I am using Oracles JDBC driver for 11g. And I want to establish the connection using the parameter defaultRowPrefetch=10000. When I try to call the connection URL, I get the following error:
Error trying to connect to 'jdbc:oracle:thin:#atukwos57:1521/LIVE;defaultRowPrefetch=10000':Invalid connection string format, a valid format is: "host:port:sid"
I cant find any examples. Am I using it wrong? Leaving out the parameter establishes the connection.
Try this one
jdbc:oracle:thin:#atukwos57:1521/LIVE?defaultRowPrefetch=10000
Syntax
jdbc:oracle:thin:#[[protocol:]//]
host1[,host12,host13][:port1][,host2:port2]/service_name[:server][/instance_name]
[?[parameter-name1=parameter-value1][¶meter-name2=parameter-value2],...]
There is a file called oracle.jdbc\defaultConnectionProperties.properties in the jar-file. Adding oracle.jdbc.defaultRowPrefetch=10000 to this file solved the issue.
Related
I am attempting to connect my R instance to my company's Oracle database. I had issues installing ROracle due to being on version 3.3.6 of R, so I settled on RJDBC instead. I downloaded the JDBC driver in a jar file. And stored this as my jdbcDriver object. See below.
jdbcDriver =JDBC("oracle.jdbc.OracleDriver",classPath="C:/Users/user1/Downloads/ojdbc6.jar",identifier.quote="`")
I then attempted to make my connection to the database using some code I found online with dbConnect:
jdbcConnection =dbConnect(jdbcDriver, "jdbc:oracle:thin:#//HOSTNAME:Port/sid", "username","password")
I don't clearly understand what the second parameter in dbConnect is even after much reading online. I think I have some sort of syntax issue here-- I am confident that the Host Name, Port, SID, user name, and password are correct, though.
After much tweaking of the second parameter, including getting rid of the ".com" that was previously in it, I got the following error:
Error in .jcall(drv#jdrv, "Ljava/sql/Connection;", "connect", as.character(url)[1], :
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
I've done a tone of reading online and I think that maybe I should use something different because I have an SID, not a Service Name?
I also am having trouble where the error first occurs? Is it the first line of the error code that I should be focusing on before I even look at the third?
I am thoroughly spun around the topic and would appreciate any insights. My end goal is really just to query Oracle through R.
Thanks!
Has anyone been able to use the new JDBC drivers for BigQuery in JetBrains DataGrip?
I've followed the these steps
Created a driver in DataGrip with all the jar files
Created a database with a connection string with a service account file
The connection test says successful, but once I try to query something I receive an error:
java.lang.ClassNotFoundException: com.google.api.client.json.JsonFactory
I've added the following files from the Simba ZIP into the DataGrip driver:
GoogleBigQueryJDBC42.jar
jackson-core-2.1.3.jar
google-api-client-1.22.0.jar
google-api-services-bigquery-v2-rev320-1.22.0.jar
google-http-client-1.22.0.jar
google-http-client-jackson2-1.22.0.jar
google-oauth-client-1.22.0.jar
So I'm not sure what to do next. I tried changing their order in DataGrip but it didn't seem to make a different.
My connection string also looks OK I think:
jdbc:bigquery://https://www.googleapis.com/bigquery/v2:443;ProjectId=...;OAuthType=0;OAuthPvtKeyPath=...;OAuthServiceAcctEmail=...;
You may get this error when the driver JAR files are not referenced correctly in the tool. I have listed out the steps I used to connect to BigQuery via DataGrip.
Add a new driver by adding all the JAR files from the zip. The correct class name should be selected from the "Class" drop down in this step.
Add a new data source by selecting the newly created BigQuery JDBC driver. Provide the correct connection URL in this step.
If the test connection succeeds, create a new query for the same datasource.
Make sure your query uses the correct format "dataset.tablename" and is running on the data source you just tested.
For me replacing P12 with Json worked. But, cannot use DataGrip or in general JDBC to access BigQuery because of various query/incompatibility issues.
This video can be referred : https://www.youtube.com/watch?v=r9l2c_aQPoQ&ab_channel=JetBrainsTV
to use the new simba jdbc drivers for BigQuery in JetBrains DataGrip. It covers all steps one by one for working setup.
Here is the blog which refers this video: https://blog.jetbrains.com/datagrip/2018/07/10/using-bigquery-from-intellij-based-ide/
Drivers can be downloaded at : https://cloud.google.com/bigquery/providers/simba-drivers
Note: Make sure to go through comments on blog to authenticate without creating service account on gcp.
Hope this is helpful!
I have one issue while converting from TIMESTAMP(17-SEP-15 02.00.00.000000 PM) format to DATE(DD-MON-YY) format in a informatica Mapping.
It works fine when I use the ODBC driver connection. But when we use ORACLE data direct connection it gives the ERROR.
Are there any solutions?
Try using DATE(DD-MON-RR), I think this should work.
can you please help me with the following issue:
I want to connect to an Oracle database through a SoapUI JDBC Request, but I keep getting this error:
"Can't get the Connection for the specified properties; java.sql.SQLException : arguments non valides dans l'appel"
I used the following:
Driver : oracle.jdbc.driver.OracleDriver
Connection String : jdbc:oracle:thin:#host:port:sid
Printscreen :
Is there a problem with my Connection string?
Also, I wonder where should I put my username/password.
Thank you :)
The problem is surely that you're not specifying user/password for the DB. You can specify the user and password in the connection URL as follows:
jdbc:oracle:thin:USER/PASSWORD#HOST:PORT:SID
The other thing necessary in SOAPUI to work with jdbc is to add the drivers in SOAPUI_HOME\bin\ext but for your screenshoots seems that this is already do it.
The problem is that you add two version of it: ojdbc14.jar and ojdbc6.jar.
To avoid class loader problems you must remove one of these. Since probably you're running SOAPUI with JRE 1.7 or higher I recommend to remove the ojdbc14.jar and keeps the ojdbc6.jar version; because the first one is for JDK 1.4 and the second one is for JDK 1.6.
Hope it helps,
This one will work:
jdbc:oracle:thin:USER/PASSWORD#HOST:PORT/SID
I am getting
no ocijdbc11 in java.library.path
when trying to connect to the oracle database and I am not sure why and how to correct the issue . I am using: Oracle SQL Developer and Oracle Client 11G. I need help on correcting this issue. I have edited the sqlnet.ora file to add the below details:
NAMES.DIRECTORY_PATH= (LDAP,TNSNAMES,EZCONNECT)
SQLNET.EXPIRE_TIME=2
SQLNET.INBOUND_CONNECT_TIMEOUT=45
However, I am still getting the error message. Apparently there is an LDAP.ORA file as well, but I don't know where it is and how to edit that file. It looks like I need to add below information
DEFAULT_ADMIN_CONTEXT="###########"
DIRECTORY_SERVERS = (###########)
DIRECTORY_SERVER_TYPE = OID
Also, my TNSNames.ora file is blank, I am not sure why it is blank. Maybe I need to install Oracle Client 11g or 12c again. Thanks
I figured this out. I was connecting the wrong database instance. There are two similar databases: ###10### AND ###01###1. I needed to connect to ###10### not ###01###1 for the data that I need. The database instances are very similar and I connected to the wrong one.