473,395 Members | 1,941 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

OO4O: ORA-12154 Error - TNS:could not resolve the connect identifier specified

CJM
I have a working web application (ASP) which links to an Oracle 10g DB via
OO4O. I'm trying to port it to either of two test servers, but in fact, I
can't get it to work with either - 'Unable to make connection, ORA-12154:
TNS:could not resolve the connect identifier specified'. This error occurs
in the applications global.asa file where I'm trying to set up a connection
pool:

<object runat="Server" scope="Application" id="oSession"
progid="OracleInProcServer.XOraSession"></object>

<script runat="server" language="vbscript">
Sub Application_OnStart

oSession.CreateDatabasePool 2, 40, 200, "IFSP2", "uid/pwd", 0 <==
error occurs here

End Sub
</script>

I'm not sure where I have gone wrong. I originally installed the
InstantClient (and ODBC add-on) on it's own. I created SQL.ORA and
TNSNAMES.ORA files, and the NLS_LANG and TNS_ADMIN environment variables and
I prepended the Path environment variable with the path to the top-level
oracle folder. So far so good - I can create a DSN which connects to the DB
OK, and Oracle SQL Developer recognised the TNS names I supply and can
connect to the DB that way too.

I then installed the Oracle .NET tools package, which includes within it
Oracle Objects for OLE. The installation proceeded as expected, but short of
getting my application to work, I dont know of any way to confirm that it is
working.

The application itself is using Anonymous authentication for the time being,
though it will eventually be using Integrated Windows Authentication, so I
cant see the any problems server-side. What is more, I assume that OO4O is
reading the TNS names in the same way that the ODBC Administrator and Oracle
SQL Developer do, which makes this problem even more curious.

I've also tried the code listed below to see if a straight-forward
connection (as opposed to pooling) would work but it didnt.

Any thoughts?

Thanks in advance.

Chris
Test.asp:

<%@ Language=VBScript %>
<%

Option Explicit
Response.Expires = 0

Dim OraSession
Dim OraDatabase
Dim rsEntryTypes

%>
<!-- #include virtual='/common/oo4oglobals.asp' -->
<%

Set OraSession = Server.CreateObject("OracleInProcServer.XOraSessio n")
Set OraDatabase = OraSession.DbOpenDatabase("IFSP2", "uid/pwd",cint(0))

Response.Write "Connected to " & OraDatabase.Connect & "@" &
OraDatabase.DatabaseName
Response.Write "OO4O Version: " & OraSession.OIPVersionNumber
Response.Write "Oracle Version: " & OraDatabase.RDBMSVersion

Response.Write "End"
Set OraSession = nothing
Set OraDatabase = nothing
%>
Sep 26 '06 #1
8 25553
On Tue, 26 Sep 2006 16:32:18 +0100, "CJM"
<cj*******@REMOVEMEyahoo.co.ukwrote:
>
Any thoughts?
This is the most often posted error, as all people running into this
problem think they are unique or are too lazy to search Google, or
the Troubleshooting Section of the Oracle Net administrators manual.

My suggestion is consequently obvious.

I would urge you (or anyone exposed to the Evil Empire of Bill Gates)
- to stop being lazy
- look up Oracle errors in the Oracle documentation
- search Google.

--
Sybrand Bakker, Senior Oracle DBA
Sep 26 '06 #2
CJM

"Sybrand Bakker" <po*****@sybrandb.demon.nlwrote in message
news:sf********************************@4ax.com...
On Tue, 26 Sep 2006 16:32:18 +0100, "CJM"
<cj*******@REMOVEMEyahoo.co.ukwrote:
>>
Any thoughts?

This is the most often posted error, as all people running into this
problem think they are unique or are too lazy to search Google, or
the Troubleshooting Section of the Oracle Net administrators manual.

My suggestion is consequently obvious.

I would urge you (or anyone exposed to the Evil Empire of Bill Gates)
- to stop being lazy
- look up Oracle errors in the Oracle documentation
- search Google.
I would urge you to:
- Stop wasting bandwidth on slagging off Microsoft - do you think that your
opinion of Bill Gates should be a factor in my companies choice of platform
for an Oracle database?
- Stop acting pompous by accusing people of being lazy without due cause.
- Stop assuming that people haven't looked up the error in the Oracle
documentation - perhaps they have but either havent found the inspiration
they need or maybe they *do* have a 'unique' problem.
- Stop assuming that people havent searched google - perhaps they have but
haven't been able to find the signal within all that noise...

If you had bothered to actually read my post, it will have been apparent
from the information that I provided that I have been through some logical
steps to debug this problem. I've basically outlined my installation
procedure (which was the same as was done on my development server - which
*does* work), so it the problem is as common and routine as you suggest, the
solution should be fairly obvious - in which case, why not just say it.

Can anybody else reading this please assume that I've been looking in what I
think are the right places, and that I either haven't come across the right
solution or if I have, I haven't understood it.

CJM
Sep 27 '06 #3

"CJM" <cj*******@REMOVEMEyahoo.co.ukwrote in message
news:4n************@individual.net...
I have a working web application (ASP) which links to an Oracle 10g DB via
OO4O. I'm trying to port it to either of two test servers, but in fact, I
can't get it to work with either - 'Unable to make connection, ORA-12154:
TNS:could not resolve the connect identifier specified'. This error occurs
in the applications global.asa file where I'm trying to set up a
connection
pool:

<object runat="Server" scope="Application" id="oSession"
progid="OracleInProcServer.XOraSession"></object>

<script runat="server" language="vbscript">
Sub Application_OnStart

oSession.CreateDatabasePool 2, 40, 200, "IFSP2", "uid/pwd", 0 <==
error occurs here

End Sub
</script>

I'm not sure where I have gone wrong. I originally installed the
InstantClient (and ODBC add-on) on it's own. I created SQL.ORA and
TNSNAMES.ORA files, and the NLS_LANG and TNS_ADMIN environment variables
and
I prepended the Path environment variable with the path to the top-level
oracle folder. So far so good - I can create a DSN which connects to the
DB
OK, and Oracle SQL Developer recognised the TNS names I supply and can
connect to the DB that way too.

I then installed the Oracle .NET tools package, which includes within it
Oracle Objects for OLE. The installation proceeded as expected, but short
of
getting my application to work, I dont know of any way to confirm that it
is
working.

The application itself is using Anonymous authentication for the time
being,
though it will eventually be using Integrated Windows Authentication, so I
cant see the any problems server-side. What is more, I assume that OO4O is
reading the TNS names in the same way that the ODBC Administrator and
Oracle
SQL Developer do, which makes this problem even more curious.

I've also tried the code listed below to see if a straight-forward
connection (as opposed to pooling) would work but it didnt.

Any thoughts?

Thanks in advance.

Chris
Test.asp:

<%@ Language=VBScript %>
<%

Option Explicit
Response.Expires = 0

Dim OraSession
Dim OraDatabase
Dim rsEntryTypes

%>
<!-- #include virtual='/common/oo4oglobals.asp' -->
<%

Set OraSession = Server.CreateObject("OracleInProcServer.XOraSessio n")
Set OraDatabase = OraSession.DbOpenDatabase("IFSP2", "uid/pwd",cint(0))

Response.Write "Connected to " & OraDatabase.Connect & "@" &
OraDatabase.DatabaseName
Response.Write "OO4O Version: " & OraSession.OIPVersionNumber
Response.Write "Oracle Version: " & OraDatabase.RDBMSVersion

Response.Write "End"
Set OraSession = nothing
Set OraDatabase = nothing
%>

Can you connect from that machine via sqlplus using uid/pwd@ifsp2 ? If not
then solve that problem first.
Jim
Sep 27 '06 #4
CJM wrote:
I have a working web application (ASP) which links to an Oracle 10g DB via
OO4O. I'm trying to port it to either of two test servers, but in fact, I
can't get it to work with either - 'Unable to make connection, ORA-12154:
TNS:could not resolve the connect identifier specified'. This error occurs
in the applications global.asa file where I'm trying to set up a connection
pool:

<object runat="Server" scope="Application" id="oSession"
progid="OracleInProcServer.XOraSession"></object>

<script runat="server" language="vbscript">
Sub Application_OnStart

oSession.CreateDatabasePool 2, 40, 200, "IFSP2", "uid/pwd", 0 <==
error occurs here

End Sub
</script>

I'm not sure where I have gone wrong. I originally installed the
InstantClient (and ODBC add-on) on it's own. I created SQL.ORA and
TNSNAMES.ORA files, and the NLS_LANG and TNS_ADMIN environment variables and
I prepended the Path environment variable with the path to the top-level
oracle folder. So far so good - I can create a DSN which connects to the DB
OK, and Oracle SQL Developer recognised the TNS names I supply and can
connect to the DB that way too.

I then installed the Oracle .NET tools package, which includes within it
Oracle Objects for OLE. The installation proceeded as expected, but short of
getting my application to work, I dont know of any way to confirm that it is
working.

The application itself is using Anonymous authentication for the time being,
though it will eventually be using Integrated Windows Authentication, so I
cant see the any problems server-side. What is more, I assume that OO4O is
reading the TNS names in the same way that the ODBC Administrator and Oracle
SQL Developer do, which makes this problem even more curious.

I've also tried the code listed below to see if a straight-forward
connection (as opposed to pooling) would work but it didnt.

Any thoughts?

Thanks in advance.

Chris
Test.asp:

<%@ Language=VBScript %>
<%

Option Explicit
Response.Expires = 0

Dim OraSession
Dim OraDatabase
Dim rsEntryTypes

%>
<!-- #include virtual='/common/oo4oglobals.asp' -->
<%

Set OraSession = Server.CreateObject("OracleInProcServer.XOraSessio n")
Set OraDatabase = OraSession.DbOpenDatabase("IFSP2", "uid/pwd",cint(0))

Response.Write "Connected to " & OraDatabase.Connect & "@" &
OraDatabase.DatabaseName
Response.Write "OO4O Version: " & OraSession.OIPVersionNumber
Response.Write "Oracle Version: " & OraDatabase.RDBMSVersion

Response.Write "End"
Set OraSession = nothing
Set OraDatabase = nothing
%>

I'm not an expert with ASP, but is IFSP2 the TNS entry you are using to
denote the database to connect to? If so, then verify that it is defined
correctly in your TNSNAMES.ORA configuration file. Also, verify that you
can TNSPING that entry, "tnsping ifsp2". If not, then you have either 1)
configured your tnsnames incorrectly, 2) have an incorrect sqlnet.ora
configuration file, or 3) your software cannot see these files.

HTH,
Brian

--
================================================== =================

Brian Peasland
db*@nospam.peasland.net
http://www.peasland.net

Remove the "nospam." from the email address to email me.
"I can give it to you cheap, quick, and good.
Now pick two out of the three" - Unknown
Sep 27 '06 #5
CJM
"Brian Peasland" <db*@nospam.peasland.netwrote in message
news:J6********@igsrsparc2.er.usgs.gov...
>
I'm not an expert with ASP, but is IFSP2 the TNS entry you are using to
denote the database to connect to? If so, then verify that it is defined
correctly in your TNSNAMES.ORA configuration file. Also, verify that you
can TNSPING that entry, "tnsping ifsp2". If not, then you have either 1)
configured your tnsnames incorrectly, 2) have an incorrect sqlnet.ora
configuration file, or 3) your software cannot see these files.
Yes, IFSP2 is the DB alias. It is defined correctly - AFAIK, the test server
was set up the same way as the development server, and shares the same
TNSNAMES.ORA file (and other config).

I didnt know about TNSPING, but it worked a treat - all aliases resolve to
the right locations.

I'm not sure, but I think I have made some progress... I'll post back
if/when I can confirm it.

Thanks for your response, Brian.

Chris
Sep 27 '06 #6
CJM

"Jim Kennedy" <jim dot scuba dot kennedy at gee male dot comwrote in
message news:Hb******************************@comcast.com. ..
>
Can you connect from that machine via sqlplus using uid/pwd@ifsp2 ? If
not
then solve that problem first.
Jim
I haven't tried SQLPlus yet (not really up to speed on it) but I can TNSPING
the DB and the same page also connects via ADO (using the same TNS names) so
they appear to be configured correctly.

As I've just mentioned to Brian, I think I may have made some progress, so
I'll review my position if/when I confirm this.

CJM
Sep 27 '06 #7

CJM wrote:
"Sybrand Bakker" <po*****@sybrandb.demon.nlwrote in message
news:sf********************************@4ax.com...
On Tue, 26 Sep 2006 16:32:18 +0100, "CJM"
<cj*******@REMOVEMEyahoo.co.ukwrote:
>
Any thoughts?
This is the most often posted error, as all people running into this
problem think they are unique or are too lazy to search Google, or
the Troubleshooting Section of the Oracle Net administrators manual.

My suggestion is consequently obvious.

I would urge you (or anyone exposed to the Evil Empire of Bill Gates)
- to stop being lazy
- look up Oracle errors in the Oracle documentation
- search Google.

I would urge you to:
- Stop wasting bandwidth on slagging off Microsoft - do you think that your
opinion of Bill Gates should be a factor in my companies choice of platform
for an Oracle database?
- Stop acting pompous by accusing people of being lazy without due cause.
- Stop assuming that people haven't looked up the error in the Oracle
documentation - perhaps they have but either havent found the inspiration
they need or maybe they *do* have a 'unique' problem.
- Stop assuming that people havent searched google - perhaps they have but
haven't been able to find the signal within all that noise...

If you had bothered to actually read my post, it will have been apparent
from the information that I provided that I have been through some logical
steps to debug this problem. I've basically outlined my installation
procedure (which was the same as was done on my development server - which
*does* work), so it the problem is as common and routine as you suggest, the
solution should be fairly obvious - in which case, why not just say it.

Can anybody else reading this please assume that I've been looking in what I
think are the right places, and that I either haven't come across the right
solution or if I have, I haven't understood it.

CJM
Quoting from your further contributions in this thread

'I didnt know about TNSPING, but it worked a treat - all aliases
resolve to
the right locations.'

So obviously my assumptions weren't assumptions. I was correct, and you
just weren't speaking the truth, trying to coerce people to do your
work for free.

As for being pompous, I doubt whether I am pompous, but I'm not so sure
about you.
Your insults were just plain unjustified, and my assumptions were
correct.
You didn't look up the error in any Oracle manual, or you would have
known about tnsping.

--
Sybrand Bakker
Senior Oracle DBA

Sep 28 '06 #8
CJM

"sybrandb" <sy******@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
>

Quoting from your further contributions in this thread

'I didnt know about TNSPING, but it worked a treat - all aliases
resolve to
the right locations.'

So obviously my assumptions weren't assumptions. I was correct, and you
just weren't speaking the truth,
Really?

Your assumptions were wrong.

I was speaking the truth:
- I did google for help prior to posting.
- I did check my off-line Oracle documentation
- I did check on-line Oracle documentation
- Searched previous posts in this NG

As for TNSPING, it didnt demonstrate the problem nor find the solution. More
specifically the Oracle page dedicated to the error doesnt suggest using
TNSPING for anything
(http://download-uk.oracle.com/docs/c....htm#CEGJAGGH).
Nor does this page:
http://download-uk.oracle.com/docs/c....htm#ORA-12154.

Or this:
http://download-uk.oracle.com/docs/c....htm#sthref484

Moreover, my OP clearly states that I succeeded in defining and using a
System DSN - in essence this proves the same as TNSPING - that the listener
is available and working and that the TNS names are correctly configured.

Even now you have no idea as to the cause of the problem. It seems a reboot
solved the problem, but why? So while hardly unique, it appears the problem
was non-standard and I was right to consult my peers within this group. No
amount of searching online was likely to reveal the solution.
trying to coerce people to do your
work for free.
Coerce: verb; to achieve by force or threat.

Hmmm....

I haven't issued any threats as far as I know, but I was certainly trying to
get my peers in this group to help me. For free, too. [The cheek of it! -
Ed.]

Although they never came up with the solution, they were potentially going
to save me some work. But surely that is the purpose of these peer-support
newsgroups?

Moreover, I always try to help at least one person each time someone helps
me. Obviously, not being an Oracle expert, I'm not much help here, but
hopefully there might be a grateful recipient in one of the other NGs I
frequent.
As for being pompous, I doubt whether I am pompous, but I'm not so sure
about you.
Your insults were just plain unjustified,
Whether it is an insult depends on whether you *are* pompous or not.

http://groups.google.com/group/comp....2066eafb253721

The general concensus seems to be that you have the right aptitude but the
wrong attitude.

I think every technical NG has someone like you, which must be reassuring
for you, if not for the rest of us. I'll let each other participant in this
NG make up their own minds as to what you are. And what I may be for that
matter.

http://www.politicsforum.org/images/...s/flame_47.php
...and my assumptions were
correct.
You didn't look up the error in any Oracle manual, or you would have
known about tnsping.
Er, yeah... so you said.

Thanks once again to those who did their best to help.

Chris
Sep 28 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tig | last post by:
Hi all. I have a need to connect to an Oracle 7.3.3.5 database. I have a user who successfully connects to it with her Oracle 7.3 client. I have an Oracle 9.2 client installed on my machine. ...
7
by: skishorev | last post by:
Hi, How shall i connect c++ with any data base(like oracle , xml etc.).Plz Let me know if anybody familiar with this. Thanks&regards, saikishore
4
by: RLN | last post by:
I have an Access2002 database that needs to connect to an Oracle Database. I connected to my Oracle DB in a simple VB6 app using no ODBC data source. How do I do the same thing using VBA in...
9
by: D. Patrick | last post by:
I need to connect to an Oracle database. I've never done it before. I see that with framework 1.1 you had to download ODP.NET from Oracle's site in order for the framework classes to even work....
2
by: Dwie | last post by:
Dear All, I'm a new in Oracle DB. I'm using Windows 2000 as server and Windows XP as client. I installed Oracle Enterprise on server and Oracle 8.1 on clients. I have some client with 2 different...
1
by: thewickedman | last post by:
Hi, I try to open new OpenOffice document (writer), But I am getting the exception FRM 40735:WHEN-BUTTON-PRESSED Trigger Raised unhandled Exception ORA - 305500 Please help me to resolve...
0
by: dsaborio | last post by:
Hi all... I'm migrating stored procedures from Oracle to DB2 r5.1 using a migration tool a friend gave me. Some of the Oracle built-in functions are migrated like this: to_date ==> ORA.to_date. ...
4
by: kkcholan | last post by:
Sir Backend Oracle 9i Front end VB.Net O/s Windows 2003 Server Server Crashed due to power failure then the following error displays when connect to oracle database
0
by: Zahi Savion | last post by:
Hi All, I tried evething: but no help, I'm connecting from my home trough 1.5 MB ADSL Line to Oracle Server and getting ORA-12170 Oracle 10g Actions that didn't help:
3
by: lsy | last post by:
I'm writing PRO C program with oracle 8i. My process first connect to the database with using ora_connect(), proceed the task then diconnect with using ora_disconnect(). This would always in a loop,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.