I try to add new Data Source in ODBC Administrator but I get an error:
Driver's ConfigDSN, ConfigDriver, or ConfigTranslator failed
The setup routines for the Oracle in OraClient11g_home1 ODBC driver could not be accessed. Please reinstall the driver.
Reinstalling Oracle does not help.
Other drivers (include stone-age "Microsoft ODBC for Oracle") work well. I can also use existing ODBC data sources I added earlier times, so the driver works well. I get the error only when I try to add a new data source or try to re-configure an existing one.
I found this solution https://serverfault.com/questions/555972/cannot-create-oracle-odbc-source-on-64bit-windows-7 but it does not help either.
I found the problem, it was caused by some manual edits in my Registry. It should be like this:
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Oracle in OraClient11g_home1]
"APILevel"="1"
"CPTimeout"="60"
"ConnectFunctions"="YYY"
"Driver"="C:\\oracle\\product\\11.2\\Client_x64\\bin\\sqora32.dll"
"DriverODBCVer"="03.51"
"FileUsage"="0"
"Setup"="C:\\oracle\\product\\11.2\\Client_x64\\bin\\sqoras32.dll"
"SQLLevel"="1"
DLL for Driver is "sqora32.dll" whereas DLL for Setup it is "sqoras32.dll"
I am new to Oracle database in general, but I'm attempting to get Oracle's SQL Developer running on a workstation that has pre-configured System DSNs created for an OracleRDB database. I've confirmed the ODBC connections are working because I can use MS Access to connect and link to the tables. The "test" options within ODBC also succeed. Now I am trying to get a similar connection created using SQL Developer so I can see the column types and write queries in a more useful editor.
Here's what I have available when examining the ODBC connection properties:
Now I'm trying to create a duplicate connection in SQL Developer, but I'm at a loss for why things don't work. I first tried using the default SQL Developer installation, but couldn't get things working. Then I discovered there's an OracleRDB extension available, so I installed that, but I keep getting this error when attempting to use similar values:
As I stated, these ODBC connections were pre-configured on the workstation I'm using, so I don't know anything more than what is provided by the Oracle ODBC driver window.
Is there something obvious I'm not seeing or doing to replicate this connection in SQL Developer? Or perhaps something else I can do to debug this to learn more?
UPDATE
On the advice of one answer I'm trying to make the connection with JDBC, but having a hard time understanding what I'm doing wrong. Here's another screenshot with the connection parameters I have available, but with the server and database names changed:
With these values (the port came from my tnsnames.ora file), if I try to make a JDBC connection I keep getting the following error from SQL Developer:
One final attempt I did was to use the proper values in the Oracle RDB tab, and when I use them and click 'test' the Testing Connection dialog just spins and never seems to return:
So I apologize for the long post here, but I'm struggling because there's just something I am really not understanding about how this all works. I appreciate everyone who took the time to read this question.
Oracle SQL Developer is a Java Application. You'll need to get the JDBC Driver for RDB.
Once you have that, in the SQL Developer preferences, find the Third Party JDBC section, and then use that to add an entry and point to the JAR for what you just installed.
Step by step instructions here.
Working connection string for RDB Thin Driver:
RDB_DB_CONN_STR = "jdbc:rdbThin://node.myplace.com:1707/";
where node.myplace.com is the name of the OpenVMS node hosting the RDB Thin Driver, 1707 is the port number assigned to the RDB Thin Driver.
I'm trying to get LibreOffice's Base v5.1.4.2, running on Ubuntu v16.04 to connect to a Hive v1.2.1 database via JDBC. I added the following jars, downloaded from Maven Central, to LibreOffice's classpath ('Tools -> LibreOffice -> Advanced -> Class Path'):
hive-common-1.2.1.jar
hive-jdbc-1.2.1.jar
hive-metastore-1.2.1.jar
hive-service-1.2.1.jar
hadoop-common-2.6.2.jar
httpclient-4.4.jar
httpcore-4.4.jar
libthrift-0.9.2.jar
commons-logging-1.1.3.jar
slf4j-api-1.7.5.jar
I then restarted LibreOffice, opened Base, selected 'Connect to an existing database' -> 'JDBC' and set the following properties:
I entered the credentials and clicked the 'Test Connection' button, which returned a "the connection was established successfully" message. Great!
In the LibreOffice Base UI, the options under the 'Tables' panel were grayed out. The options in the queries tab were not, so I tried to connect to Hive.
The 'Use Wizard to Create Query' option prompts for a password and then returns "The field names from 'airline.on_time_performance' could not be retrieved."
The JDBC connection is able to connect to Hive and list the tables, though it seems to have problems retrieving the columns. When I try to execute a simple select statement, the 'Create Query in SQL View' option returns a somewhat cryptic "Method not supported" message:
The error message is a bit vague. I suspect that I may be missing a dependency since I am able to connect to Hive from Java using JDBC.
I'm curious to know if anyone in the community has LibreOffice Base working with Hive. If so, what am I missing?
The Apache JDBC driver reports "Method not supported" for most features, just because the Apache committers did not bother to handle the list of simple yes/no API calls. Duh.
If you want to see by yourself, just download DBVisualizer Free, configure the Apache Hive driver, open a connection, and check the Database Info tab.
Now, DBVis is quite permissive with lame drivers, but it seems that LibreOffice is not.
You can try the Cloudera Hive JDBC driver as an alternative. You just have to "register" -- i.e. leave your e-mail address -- to access the download URL; it's simpler to deploy than the Apache thing (based on the Simba SDK, all Hive-specific JARs are bundled) and it works with about any BI tool. So hopefully it works with LibreThing too.
Disclaimer: I wish the Apache distro had a proper JDBC driver, and anyone could use it instead of relying of "free" commercial software. But for now it's just a wish.
This question already has answers here:
How to use SQLDeveloper to connect to embedded Derby database
(4 answers)
Closed 5 years ago.
I've been trying to connect to an Apache Derby/JavaDB embedded database using Oracle SQL Developer but without much success.
I've tried to create a new connection using the following JDBC URL:
jdbc:derby:/path/to/file/database.derby;create=true
which resulted in an error:
Status : Failure -Test failed: Invalid connection info specified. Verify the URL format for the specified driver.
Previously I've added derby.jar through Tools > Preferences > Database > Third Party JDBC Drivers.
Given that JavaDB is now a supported Oracle product I'm not understanding why is not better integrated with its development tools.
Any guidance will be much appreciated. Thanks in advance.
Your derby url seems wrong. You need to point the url to the directory of the database, not the database itself.
jdbc:derby:/path/to/file/;create=true
Have a look at the examples.
jdbc:derby:/reference/phrases/french
Open a connection to the database /reference/phrases/french.
On a UNIX system, this would be the path of the directory. On a
Windows system, the path would be C:\reference\phrases\french if the
current drive were C. If a jar file storing databases were in the
user's classpath, this could also be a path within the jar file.
From the docs:
The connection URL syntax is as follows:
jdbc:derby:[subsubprotocol:][databaseName][;attribute=value]
Subsubprotocol, which is not typically specified, determines how Derby
looks for a database: in a directory, in memory, in a class path, or
in a jar file. Subsubprotocol is one of the following:
directory: The default. Specify this explicitly only to distinguish a database that might be ambiguous with one on the class
path.
try connecting to the Derby DB using the Eclipse Java EE IDE for Web Developers instead of Oracle SQL Developer. In the latest versions it is has the full integrations.
I am a SQL Server user .
I am on a project that is using oracle (which I rarely use)
I need to create an ODBC connection so I can access the some data via MS Access
I have a application on my machine called oraHome90. It seems to allow a configuration of something called a listener in a “net configuration utility”, I think that a “Local Net Service Name Configuration” needs to also be done. The IT support gave me this information to set up the ODBC connection . I have tried every combination that I can think of. I can get past a test that successfully passes a test to “login“ to the oracle server database. When I try to create the ODBC connection I get the following error: ORA-12154: TNS: Could not resolve service name.
Assuming that I want to start from scratch and the following information is supposed to allow for me to connect to the database….. Any suggestions or comment ? Note: ultimately the project will have a website .ASP page query the data, but I have to first prove that I can see the data using the ODBC connection via MS Access
Service name: SERVICENAME
HOST = HOST.XYZi.com
User Id: MYUSERID
Password: MYPASSWORD
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'Oracle Connection
Dim ocst
Dim oconn
ocst = "Provider=OraOLEDB.Oracle;" & _
"Data Source=DATASOURCE;" & _
"User ID=CHIJXL;" & _
"Password=password;"
set oconn = CreateObject("ADODB.Connection")
from http://ora-12154.ora-code.com
ORA-12154: TNS:could not resolve the connect identifier specified
Cause: A connection to a database or other service was requested using a connect identifier, and the connect identifier specified could not be resolved into a connect descriptor using one of the naming methods configured. For example, if the type of connect identifier used was a net service name then the net service name could not be found in a naming method repository, or the repository could not be located or reached.
Action:
If you are using local naming (TNSNAMES.ORA file):
Make sure that "TNSNAMES" is listed as one of the values of the NAMES.DIRECTORY_PATH parameter in the Oracle Net profile (SQLNET.ORA)
Verify that a TNSNAMES.ORA file exists and is in the proper directory and is accessible.
Check that the net service name used as the connect identifier exists in the TNSNAMES.ORA file.
Make sure there are no syntax errors anywhere in the TNSNAMES.ORA file. Look for unmatched parentheses or stray characters. Errors in a TNSNAMES.ORA file may make it unusable.
If you are using directory naming:
Verify that "LDAP" is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA).
Verify that the LDAP directory server is up and that it is accessible.
Verify that the net service name or database name used as the connect identifier is configured in the directory.
Verify that the default context being used is correct by specifying a fully qualified net service name or a full LDAP DN as the connect identifier
If you are using easy connect naming:
Verify that "EZCONNECT" is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA).
Make sure the host, port and service name specified are correct.
Try enclosing the connect identifier in quote marks. See the Oracle Net Services Administrators Guide or the Oracle operating system specific guide for more information on naming.
Going on the assumption you're using TNSNAMES naming, here's a couple of things to do:
Create/modify the tnsnames.ora file in the network/admin subdirectory associated with OraHome90 to include an entry for your oracle database:
> SERVICENAME_alias =
> (DESCRIPTION =
> (ADDRESS = (PROTOCOL = TCP)(HOST = HOST.XYZi.com)(PORT = 1521))
> (CONNECT_DATA = (SERVICE_NAME = SERVICENAME))
This is assuming you're using the standard Oracle port of 1521. Note that servicename_alias can be any name you want to use on the local system. You may also find that you need to specify (SID = SERVICENAME) instead of (SERVICENAME=SERVICENAME).
Execute tnsping servicename_alias to verify connectivity. Get this working before going any further. This will tell you if you're past the 12154 error.
Assuming a good connection, create an ODBC DSN using the control panel, specifying the ODBC driver for Oracle of your choice (generally there's a Microsoft ODBC driver at least, and it should work adequately as a proof of concept). I'll assume the name you gave of DATASOURCE. Use the servicename_alias as the Server name in the ODBC configuration.
At this point you should be able to connect to your database via Access. I am not a VB programmer, but I know you should be able to go to File->Get External Data->Link Tables and connect to your ODBC source. I would assume your code would work as well.
In reference to #7 in this MSDN POST , adding a registry entry worked for me. I had Vs2010, et oracle 11.0 installed.
Check for the registry key “TNS_ADMIN” at HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE. If it exists then make sure it has
the right value as “Dir:\app\product\11.1.0\client_1\network\admin”.
If you don’t see the key then create the key and set appropriate value
as below. Regedit->HKEY_LOCAL_MACHINE->Software->Oracle->RightClick
NEW->StringValue and name it TNS_ADMIN and give the value
“X:\app\product\11.1.0\client_1\network\admin”
I struggled to resolve this problem for hours until I found an Environment variable called TNS_ADMIN set in My Computer => Properties => Advanced => Environment Variables => look in System variables for an entry called TNS_ADMIN.
TNS_ADMIN is added to change the default path for Tnsnames.ora entry.
This is useful when its used in a network environment where a generic tnsnames.ora entry can be setup for all the network computers.
To look at the default path of tnsnames.ora add the default path in TNS_ADMIN.
#Warren and #DCookie have covered the solution, one thing to emphasise is the use of tnsping. You can use this to prove your TNSNames is correct before attempting to connect.
Once you have set up tnsnames correctly you could use ODBC or try TOra which will use your native oracle connection. TOra or something similar (TOAD, SQL*Plus etc) will prove invaluable in debugging and improving your SQL.
Last but not least when you eventually connect with ASP.net remember that you can use the Oracle data connection libraries. See Oracle.com for a host of resources.
If there is a space in the beginning of the tns name define in file tnsnames.ora, then some of the the connectors like odbc may give this error. Remove space character in the beginning.
It has nothing to do with a space embedded in the folder structure.
I had the same problem. But when I created an environmental variable (defined both at the system- and user-level) called TNS_HOME and made it to point to the folder where TNSNAMES.ORA existed, the problem was resolved. Voila!
venki
Arrhhh!! I RAN INTO THIS AGAIN!!!
Just install ToadForOracle in C:\ or any directory without parenthesis in the path.
In my case its because I was on a x64 PC and still using the old Oracle 9i with the 32bit drivers!
I am using SQL Reporting Services with an Oracle Database. The problem is the brackets in the path to Visual Studio (BIDS). Oracle doesn't like apps that start in a path with brackets:
RDBMS 10g XE problem with parenthesis in path
So I made a BAT file to open Visual Studio with Progra~2 as the short path name for "Program Files (x86)".
Here is the contents of the BAT file:
rem Progra~2 is short path name for "Program Files (x86)" and works around an Oracle client bug that doesn't like the ()'s in the path
start /B "C:\Progra~2\Microsoft Visual Studio 9.0\Common7\IDE" "C:\Progra~2\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe"
I name this BAT file StartBIDS.BAT and put it in the directory:
"C:\Program Files\Microsoft SQL Server\Start BIDS.bat"
Then I make a short cut to the BAT file on my Desktop and also my Start Menu and change the ShortCuts icon. This allows me to open TOAD, Visual Studio, BIDS and etc apps that I use to work with Oracle.
Update:
Alternatively make a Junction:
mklink /J "C:\Program Files (x86)\" "C:\Program Files x86\"
Then remove the brackets in the shortcut:
I experienced this problem too. I discovered the problem is because Oracle DB does not like the space in C:program files (x86)\Toad...... so I created a new directory named C:App\Toad then reinstalled in it to connect Toad to Oracle. It worked.
This was mentioned in a comment to another answer, but I wanted to move it to an actual answer since this was also the problem in my case and I would have upvoted it if it had been an answer.
I'm on Linux and the tnsnames.ora file was not set to readable by everyone. After making it readable connecting via tns locally worked.
$ chmod +r tnsnames.ora
I had a same problem and the same error was showing up. my TNSNAMES:ORA file was also good to go but apparently there was a problem due to firewall blocking the access. SO a good tip would be to make sure that firewall is not blocking the access to the datasource.
I fixed this problem using this steps.
First of all, this error occured , if you didn't install same directory or drive.
But the answer is here.
Login windows as a Adminstrator.
Go to Control Panel.
System Properties and click Enviroment
Find the OS variable and change name as a "TNS_ADMIN"
And change the value as a "tnsnames's directory address"
Restart the system.
Congrulations.
I have resolved this issue by removing sqlnet.ora from the C:\oracle\ora92\network\ADMIN path
Make sure TNSNAMES.ORA file exists in the right directory
Make sure PATH environment variable is having entry for oracle
Make sure no syntax issues in the TNSNAMES.ORA
Try removing sqlnet.ora file
Hours of problems SOLVED. I had installed the Beta Entity Framework for Oracle and in in visual studio 2010 MVC 3 project I was referencing under the tab .NET the Oracle.DataAccess ... This kept giving me the "Oracle ORA-12154: TNS: Could not..." error. I finally just browsed to the previous Oracle install under c:\Oracle\product.... using the old 10.2.0.100 version of the dll. Finally it works now. Hope it helps someone else.
I just spend an hour on this, I'm new to Oracle so i was thoroughly confused..
the situation:
just installed visual studio 2012 Oracle developer tools. When i did this I lost the items in my drop down which contained my TNS entries in TOAD. I was getting this error from Visual studio AND TOAD!! WTH! so i added the environmental Variable TNS_ADMIN under "ALL USERS" with the path to my .ora file (which i now worked fine because it worked until I broke it). Toad picked up that change. Still Visual Studio wouldn't give me any love... still getting same error. THEN, i added the environmental Variable TO MY USER VARIABLES.. VIOLA!!
ENSURE THE ENVIRONMENTAL VARIABLES ARE SET FOR THE SYSTEM AND THE USER
Only restart the SID services. For example you SID name = orcl then all the services which related to orcl should be restart then you problem will be solved
We resolved our issues by re-installing the Oracle Database Client. Somehow the installation wasn't successful on 1 of the workstations (even though there was no logging), however when comparing size/files/folders of the Oracle directory to a working client workstation, there was a significant amount of files that were missing. Once we performed a clean install, everything worked perfectly.
In my case, the error are because I have 2 Oracle clients, It's the solution:
Oracle ORA-12154 error on local IIS, but not with Visual Studio Development Server
We also had the similar issue. What we found out that we had provided multiple aliases for our connection string in tnsnames.ora, something like:
svc01, svc02=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxxx)(port=50))(CONNECT_DATA=(SERVER=DEDICATED)(service_name=yyyysvc.world)))
so when creating a connection using ODBC, when we selected the value for TNS service name, the auto populate was showing 'svc01,' (please note the extra comma there). As soon as we removed the comma, it started working for us.
If you have a 32bit DSN and a 64bit DSN with same names, Windows will automatically choose the 64bit one and If your application is 32bit it shows this error. Just watch out for that.
I had this problem because of a typo in the filename tsnames.ora instead of tnsnames.ora
This error message can be very confusing and the solution can be surprisingly primitive.
In my case: Oracle stored procedure sends recordset to MS Excel via "Provider=OraOLEDB.Oracle;Data Source= ...etc" .
The problem was a number of decimal numbers in the Oracle data column sent to Excel 2010.
When I used Oracle SQL query ROUND(grosssales_eur,2) AS grosssales_eur, it worked fine.