Beantwortet Need Help Reagarding Ora-12154 TNS

  • 2012年4月14日 14:03
     
     

    ora-12154 tns could not resolve service name

    I3 Second generation, 64 Bit Operating System Windows 7 Home Basic..

    Please help... solve my problem... how can i connect to Oracle Data Base from Visual Studio 2010 (ASP.Net).. currently i have oracle 10g XE in my system. Please Help Me to solve this ora-12154 tns could not resolve service name

    Reply Soon

    Anup

すべての返信

  • 2012年4月15日 10:14
     
     回答済み

    Hi Anup,

    the following link has an exhaustive collection of oracle connection strings. May be it can help.

    http://www.connectionstrings.com/oracle


    Praky

  • 2012年4月16日 10:59
     
     回答済み

    Hi Anup,

    If you are trying to connect to Oracle from 64bit application (for example SharePoint 2010) you should have installed: Oracle Database 11g Release 2 Client (11.2.0.1.0) for Microsoft Windows (x64) (it can be found here http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win64soft-094461.html )

    If you are trying to connect to Oracle from 32bit application (for example VisualStudio 2010) you should have installed: Oracle Database 11g Release 2 Client (11.2.0.1.0) for Microsoft Windows (32-bit) (it can be found here http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win32soft-098987.html )

    Please ensure you select the 'Administrator' type of installation when you install Oracle clients.
    It is a bit odd. But Visual Studio 2010 is a 32 bit application, so although it is installed on a 64 bit OS, it still runs in 32 bit mode. This is why you need the 32 bit drivers. SharePoint 2010 though is 64 bit only, so it of course runs in 64 bit mode and therefore needs the 64 bit drivers.

    In order to avoid "ORA-12154" issue please try to use a string from your ora file instead of server name.
    For example my tnsnames.ora contains
    XE_ORION =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = Orion)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = XE)
        )
      )
    If I use (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=Orion)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE))) in Database field I can connect to Oracle Database.


    Dmitry

    Lightning Tools LogoLightning Tools Check out our SharePoint tools and web parts | Lightning Tools Blog

  • 2012年4月16日 11:29
     
     回答済み
    Although, luckily, you did get answers, this is totally the wrong forum the post this question. This is not SharePoint related at all. I guess you should ask it in the Oracle forums instead.

    Kind regards,
    Margriet Bruggeman

    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com