locked
Provider=OraOLEDB.Oracle not working on 64bit / IIS7 / Oracle 10.2 client RRS feed

  • Question

  • We have a new 64 bit (Windows 2008) server with IIS7, and have installed Oracle 10g Client v.10.2  for 64 bit OS.   We have confirmed that the Oracle client is working properly (connected with SQL*Plus, ran some SELECT queries, all is good).  The Oracle Client was installed with the following Oracle Windows Interface components: Oracle ODBC Driver, Oracle Provider for OLE DB, Oracle Data Provider for .NET.

    So, I created some test pages.  First, I tried a page that used the asp:SqlDataSource control using the connection provider and string that I am used to using on our old server:

       <asp:SqlDataSource
              id="SqlDataSource1"
              runat="server"
              DataSourceMode="DataReader"
              providername="OraOLEDB.Oracle"
              ConnectionString="User Id=me;Password=pw;Data Source=db;"
              SelectCommand="SELECT * FROM myTable">
        </asp:SqlDataSource>

    No dice: the page clocks for more than a minute and then IE bombs out and says "cannot be displayed".   However, if I change the Provider to this:

       <asp:SqlDataSource
              id="SqlDataSource1"
              runat="server"
              DataSourceMode="DataReader"
              providername="Oracle.DataAccess.Client"
              ConnectionString="User Id=me;Password=pw;Data Source=db;"
              SelectCommand="SELECT * FROM myTable">
        </asp:SqlDataSource>

    It works.  (I have a datagrid bound to the source, and it displays nicely).

    Fine, except that most of the web app that I'm trying to convert over creates connections in the code using New OleDbConnection(). 

    So I create a new test page.  First, I try the old familiar connection string that is working fine on the old server (just in case):

    MyConnection = New OleDbConnection("Provider=OraOLEDB.Oracle;Data Source=db;User Id=me;Password=pw;")

    And predictably, it clocks forever and shows nothing.  However, when I change it to the connection provider that worked with the control, above:

    MyConnection = New OleDbConnection("Provider=Oracle.DataAccess.Client;Data Source=db;User Id=me;Password=pw;")

    It produces this error message:

    The 'Oracle.DataAccess.Client' provider is not registered on the local machine.

    So now I am really confused.


    IDEAL SITUATION:  I would like to be able to use my original connection string (with Provider=OraOLEDB.Oracle) and get it to work with the OleDbConnection object.

    BACKUP OPTION: If you tell me that's impossible, I would AT LEAST like to be able to get the OleDbConnection objet to work with some other provider. Right now, it's not working with anything.


    Any thoughts?
    Friday, August 7, 2009 3:48 AM

Answers

  • Hi Greg

    My two cents when it comes to the Oracle.DataAccess.Client provider.

    The error "The 'Oracle.DataAccess.Client' provider is not registered on the local machine." indicates that you
    are running on a 64 bit machine (which you do) however, there is no 64 bit version of this dll found.

    When you are running the old application it may be running as 32 bit process and therefore finds the 32 bit provider.
    When you are creating a new application it may default to run as a 64 bit process and it can't find a 64 bit provider and errors out.

    So make sure that you use the 64 bit provider. Or that the app runs as a 32 bit process in order to find the existing dll's

    HTH
    //Michael


    This posting is provided "AS IS" with no warranties.
    Friday, August 7, 2009 7:22 AM
  • Are you certain that you have the 64-bit drivers/providers installed?

    http://www.oracle.com/technology/software/tech/windows/odpnet/64-bit/index.html


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Friday, August 7, 2009 2:46 PM

All replies

  • Hi Greg

    My two cents when it comes to the Oracle.DataAccess.Client provider.

    The error "The 'Oracle.DataAccess.Client' provider is not registered on the local machine." indicates that you
    are running on a 64 bit machine (which you do) however, there is no 64 bit version of this dll found.

    When you are running the old application it may be running as 32 bit process and therefore finds the 32 bit provider.
    When you are creating a new application it may default to run as a 64 bit process and it can't find a 64 bit provider and errors out.

    So make sure that you use the 64 bit provider. Or that the app runs as a 32 bit process in order to find the existing dll's

    HTH
    //Michael


    This posting is provided "AS IS" with no warranties.
    Friday, August 7, 2009 7:22 AM
  • Are you certain that you have the 64-bit drivers/providers installed?

    http://www.oracle.com/technology/software/tech/windows/odpnet/64-bit/index.html


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Friday, August 7, 2009 2:46 PM
  • Hi I am having the same proble.

    Our servers are moving to 64 bit. I have all my applications in asp.net with oracle as the back end. I have been using msdaora as the provider. But it has no 64 bit version. The only option in fornt of me is to use oraoledb.oracle as the provider. I am able to query with simple select statement, functions and procedures. But I am unable to execute a package.I will not be able to run multiple statements and retrive the rows without running the package. Is there any solution to run the package using oraoledb.oracle provider ? I would really appreciate if you can give me a solution for my problem.

    Thanks in advance !!

    Thursday, May 12, 2011 1:51 PM
  • If one of the marked replies does not address your question then you should post a new one.

    I'm not aware of any particular limitations with repect to the Oracle libraries and executing packages, however; if for some reason you need to use the 32-bit drivers you can enable 32-bit applications in your IIS applications pools:

    http://help.webcontrolcenter.com/KB/a1114/how-to-enable-a-32-bit-application-pool-in-iis7-dedicatedvps.aspx

    Support for Oracle libraries and .NET can be found in the Oracle forums:

    http://forums.oracle.com/forums/category.jspa;jsessionid=8d92079330d63e1e2f8056d7475f8059982a6e1d9c10.e38QbNuQbx8Kbi0LbhaMaxuPaxn0?categoryID=44

     


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Friday, May 13, 2011 11:26 PM
  • What exactly do you mean by run the app as a 32 bit process?
    Tuesday, February 21, 2012 9:48 PM