views:

1580

answers:

4

Using the standard Delphi dbexpress dbexpora.dll + oci.dll (10g) (the oracle instantclient is installed).

When directly on the Oracle Database box we can run dbexpress apps just fine. The local dbxconnections.ini alias used in that case simply specifies our DB service name ORCL as the "database" parameter.

We are trying to connect to this same database from client machines and receiving a series of errors.

Naturally, we are trying all manner of strings in the database parameter. Using a string like, MOHAWK2:1521:ORCL we are at the point where we can at least get a listener error:

Failure to Connect: ORA-12514 TNS:listener does not currently know of service requested in connect descripter.

I imagine there are some tools to test the naming availability...

+2  A: 

Use TNSPING on the server to see how it's resolving the service name. Various configuration options and files can map a simple designation to a full server/port/service.

C:>TNSPING ORCL

Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE))) OK (0 msec)

Extract out the server/port/service and construct the connect string in whatever format the component or connection method your using needs.

Brian Evans
+1  A: 

Is the listener setup and running on the oracle server? Is it accepting connection for the instance/service of the database you are connecting to? Have you checked with lsnrctl status? Have you try turning on sqlnet logging and listener logging to see if you are even making a connection to the database from the remote site and what error is recorded in the listner log as to why its refusing service? Is the listener accepting tcp connection or is the listener only accepting IPC connection? without listening for tcp connection, it won't accept remote connections.

MichaelN
+1  A: 

Check connectivity using tnsping first. If OK, try connecting with sqlplus. If tnsping fails you are using incorrect service name, or you haven't configured your client properly. If you are relying on local configurations, the file to edit is tnsnames.ora in ORAHOME\NETWORK\ADMIN which will need configuration settings in order to locate the server, and this includes host, port and service name.

stili
and if one needs more information, maybe [this link](http://www.orafaq.com/wiki/SQL\*Net_FAQ#How_does_one_configure_SQL.2ANet.3F) at [orafaq](http://www.orafaq.com) might be useful. it helped me.
mariotomo
+1  A: 

Sorry, about the CAPS, this is all new to me. I don't have any reputation, what i did have has now been lowered do to this question title being in caps. I dont know how to comment to you all who have answered........casue it wont let me.....i dont have enough reputation. I guess i need to move onto another forum....

anyway,

Solved!

I setup a new vmware clone - installed the oracle client and our couple of dlls and exes in a dir and it worked.

So I removed everything extraneous on the box I was working with and bingo.

I think it was Interference from the delphi 2007 that was already on that machine...despite trying to path everything right around it.

Shane
+1, thanks for the followup. Shrug off the petty complaints, keep contributing and your rep will go up accordingly. If you haven't already done so, read the FAQ (link at top of page).
DCookie
BTW (sorry 'bout the CAPS :-) you can accept your own answer to your question (no rep awarded, however).
DCookie