Connectivity problem with Oracle Database

Last post 05-05-2008 4:49 AM by yeotumitsu@sify.com. 1 replies.

Sort Posts:

  • Connectivity problem with Oracle Database

    05-05-2008, 3:39 AM
    • Member
      4 point Member
    • sachin0922
    • Member since 03-26-2008, 4:17 AM
    • Posts 7
    Hello All,

    I am trying to access Oracle database from my ASP.NET application but it is giving me error "System.Data.OracleClient.OracleException: ORA-12154: TNS:could not resolve service name" .

    I have given full control to my ASP.NET Machine Account over my Oracle root directory and child directories. I am able to connect database using TOAD but from ASP.NET application it gives above error. I tried to tnsping the alias name of my database and it is getting resolved from proper location(location where my TNSNAMES.ORA and SQLNET.ORA is stored).

     Dont know what to do now.

    Can anyone help me..!!!

     

    Regards,

    Sachin

    Filed under: ,
  • Re: Connectivity problem with Oracle Database

    05-05-2008, 4:49 AM

     If u r using TNS ( \oracle\network\admin\tnsnames.ora )

     use the full connection details -

    <connectionStrings>
        <add name="aspnet_empost" connectionString="SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.12)(PORT=1521))(CONNECT_DATA=(SID=mylink)));uid=system;pwd=nk321$$;"/>
      </connectionStrings>

    make sure your tns names file have the entries.

    if you r using a direct connectio to server

    check this

    http://forums.asp.net/t/1246799.aspx

     

    hope it helps. 

    Hope it helps.

    -Manas

    =======================================
    If this post is useful to you, please mark it as answer.
Page 1 of 1 (2 items)