Oracle][ODBC][Ora]Ora-12154:
Following Proplem
ODBC Version 3.520.6XXX
when I test a connection I got the message
SQLState=08004
[Oracle][ODBC][Ora]Ora-12154: TNS:could not resolve the connect identifier specified.
I use a Oracle 10 g Database and Oracle 9.x
When I try to connect to my localy installed 10g DB the ODBC works fine but if I try to connect to any of the 9.x Databases I got that error.
Any Ideas
regards
Assuming you are using local naming, did you create entries in your tnsnames.ora file for the remote machine(s)?
Do you have multiple Oracle Home's on this machine? If so, you will need to have multiple tnsnames.ora files or you will have to create a TNS_ADMIN environment variable and point it at the one tnsnames.ora file that you want all the Oracle Home's to use.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC
Similar Messages
-
Unable to connect SQLState=08004 Oracle ODBC Ora-12154
Hi Sir/Madam,
I am Wayne, I need your help to resolve my issue in oracle database 11g.
1. I installed Oracle 11g Personal Edition, Release 11.2.0.10, 64bits,
2. Test connection(oracle in oradb11g_home1) is successed in data source, odbc,
2. Then, I tried to connect this with Visual Basic(Visual Studio 2010), data connections, add connections, .net framework data provider for oracle,
3. but I received an error message as "Attempt to load Oracle client libraries threw BadImageFormatException."
4. Then, I download the ODAC(11.2.0.3.0) for 64bits, and installed,
5. I tried to test the connection, but failed with error message as stated above,
"Unable to connect SQLState=08004 Oracle ODBC Ora-12154: TNS:could not resolve the connect identifier specified"
Could you please give me a help on this, do I need to install ODAC for 11g Personal Edition ? Please advice accordingly, thanks.Hi;
Please review:
https://kr.forums.oracle.com/forums/thread.jspa?threadID=2309520
http://stackoverflow.com/questions/206055/oracle-ora-12154-tns-could-not-resolve-service-name-error
Regard
Helios -
This error has just recently started happening, and i cannot figure out why, i have not changed anything in tnsnames.ora file.
i am always able to "test connection" in ODBC. even when i get the error in crystal.
so i restart Crystal, and i am able to connect to db.
strange thing is that always when i do a tnsping to db i always get the message :-
TNS-12541: TNS:no listener
Any ideas ?Re: 08004:[oracle][odbc][ora]ora-12154: TNS: could not resolve the connect ....
Posted: Aug 22, 2011 5:56 PM in response to: John Fleming
Edit Reply
I am receiving a similar error.
Failed to open the connection.
Details: 08004:[Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve the connect identifier specified [Database Vendor Code: 12154]
I've seen all sorts of discussion on the intertubes about possible fixes however, none stated are practical or they do not address my error specifically. I've exhausted resources on the net as well as those available to me.
I'm currently running SAP Crystal Reports 2011 on WIN7 64bit and using Oracle in OraClient 10g_home1.
Please let me know what insight you have. I cannot roll back to previous versions of Windows nor less encryption.
Thank you for your time. -
Hi all,
I have an Windows XP OS with SP3.
I have installed the Oracle 11g server.
On trying to connect to the ODBC connection, i get the following error message:
Unable to connect SQL State=S1000 [Oracle][ODBC][Ora]ORA-12170: TNS: Connect timeout occured
On trying the tnsping,
TNS Ping Utility for 32-bit Windows: Version 11.1.0.6.0 - Production on 09-OCT-2
011 13:11:05
Copyright (c) 1997, 2007, Oracle. All rights reserved.
Used parameter files:
E:\app\Gautam\product\11.1.0\db_1\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.
5.207)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl))
TNS-12535: TNS:operation timed out
On trying to connect with SQL Developer, i get the following error:
Status: Failure - Test failed: Io Exception: The Network Adapter could not establish the connection
However i am able to connect to the same using SQL Plus
Another issue that occurs is that the Oracle Enterprise Manager shows the following error after a while:
Agent Connection to Instance
Status Failed
Details ORA-12505: TNS:listener does not currently know of SID given in connect descriptor (DBD ERROR: OCIServerAttach)
The following services are all up during this point of time:
OracleDBConsoleorcl
OracleOraDb11g_home1TNSListener
OracleServiceORCL
Any help in this regard will be very useful as this is hindering the progress of my work.
Thanks in advance for the help.
- Gautam841683 wrote:
Hi,
I did try and delete my listener.ora and then create a new one..
That did not solve my issue..
What are the steps for configuring the listener again.
Thanks for the response..
- Gautamno listener.ora file is required.
just do as below
lsnrctl start -
[Oracle][ODBC][Ora]ORA-01426: numeric overflow
I have a function get data from data base and do some calculating. I call this function from ASP web page. Some times I got the following error. But if I click refresh later. It's ok again. Any ideas?
[Oracle][ODBC][Ora]ORA-01426: numeric overflowCause: Evaluation of an value expression causes an overflow/underflow.
Action: Reduce the operands. -
---cmd prompt------------------------
H:\>sqlplus scott/tiger
SQL*Plus: Release 10.2.0.3.0 - Production on Sun Mar 28 16:54:53 2010
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL>
-------------ASP -------------------------
<%@ Language="JScript" %>
<%
var uname=Request.Form("un");
var upwd=Request.Form("pwd");
Response.Write("User Name is " + uname + "<br>" + "password is " + upwd);
var sql = "select * from emp";
var conn = Server.CreateObject("ADODB.Connection");
var rs = Server.CreateObject("ADODB.Recordset");
conn.Open = "Driver={Oracle in OraDb10g_home1};DBQ=tcp;UID='uname';PWD='upwd';";
rs.Open(sql, conn, 3, 3);
%>
------------------Error------------------
User Name is scott
Password is tiger
Microsoft OLE DB Provider for ODBC Drivers error '80040e4d'
[Oracle][ODBC][Ora]ORA-01017: invalid username/password; logon denied
/prc/main.asp, line 11
variable uname has valid username that is 'scott' and variable upwd as valid password ie 'tiger' both entered by the user.
with the same username and password i am able to connect to the database from the command prompt.
but when i tried using odbc through ASP(javascript) i am getting above error.
and one more thing if i mention username and password directly in UID and PWD it works but when i pass it through variables it wont work.
since variables have username and password it has to take from it directly...........manually i cant give,dynamically it has to take.
plz help me out....how i can pass the parameter to that UID and PWD.
conn.Open = "Driver={Oracle in OraDb10g_home1};DBQ=tcp;UID='uname';PWD='upwd';";
help plz
conn.Open = "Driver={Oracle in OraDb10g_home1};DBQ=tcp;UID='uname';PWD='upwd';"; --- does not work
conn.Open = "Driver={Oracle in OraDb10g_home1};DBQ=tcp;UID=scott;PWD=tiger;"; --- works
but i want the 1st statement to work........since user gives the password and username dynamically.
Thanks
Veeresh Sconn.Open("DSN=tcp;UID="+uname+";PWD="+upwd+";");
this solved me
thanks for all who had vied this..
veeresh -
Hi,
I am trying to insert an xml doc into a column of Oracle table which has a datatype CLOB in JSP. PFB my code that I am using --
int id = 100;
String st1 = "NEW";
String st2 = "WLR3_IN_1";
Date dt = new SimpleDateFormat("mm/dd/yyyy").parse("04/02/2008");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:CST Server","xmluser","xmluser");
String query = "INSERT INTO SEQ_API_MESSAGE_IN(SEQ_NO,MESSAGE_TEXT,STATUS,DIALECT,CREATED_TS) VALUES(?,?,?,?,?)";
out.println(6);
String fn = "C:/order.xml";
out.println(7);
PreparedStatement stmt = con.prepareStatement(query);
out.println(8);
File file = new File(fn);
out.println(9);
FileReader inputFileReader = new FileReader(file);
stmt.setInt(1,id);
stmt.setCharacterStream(2,inputFileReader, (long)file.length());
stmt.setString(3,st1);
stmt.setString(4,st2);
stmt.setDate(5,new java.sql.Date(dt.getTime()));
out.println(10);
if (stmt.executeUpdate() != 1) {
System.out.println("No record inserted.");
But I am getting an output in the form of an Oracle error - 5 6 7 8 9 10 [Oracle][ODBC][Ora]ORA-24801: illegal parameter value in OCI lob function
So all the statements are getting executed after which this Oracle error is thrown. Could you help me with this.
Thanks in anticipation.. :)As suggested I may try switching to JDBC instead of JDBC-ODBC bridge driver , but I also tried doing this to get the sysdate --
//Date dt = new SimpleDateFormat("mm/dd/yyyy").parse("04/02/2008");
String date = DateFormat.getInstance().format(new Date());
stmt.setString(5,date);
and now I am getting this error -- 5 6 7 8 9 10 [Oracle][ODBC][Ora]ORA-01843: not a valid month Hello1
Hello1 is coming from --
catch (SQLException sqle){
out.println(sqle.getMessage());
out.print("Hello1");
} -
Hello,
I'm using unixODBC with ODBC Oracle client 11 (Debian 7) to connect to Oracle database version 9.2.0.6 (Solaris 10), but show me this message:
[S1000][unixODBC][Oracle][ODBC][Ora]ORA-03134: Connections to this server version are no longer supported.
Note: I can connect to Oracle database version 10+.
Please can you help me.
Thank youAre you positive you're using version 11 Oracle client and 9206 database? That combination should work, and Ive never seen that error message occur for anything but the expected reason.
If you have MOS access you can check the client/database compatibility with the following note:
Client / Server / Interoperability Support Matrix For Different Oracle Versions (Doc ID 207303.1)
Hope it helps,
Greg -
UPDATE problem - [Oracle][ODBC][Ora]ORA-01456
I try to UPDATE a table using following driver, url and syntax :
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); // load driver
Connection conn = DriverManager.getConnection("jdbc:odbc:JDEV", "salgsinfo", "si"); // get connection
but receives this answer :
java.sql.SQLException: [Oracle][ODBC][Ora]ORA-01456: INSERT-, DELETE- or UPDATE-statements cannot be done in READ ONLY-transaction
the user is granted dba priviliges, what can i do ?
NielsORA-01456:may not perform insert/delete/update operation inside a READONLY transaction
Cause:A non-DDL INSERT/DELETE/UPDATE or SELECT FOR UPDATE operation was attempted.
Action:Commit or roll back the current transaction, then retry the operation. -
ORA-01013 with Oracle ODBC Driver 8.1.6.3
I have a very strange problem occuring with the latest Oracle 8.1.6 Driver. I am able to set up the ODBC connection and it tests correctly. I'll open an Access 97 database and attempt to link to a table in an Oracle 8.1.6 through ODBC. I can connect to the database fine and it brings back a list of the available tables. However, when I select a table and attempt to link to it, I get the following error:
ORA-01013: user requested cancel of current operation.
This behavior also occurs if I try this operation through VB 6.0 code.
Has anyone seen this before or better yet, have an answer as to why it is occurring?
P.S., I'm using MDAC 2.51As an update, when I turn tracing on, here is the section of the log file that contains the error.
MSACCESS d5-cb ENTER SQLStatisticsW
HSTMT 01861988
WCHAR * 0x00000000 [ -3] <empty string>
SWORD -3
WCHAR * 0x01862528 [ 5] "HQ"
SWORD 5
WCHAR * 0x01862548 [ -3] "AS"
SWORD -3
UWORD 1 <SQL_INDEX_ALL>
UWORD 0 <SQL_QUICK>
MSACCESS d5-cb EXIT SQLStatisticsW with return code -1 (SQL_ERROR)
HSTMT 01861988
WCHAR * 0x00000000 [ -3] <empty string>
SWORD -3
WCHAR * 0x01862528 [ 5] "HQ"
SWORD 5
WCHAR * 0x01862548 [ -3] "AS"
SWORD -3
UWORD 1 <SQL_INDEX_ALL>
UWORD 0 <SQL_QUICK>
DIAG [S1T00] [Oracle][ODBC][Ora]ORA-01013: user requested cancel of current operation
(1013) -
Whenever I try to add a database stored procedure in my crystal report using ODBC connection in the 'Set datasource Location' menu, it asks me for the discrete value for the parameters I specified in my stored procedure(Except for the REF cursor). My stored procedure seems to be correct but there seems to be a confusion within my crystal report. Once the values are entered it ends up by showing the following error message and my database source does not get added:
Databse Connector Error: 'HY000:[Oracle][ODBC][Ora]ORA-06550: line 1, column 18:PLS-00363: expression '01/01/2008' cannot be used as an assignment target
ORA-06550: line 1, column 31:PLS-00363: expression '01/01/2010' cannot be used as an assignment target
PL/SQL: Statement ignored
[Database Vendor Code: 6550 ]'
The only difference I am noticing is the REF Cursor is used in the Oracle SP. Whether the Crystal report can't differentiate my cursor or What could be the problem. Please provide me a solution for this
Note: The same is working when I change the database to any SQL
Seems to be the root cause for the problem is the parameters are getting renamed with the name of Stored procedure arguments once we change the database from SQL server to Oracle. Is there any possibilities to avoid this?
Thanks
Antony
Edited by: AntonyGR on Oct 11, 2011 1:32 PMWhat is the first arguement in the Oracle SP.Is it REF cusror or something else?
Also which ODBC driver you are using ?
Thanks,
Bilahari -
[Oracle][ODBC][Ora]ORA-03114 not connected
I' have oracle 10g express edition.
I use a c++ windows service administration connections and a Visual Basic program.
Vb invoke to c++ service, this create the connection and keep.
Vb invoke the interface exposed to c++ service to execute sentence and when c++ service want execute, this error appears [Oracle][ODBC][Ora]ORA-03114 not connected.
What happens???
Thanks..Are you using a Vb .net ?
if yes look for this link http://support.microsoft.com/default.aspx?scid=kb;en-us;830173
If no, the connection when using sqlplus works fine ?
cheers -
Script: D:\Connection.vbs
Line: 10
Char: 1
Error: [Oracle][ODBC][Ora]ORA-12560: TNS:protocol adaptor error
Code: 80004005
Source: Microsoft OLE DB Provider for ODBC Drivers
Connection.vbs file has following contents:
Dim strCon
strCon = "Driver={Microsoft ODBC for Oracle}; " & _
"CONNECTSTRING=(DESCRIPTION=" & _
"(ADDRESS=(PROTOCOL=TCP)" & _
"(HOST= TRISHUL)(PORT=1525))" & _
"(CONNECT_DATA=(SERVICE_NAME=BTFLVAS))); uid=odb;pwd=odb;"
Dim ocon1:set ocon1=CreateObject("ADODB.Connection")
ocon1.open strCon
************************************************** ****************The Service name BTFLVAS
It looks like you are connecting through CLient but you also have TNSNAMES.ora entry
How do you connect?
ODBC or Oracle Clinet? -
Hi All
I got this error every time I run a program that uses an ODBC connection to my DB.
MY someone help me found the solution.
My Server AIX 5.2 with Oracle 10 R2
My workstation Windows XP SP3
Thanks to all of you
Regards.Hi,
If you are using the Oracle ODBC driver to connnect to an Oracle database then it would be better to follow up in the forum -
Forum: ODBC
ODBC
This forum is for questions about connecting to non-Oracle databases from Oracle using Database Gateways.
Regards,
Mike -
Vbscript to connect to oracle fails with ORA-12560: TNS:protocol adapter error
I am running a Windows 7, 64 bit system with the Oracle 32 bit client installed. The 32 bit client is required for use with Oracle's Documaker Studio which is working fine with the current client configuration. I would like to connect the same database using a vbscript. Here is the test script I am using:
Option Explicit
Dim strCon
strCon = "Driver={Oracle in OraClient11g_home1_32bit}; " & _
"CONNECTSTRING=(DESCRIPTION=" & _
"(ADDRESS=(PROTOCOL=TCP)" & _
"(HOST={VSTODEEDATxx.xxxxxxx.com})(PORT=1521))" & _
"(CONNECT_DATA=(SERVICE_NAME=IDMAKER))); uid=xxxxxx;pwd=xxxxxxxx;"
Dim oCon: Set oCon = WScript.CreateObject("ADODB.Connection")
Dim oRs: Set oRs = WScript.CreateObject("ADODB.Recordset")
oCon.Open strCon
Set oRs = oCon.Execute("SELECT TO_CHAR(SYSDATE,'MM-DD-YYYY HH24:MI:SS') AS DateTime FROM DUA")
While Not oRs.EOF
WSCript.Echo oRs.Fields(0).Value
oRs.MoveNext
Wend
oCon.Close
Set oRs = Nothing
Set oCon = Nothing
In the connection string I am using the 32 bit driver used succesfully by Documaker. I provided all the parms to eliminate the need for tnsnames.ora. However, I do have tnsnames.ora on my system and Documaker is using it.
Since the client is 32 bit, I am using the following command to run the script:
c:\windows\syswow64\cscript.exe c:\temp\oracle\testing\testconnect.vbs
This is suppose to run the script in 32 bit mode and be compatible with the client.
When I run the program I get the following error:
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
c:\temp\oracle\testing\testconnect.vbs(12, 1) Microsoft OLE DB Provider for ODBC
Drivers: [Oracle][ODBC][Ora]ORA-12560: TNS:protocol adapter error
Would someone please advise on how to debug this problem? Thanks, Gary"connectstring" is not a valid attribute with Oracle's ODBC driver, so since there is no datasource attribute specified, the app is trying to connect to a local database, and since you don't have one, you get 12560.
To resolve the problem, pass DBQ= instead of CONNECTSTRING=
http://docs.oracle.com/cd/B19306_01/server.102/b15658/app_odbc.htm#i1093897
Greg
Maybe you are looking for
-
Hi I read in SAP HELP like this in country version india on excise inv verification. " Entering and Verifying Invoices Follow the standard invoice verification procedure, but select Calculate tax on the Vendor Items screen. The system proposes the d
-
How can i restore my old iPad mini onto my new iPad air2
How can I restore my old iPad mini onto my new iPad air 2
-
Can not print. Error message "no pages selected"
Help, my computer upgraded to the latest adobe reader, and now it wont print. When I go to print I get the message "unable to print because no pages were selected" I have read some things on here that said to uncheck the secure printing. I have do
-
How do i get my printer to print black and white only
How do I get my printer to print black and white.
-
How can I expand my wireless network with a Time Capsule and Airport Express?
My entire house is wired for ethernet access (2 floors). I have a Time Capsule on the 2nd floor that reaches the entire house except for one room. In this one room I have an ethernet port plugged into an Airport Express. The problem I encounter is