locked
ORA-12154: TNS: Could not resolve the connection identifier specified RRS feed

  • Question

  • User2120624532 posted

    I want to make an asp.net C# application where database is Oracle Express 10g.

    Now I cant make a connection with oracle in visual studio 2010. I am facing a problem

    ORA-12154: TNS: Could not resolve the connection identifier specified

    My connection string:

    <add name="ConStr2" connectionString="Data Source=Rashed ;User ID=TestDB;Password=sa123" providerName="System.Data.OracleClient"/>

     

    Windows
    Windows:7
    64-bit Operating System
     
    Database Version:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
     
    TNS

     Collapse | Copy Code
    XE=
      (DESCRIPTION=
        (ADDRESS=
          (PROTOCOL=TCP)
          (HOST=Rashed)
          (PORT=1521)
        )
        (CONNECT_DATA=
          (SERVER=dedicated)
          (SERVICE_NAME=XE)
        )
      )

    NB: My oracle db is running. I am using visual studio 2010

    Wednesday, November 28, 2012 6:35 AM

All replies

  • User551462331 posted

    check connectionstring format here

    http://www.connectionstrings.com/oracle

    if you are not using Tnsnames.ora file or you are not sure, then use connection string format of "without tnsnames.ora" in above link

    hope this helps...

    Wednesday, November 28, 2012 6:44 AM
  • User2120624532 posted

    not finding sufficient solutions..

    Monday, December 10, 2012 5:51 AM