Home » Open Source » Programming Interfaces » Problem Connection to 10g from .Net Service
Problem Connection to 10g from .Net Service [message #293210] Fri, 11 January 2008 03:54 Go to next message
jholzer
Messages: 3
Registered: January 2008
Junior Member
Hi!

I have some problems connecting to a 10g-database from a .Net2.0-Service.

I use the data-access-components 10.2.0.2.21 for accessing the DB.
In my test-environment (local TNSnames.ora) everything works fine.
The productive environment uses a centralized tnsnames-resolution.
When i connect the DB from sqlplus on the prod-env. i get a connection with
sqlplus user/password@datasource.location.domain
tnsping datasource.location.domain
also works.
But when i start my service i get the excetion "Oracle.DataAccess.Client.OracleException ORA-12154, TNS: Angegebener Connect Identifier could not be resolved"

Do i have to do some more configuration on the DAC?
Who can help me?

Thanks a lot!

Greetings

JH

[Updated on: Fri, 11 January 2008 03:57]

Report message to a moderator

Re: Problem Connection to 10g from .Net Service [message #293221 is a reply to message #293210] Fri, 11 January 2008 04:08 Go to previous messageGo to next message
Michel Cadot
Messages: 58634
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
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.

Regards
Michel
Re: Problem Connection to 10g from .Net Service [message #293225 is a reply to message #293221] Fri, 11 January 2008 04:30 Go to previous messageGo to next message
jholzer
Messages: 3
Registered: January 2008
Junior Member
I´ve read that already.
The used config can be considered as "local configuration" as the *.ora-files are located on a fileserver.
Otherwise sqlplus and tnsping wouldn´t work neither. But they do, so the oracle-client is able to find these files and process them.

The question is if there has to be some more configuration of the "Data Access Components" as it seems that they are not able to resolve the TNS-name. Maybe they have to be connected in some way to the client/the *.ora-files.

The docs delivers with Data Access Components say nothing at all about any configuration, so i assume that they would use the ora-client´s config. But if they did they were able to resolve the TNS-name.
Re: Problem Connection to 10g from .Net Service [message #293231 is a reply to message #293225] Fri, 11 January 2008 04:36 Go to previous message
jholzer
Messages: 3
Registered: January 2008
Junior Member
Another thing i just discovered:

when i copy the *.ora-files from the server-share to my local Network/Admin-directory it works.
So it seems that the Data-Access-Components are not able to find the *.ora-files.

Is there any config-file i can modify to make the Data-Access-Components use the *.ora-files located on the server-share?
Previous Topic: How do I Pass Params and Call A Simple PL/SQL Query from C#.NET 2.0?
Next Topic: Oracle and Ruby On Rails
Goto Forum:
  


Current Time: Thu Jul 31 13:05:04 CDT 2014

Total time taken to generate the page: 0.09120 seconds