none
oracle adapter not connecting RRS feed

  • Question

  • i go to the consume adapter service and pick the oracledbbinding...

    in the configure section i use client credential type username..and put in appropriate user/password

    in the uri properties i use adapter...

    i have the oracle client installed and in the tnsnames file..i have the following

    ADAPTER = 
    (DESCRIPTION = (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = yourOracleServer)(PORT = 1521)) )
    (CONNECT_DATA = (SERVICE_NAME = yourOracleDatabaseServiceName) ) )


    now when i try to connect i get


    could not load file or assembly 'oracle.dataaccess' version 2.102.2.20....

    what am i missing...is there something else i should be putting in????



    Connecting to the LOB system has failed.

    Could not load file or assembly 'Oracle.DataAccess, Version=2.102.2.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified


    JAT
    Tuesday, March 3, 2009 6:42 PM

Answers

  • Hi
    Now you have installed ODP.NET correctly, however, the issue you're seeing could be due to the following reasons:

    1. You did not speficy a valid host name (should be present in your tns names.ora). Valid values in your file are VIS, ADAPTER, and so on
    2. The tnsnames.ora is not present at the correct location. If you installed new version of ODP.NET verify that it is correctly copied into the \Network\Admin folder in the new oracle client home. This should solve your problem.

    I hope this helps.

    Manas.
    Friday, March 6, 2009 10:16 AM

All replies

  • This error means that the adapter could not locate the correct version of ODP.NET client on your machine. You should ensure that the correct version of ODP.NET client is installed on your machine.

    I hope this helps.

    Manas.
    Tuesday, March 3, 2009 8:53 PM
  • i found this in my machine.config file the last tag matches up to my token...not sure what this means...how do i know which version of odac???    

       <DbProviderFactories>
              <add name="Odbc Data Provider" invariant="System.Data.Odbc" description=".Net Framework Data Provider for Odbc"
                  type="System.Data.Odbc.OdbcFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
              <add name="OleDb Data Provider" invariant="System.Data.OleDb"
                  description=".Net Framework Data Provider for OleDb" type="System.Data.OleDb.OleDbFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
              <add name="OracleClient Data Provider" invariant="System.Data.OracleClient"
                  description=".Net Framework Data Provider for Oracle" type="System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
              <add name="SqlClient Data Provider" invariant="System.Data.SqlClient"
                  description=".Net Framework Data Provider for SqlServer" type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
              <add name="SQL Server CE Data Provider" invariant="Microsoft.SqlServerCe.Client"
                  description=".NET Framework Data Provider for Microsoft SQL Server 2005 Mobile Edition"
                  type="Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
              <add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client"
                  description="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=2.102.2.20, Culture=neutral, PublicKeyToken=89b483f429c47342" />
    JAT
    Wednesday, March 4, 2009 8:58 PM
  • Can you pls check the Oracle.DataAccess.dll that you have in your assembly? (start->run->type "assembly")

    You'll see an entry for Oracle.DataAccess and the details of version, public key token and culture also.


    This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm
    Thursday, March 5, 2009 5:48 AM
  • ok..i see oracle.dataaccess version 1.102.2.20..key 89b483f429c47342...i can see it does not match...how do i get the correct one???
    JAT
    Thursday, March 5, 2009 1:50 PM
  • i have now installed oracle data access 11.1.0.6.21...

    now when i try to consume the oracle adapter in visual studio...for the data source name i use ADAPTER...so  in configure uri i get
    oracledb://ADAPTER

    now when i try to connect i get ora12154..tns could not resolve the connect identifier specified...so in the oracle home created..in the product 11.1.0  netword  admin...i put in a tnsnames file as follows.


    i think i need to put the tnsnames file ...  am i doing this correctly?

    ###############################################################
    #
    # This file is automatically generated by AutoConfig.  It will be read and
    # overwritten.  If you were instructed to edit this file, or if you are not
    # able to use the settings created by AutoConfig, refer to Metalink document
    # 165195.1 for assistance.
    #
    #$Header: NetServiceHandler.java 115.41 2005/05/23 06:43:44 psaddi ship $
    #
    ###############################################################

    VIS=
            (DESCRIPTION=
                    (ADDRESS=(PROTOCOL=tcp)(HOST=PSBEH251.psu-erie.bd.psu.edu)(PORT=1521))
                (CONNECT_DATA=
                    (SERVICE_NAME=VIS)
                    (INSTANCE_NAME=VIS)
                )
            )



    ORCL =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = psbeh274.psu-erie.bd.psu.edu)(PORT = 1521))
        (CONNECT_DATA =
          (UR=A)
          (SERVICE_NAME = orcl)
        )
      )


    VIS_806_BALANCE=
            (DESCRIPTION=
                    (ADDRESS=(PROTOCOL=tcp)(HOST=PSBEH251.psu-erie.bd.psu.edu)(PORT=1521))
                (CONNECT_DATA=
                    (SERVICE_NAME=VIS)
                    (INSTANCE_NAME=VIS)
                )
            )

    VIS_FO=
            (DESCRIPTION=
                    (ADDRESS=(PROTOCOL=tcp)(HOST=PSBEH251.psu-erie.bd.psu.edu)(PORT=1521))
                (CONNECT_DATA=
                    (SERVICE_NAME=VIS)
                    (INSTANCE_NAME=VIS)
                )
            )

    VIS_LOCAL=
            (DESCRIPTION=
                    (ADDRESS=(PROTOCOL=tcp)(HOST=PSBEH251.psu-erie.bd.psu.edu)(PORT=1521))
            )

    VIS_BALANCE=
            (DESCRIPTION=
                (LOAD_BALANCE=YES)
                (FAILOVER=YES)
                (ADDRESS_LIST=
                    (ADDRESS=(PROTOCOL=tcp)(HOST=PSBEH251.psu-erie.bd.psu.edu)(PORT=1521))
                )
                (CONNECT_DATA=
                    (SERVICE_NAME=VIS)
                )
            )

    VIS_REMOTE=
            (DESCRIPTION=
                (ADDRESS_LIST=
                    (ADDRESS=(PROTOCOL=tcp)(HOST=PSBEH251.psu-erie.bd.psu.edu)(PORT=1521))
                )
            )

    extproc_connection_data =
        (DESCRIPTION=
             (ADDRESS_LIST =
                 (ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROCVIS))
            )
            (CONNECT_DATA=
                (SID=PLSExtProc)
                (PRESENTATION = RO)
            ) )



    ADAPTER =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = PSBEH251.psu-erie.bd.psu.edu)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = VIS)
        )
      )


    IFILE=C:\oracle\visdb\9.2.0\network\admin\VIS_psbeh251\VIS_psbeh251_ifile.ora


    JAT
    Thursday, March 5, 2009 3:09 PM
  • Yes, to fix the ora12154 error, you'll have to create the TNSNames.ora file in the folder you've mentioned.

    Pls let us know if you hit any further issues.

    Regards,
    Murali    
    This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm
    Friday, March 6, 2009 10:15 AM
  • Hi
    Now you have installed ODP.NET correctly, however, the issue you're seeing could be due to the following reasons:

    1. You did not speficy a valid host name (should be present in your tns names.ora). Valid values in your file are VIS, ADAPTER, and so on
    2. The tnsnames.ora is not present at the correct location. If you installed new version of ODP.NET verify that it is correctly copied into the \Network\Admin folder in the new oracle client home. This should solve your problem.

    I hope this helps.

    Manas.
    Friday, March 6, 2009 10:16 AM