473,765 Members | 2,172 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="Applicat ion" id="oSession"
progid="OracleI nProcServer.XOr aSession"></object>

<script runat="server" language="vbscr ipt">
Sub Application_OnS tart

oSession.Create DatabasePool 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=VBScri pt %>
<%

Option Explicit
Response.Expire s = 0

Dim OraSession
Dim OraDatabase
Dim rsEntryTypes

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

Set OraSession = Server.CreateOb ject("OracleInP rocServer.XOraS ession")
Set OraDatabase = OraSession.DbOp enDatabase("IFS P2", "uid/pwd",cint(0))

Response.Write "Connected to " & OraDatabase.Con nect & "@" &
OraDatabase.Dat abaseName
Response.Write "OO4O Version: " & OraSession.OIPV ersionNumber
Response.Write "Oracle Version: " & OraDatabase.RDB MSVersion

Response.Write "End"
Set OraSession = nothing
Set OraDatabase = nothing
%>
Sep 26 '06 #1
8 25608
On Tue, 26 Sep 2006 16:32:18 +0100, "CJM"
<cj*******@REMO VEMEyahoo.co.uk wrote:
>
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*****@sybran db.demon.nlwrot e in message
news:sf******** *************** *********@4ax.c om...
On Tue, 26 Sep 2006 16:32:18 +0100, "CJM"
<cj*******@REMO VEMEyahoo.co.uk wrote:
>>
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*******@REMO VEMEyahoo.co.uk wrote 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="Applicat ion" id="oSession"
progid="OracleI nProcServer.XOr aSession"></object>

<script runat="server" language="vbscr ipt">
Sub Application_OnS tart

oSession.Create DatabasePool 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=VBScri pt %>
<%

Option Explicit
Response.Expire s = 0

Dim OraSession
Dim OraDatabase
Dim rsEntryTypes

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

Set OraSession = Server.CreateOb ject("OracleInP rocServer.XOraS ession")
Set OraDatabase = OraSession.DbOp enDatabase("IFS P2", "uid/pwd",cint(0))

Response.Write "Connected to " & OraDatabase.Con nect & "@" &
OraDatabase.Dat abaseName
Response.Write "OO4O Version: " & OraSession.OIPV ersionNumber
Response.Write "Oracle Version: " & OraDatabase.RDB MSVersion

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="Applicat ion" id="oSession"
progid="OracleI nProcServer.XOr aSession"></object>

<script runat="server" language="vbscr ipt">
Sub Application_OnS tart

oSession.Create DatabasePool 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=VBScri pt %>
<%

Option Explicit
Response.Expire s = 0

Dim OraSession
Dim OraDatabase
Dim rsEntryTypes

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

Set OraSession = Server.CreateOb ject("OracleInP rocServer.XOraS ession")
Set OraDatabase = OraSession.DbOp enDatabase("IFS P2", "uid/pwd",cint(0))

Response.Write "Connected to " & OraDatabase.Con nect & "@" &
OraDatabase.Dat abaseName
Response.Write "OO4O Version: " & OraSession.OIPV ersionNumber
Response.Write "Oracle Version: " & OraDatabase.RDB MSVersion

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.peas land.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.pea sland.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*****@sybran db.demon.nlwrot e in message
news:sf******** *************** *********@4ax.c om...
On Tue, 26 Sep 2006 16:32:18 +0100, "CJM"
<cj*******@REMO VEMEyahoo.co.uk wrote:
>
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.goo glegroups.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
4826
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. I had her send me her tnsnames.ora from her PC. The entry I wanted was as follows (some letters replaced with xxx for security reasons): xxxora2_prod2 = (DESCRIPTION=
7
4640
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
19854
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 Access? Below is the code I used in the VB app to connect to the Oracle database, and I just can't seem to get it translated to ADO in Access/VBA. Any assistance is appreciated.
9
2416
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. I tried that quickly, but the file is 400 MB, and the the installation asks for all kinds of things in order to install. Now I'm very confused. a) Do you still need ODP.NET with framework 2.0? b) Do you need to download and install other...
2
43647
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 IP address, 172.16.xx.xx and 192.168.xxx.xx whices I want to connect to the server DB. How can I set the Listener.ora & Tnsnames.ora so all clients could connect to server. Right now I can connect just only one IP and the other IP is offline, but...
1
17786
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 this exception. my code is as follows in when-button-pressed trigger:
0
1506
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. Sadly, there's no ORA schema on my database, so I was wondering: 1. Is the ORA schema compatible with my database release ? 2. Could I install / add this schema to my database in order to take advantage of the set of functions it has ? If...
4
15347
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
4738
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
5105
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, recently after few cycle of connect and disconnect, when the next issue connect statement, it was unable to connect and return me ora-00604 and the process end. Even i restart the process, after few cycle also the same return me ora-00604 during the...
0
9398
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9832
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5275
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5419
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2805
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.