none
OraOLEDB.Oracle.1 provider is not registered on the local machine

    Question

  • I have a working ASP.NET web application in production that I have ported over to a new staging server that I will use for development. Both servers are running identical versions of software, i.e., Windows Server 2003, .NET Framework 1.1, Oracle 9i OLEDB Driver. The production server works fine. When I attempt to run the same application on the Staging server, I get the error:

    The 'OraOLEDB.Oracle.1' provider is not registered on the local machine.

    Exception Details: System.Data.OleDb.OleException: No error information available: REGDB_E_CLASSNOTREG(0x80040154).

    Blogs I've read have suggested changing various registry settings, granting IUSR and other accounts access to the Oracle\Ora92 folder etc. and I'm still getting this error.

    Please help.

    Wednesday, August 23, 2006 8:43 PM

Answers

  • Sarah, Paul,

    Thanks for your help. I believe I have FINALLY found the solution to this problem as follows:

    For those just joining us, this procedure applies to receiving the error:

    "The OraOLEDB.Oracle.1 provider is not registered on the local machine"

    when attempting to connect to an Oracle 9i database from an ASP.NET application using the Microsoft .NET Framework version 1.1 running on a Windows 2003 Server.

    I found that all of these steps were necessary in their entirety and in this order:

    1) Uninstall (or De-Install as Oracle phrases it) the Oracle Client from the Server ( I had installed the Oracle 9i Client using the Universal Installer with the Administrator Installation type (507MB) option (as opposed to the Runtime or Custom Installation Types)

    2) Delete the files and folders from the Oracle Home path (C:\Oracle in my case)

    3) Remove the following values from the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI key:

    a) OracleOciLib

    b) OracleSqlLib

    c) OracleXaLib

    As it turns out, none of these are needed for my ASP.NET application to connect to the Oracle database. While the values are present, there is no value data associated with them. This is in contrast to articles I'd read indicating a changes was necessary from OracleSqlLib = orasql9.dll from sqllib80.dll and OracleXaLib = oraclient9.dll from xa80.dll. Your mileage may vary depending on your application, but I didn't need them.

    4) Re-Boot the Windows Server

    5) Download the Oracle Objects for OLE from the following website:

    http://www.oracle.com/technology/software/tech/windows/ole/index.html

    (This obviously could be done earlier in the process)

    The download filename is ODAC92070.exe and it is 80.3MB

    OO4O for Oracle 9i Release 2 Version 9.2.0.7.0 for Windows 2000/XP/2003

    6) Inflate ODAC92070.exe( by double clicking it)

    7) Drill down to the following:

    Disk1\Install\win32\ to arrive at Setup.exe

    8) Run the Setup executable, making the following selections:

    Welcome (accept defaults) ...Next

    File Locations (accept defaults)...Next

    Select a product to Install: Oracle Provider for OLEDB 9.2.0.7.0

    Component Location (accept defaults)... Next

    Summary...Install

    If other versions of Oracle are found by the Installer, they will be "deinstalled" at this time. This did not occur for me as I "Deinstalled" everything earlier in this procedure.

    Following the successful install, you will be brought to the:

    Oracle Net Configuration Assistant where I performed the following:

    a) Check to select the "Perform Typical Configuration" and press Next...

    b) Select the option "No, I will create Net Service names myself...Next

    c) Select Oracle 8i or later (as appropriate for your Oracle database version)

    d) Enter the Service name of the database to which you are connecting...Next

    e) Select the protocol you are using (TCP for example)...Next

    f) Enter the Host name and Port number (e.g. the default port 1521)...Next

    g) Perform a Test (Yes). The test will most likely fail as the Configuration Assistant uses default values for UserName and Password

    h) Select Change Login, enter an appropriate Username and Password...Test Successful...Next

    i) Enter a service name for this configuration

    j) Choose Yes or No to configure another Net Service... Next...

    k) Net Service Configuration Complete!...Next

    l) Oracle Net Configuration complete...Finish...Exit

    Among other things, The Net configuration Assistant builds the tnsnames.ora file in C:\Oracle\ora92\Network\Admin

    As far as the ACL permissions, I granted 'Everyone' Read and Execute permission on the Oracle share. All other users had inherited permissions from the root (Administrators, SYSTEM, Users etc.) and were added or had their permissions modified by me. In fact, "Everyone" was granted its permission as a function of creating the share itself.

    9) Reboot the server. Following all of this, my application was able to implement the Oracle OLE DB driver.

    After spending an inordinate amount of time (on and off for a day and a half) it is my belief that ALL of these steps were necessary in their entirety and in the order specified. No other combinations of installs, "deinstalls" and permissions granting, clicking, unchecking etc., worked for me.

     

     

     

     

     

     

     

    Thursday, August 24, 2006 8:47 PM
  • You would probably be better off posting this on Oracle's forums, since that is their OLE DB provider, and they should know exactly which folders you need to grant permissions on.

    However, aside from that, I would suggest running the RegMon (and possibly FileMon) tool(s) from http://www.sysinternals.com. If this is just a permissions problem, it should show up in the output as an access denied on an Oracle registry key.

    Another suggestion is to verify that you can access the provider in a simple application outside of ASP.NET. For example, a simple console test app that just connects and does nothing else. If that works, that's even more evidence that it's just a problem with the different permissions that are used under ASP.NET. If even the simple app doesn't work (I would try it when logged in as Administrator, just to eliminate any issues), then it's more likely to be a more basic configuration problem with the provider. In that case I would again suggest contacting Oracle for help in getting the provider installed successfully.

    Thanks,
    Sarah

     

    Thursday, August 24, 2006 12:28 AM

All replies

  • You would probably be better off posting this on Oracle's forums, since that is their OLE DB provider, and they should know exactly which folders you need to grant permissions on.

    However, aside from that, I would suggest running the RegMon (and possibly FileMon) tool(s) from http://www.sysinternals.com. If this is just a permissions problem, it should show up in the output as an access denied on an Oracle registry key.

    Another suggestion is to verify that you can access the provider in a simple application outside of ASP.NET. For example, a simple console test app that just connects and does nothing else. If that works, that's even more evidence that it's just a problem with the different permissions that are used under ASP.NET. If even the simple app doesn't work (I would try it when logged in as Administrator, just to eliminate any issues), then it's more likely to be a more basic configuration problem with the provider. In that case I would again suggest contacting Oracle for help in getting the provider installed successfully.

    Thanks,
    Sarah

     

    Thursday, August 24, 2006 12:28 AM
  • From Oracle's MetaLink:


    Problem Description
    -------------------


    When running an application using the Oracle9i Release 2 (9.2.0.1.0) install
    of client software and that attempts to connect to an Oracle database with the
    Authenticated User privilege (such as when you use Microsoft's Internet
    Information Server (IIS)) through any of the following programmatic interfaces


        1. Oracle Provider for OLE DB
        2. Microsoft OLE DB Provider for Oracle
        3. Oracle ODBC Driver
        4. Microsoft ODBC for Oracle
        5. Oracle Objects for OLE (OO4O)
        6. Microsoft .NET Framework Data Provider for Oracle


    you may receive one of the following errors:


       (1) Oracle Provider for OLE DB


           (a) Error Type:  Microsoft OLE DB Service Components (0x80070005)


               Access is denied.


           (b) OraOLEDB.Oracle Provider is not registered on the local machine


       (2) Microsoft OLE DB Provider for Oracle


           (a) Error Type:  Microsoft OLE DB Provider for Oracle (0x80004005)


               Oracle client and networking components were not found. These
               components are supplied by Oracle Corporation and are part of the
               Oracle Version 7.3.3 or later client software installation. Provider
               is unable to function until these components are installed.


           (b) Error Type:  Microsoft OLE DB Provider for Oracle (0x80004005)


               Oracle error occurred, but error message could not be retrieved
               from Oracle.


       (3) Oracle ODBC Driver


           (a) Error Type:  Microsoft OLE DB Provider for ODBC Drivers (0x80004005)


               Specified driver could not be loaded due to system error 5 (Oracle
               in OraHome92).


       (4) Microsoft ODBC for Oracle


           (a) The Oracle(tm) client and networking components were not found.
               These components are supplied by Oracle Corporation and are part
               of the Oracle Version 7.3 (or greater) client software installation.


               You will be unable to use this driver until these components have
               been installed.


           (b) Error number: -2147467259


               Error Description: [Microsoft][ODBC Driver Manager] Driver's
               SQLAllocHandle on SQL_HANDLE_ENV failed


       (5) Oracle Objects for OLE


           (a) while using a GLOBAL.ASA file


               Error Type:  Active Server Pages (0x0)


               An error occurred while creating object 'OraSession'.


           (b) not using a GLOBAL.ASA file


               Error Type:  Microsoft VBScript runtime (0x800A0046)


               Permission denied: 'CreateObject'


       (6) Microsoft .NET Framework Data Provider for Oracle


           (a) System.DllNotFoundException: Unable to load DLL (oci.dll).
               at System.Data.OracleClient.DBObjectPool.GetObject(Boolean&
                 isInTransaction)
               at System.Data.OracleClient.OracleConnectionPoolManager.
                 GetPooledConnection(String encryptedConnectionString,
                 OracleConnectionString options, Boolean& isInTransaction)
               at System.Data.OracleClient.OracleConnection.OpenInternal
                 (OracleConnectionString parsedConnectionString, Object transact)
               at System.Data.OracleClient.OracleConnection.Open()
               at WCWSItemAvailability.ETAAvailability.SingleAvailability(String  
                 ItemNumber, String BusinessUnit, Int32 OrderQty, Int32&
                 AvailableQty, Int32& OnHandQty, String& ETADate, Int32& Error)
               at WCWSItemAvailability.ETAAvailability.XMLAvailability(String
                 XMLInput)


       (7) Other miscellaneous errors


           (a) The Specified Module Could Not Be Found


           (b) ORA-00604: error occurred at recursive SQL level 1  
               ORA-12705: invalid or unknown NLS parameter value specified


           (c) Unable to load DLL (OraOps9.dll):
               ...
               [DllNotFoundException: Unable to load DLL (OraOps9.dll).]


           (d) System Error 998 trying to run ASP page


    Solution Description
    --------------------


      Oracle 9.2 Client software requires that you give the Authenticated User
      privilege to the Oracle Home by following these steps:


       1.  Log on to Windows as a user with Administrator privileges.


       2.  Launch Windows Explorer from the Start Menu and and navigate to the
           ORACLE_HOME folder.  This is typically the "Ora92" folder under the
           "Oracle" folder (i.e. D:\Oracle\Ora92).


       3.  Right-click on the ORACLE_HOME folder and choose the "Properties" option
           from the drop down list.  A "Properties" window should appear.


       4.  Click on the "Security" tab of the "Properties" window.


       5.  Click on "Authenticated Users" item in the "Name" list (on Windows XP
           the "Name" list is called "Group or user names").


       6.  Uncheck the "Read and Execute" box in the "Permissions" list under the
           "Allow" column (on Windows XP the "Permissions" list is called
           "Permissions for Authenticated Users").


       7.  Re-check the "Read and Execute" box under the "Allow" column (this is
           the box you just unchecked).


       8.  Click the "Advanced" button and in the "Permission Entries" list make
           sure you see the "Authenticated Users" listed there with:


               Permission = Read & Execute
                 Apply To = This folder, subfolders and files


           If this is NOT the case, edit that line and make sure the "Apply onto"
           drop-down box is set to "This folder, subfolders and files".  This
           should already be set properly but it is important that you verify this.


       9.  Click the "Ok" button until you close out all of the security properties
           windows.  The cursor may present the hour glass for a few seconds as it
           applies the permissions you just changed to all subfolders and files.


      10.  Reboot your computer to assure that these changes have taken effect.


    Re-execute the application and it should now work.


    Explanation
    -----------


    If you install Oracle9i Release 2 (9.2.0.1.0) on a computer running Windows
    with an NTFS partition, the contents of ORACLE_HOME directory will not be
    visible to users who are authenticated on that machine.  These permissions
    were not set properly when the software was installed.


    Applications that were working fine with previous versions of Oracle software
    will stop working when they upgrade to Oracle 9.2.


      NOTE: The application will continue to work if the user has logged onto the
            machine as an Administrator.


    Any application that is using the Authenticated User privilege will not work.
    A notable example would be IIS which might service some of the requests based
    on the Authenticated User privileges.


    To demonstrate the problem in further detail, you can log on to the operating  
    system as an authenticated machine user.  You won't be able browse the contents
    of the ORACLE_HOME directory demonstrating your inability to load any Oracle DLLs
    or make a connection.


    Additional Information
    ----------------------


    The above error messages may not only be encountered when using Oracle 9.2
    client software but may also exists when running into general permissions
    issues using third party products on a Windows platform.


     

    Thursday, August 24, 2006 12:50 PM
  • Sarah, Paul,

    Thanks for your help. I believe I have FINALLY found the solution to this problem as follows:

    For those just joining us, this procedure applies to receiving the error:

    "The OraOLEDB.Oracle.1 provider is not registered on the local machine"

    when attempting to connect to an Oracle 9i database from an ASP.NET application using the Microsoft .NET Framework version 1.1 running on a Windows 2003 Server.

    I found that all of these steps were necessary in their entirety and in this order:

    1) Uninstall (or De-Install as Oracle phrases it) the Oracle Client from the Server ( I had installed the Oracle 9i Client using the Universal Installer with the Administrator Installation type (507MB) option (as opposed to the Runtime or Custom Installation Types)

    2) Delete the files and folders from the Oracle Home path (C:\Oracle in my case)

    3) Remove the following values from the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI key:

    a) OracleOciLib

    b) OracleSqlLib

    c) OracleXaLib

    As it turns out, none of these are needed for my ASP.NET application to connect to the Oracle database. While the values are present, there is no value data associated with them. This is in contrast to articles I'd read indicating a changes was necessary from OracleSqlLib = orasql9.dll from sqllib80.dll and OracleXaLib = oraclient9.dll from xa80.dll. Your mileage may vary depending on your application, but I didn't need them.

    4) Re-Boot the Windows Server

    5) Download the Oracle Objects for OLE from the following website:

    http://www.oracle.com/technology/software/tech/windows/ole/index.html

    (This obviously could be done earlier in the process)

    The download filename is ODAC92070.exe and it is 80.3MB

    OO4O for Oracle 9i Release 2 Version 9.2.0.7.0 for Windows 2000/XP/2003

    6) Inflate ODAC92070.exe( by double clicking it)

    7) Drill down to the following:

    Disk1\Install\win32\ to arrive at Setup.exe

    8) Run the Setup executable, making the following selections:

    Welcome (accept defaults) ...Next

    File Locations (accept defaults)...Next

    Select a product to Install: Oracle Provider for OLEDB 9.2.0.7.0

    Component Location (accept defaults)... Next

    Summary...Install

    If other versions of Oracle are found by the Installer, they will be "deinstalled" at this time. This did not occur for me as I "Deinstalled" everything earlier in this procedure.

    Following the successful install, you will be brought to the:

    Oracle Net Configuration Assistant where I performed the following:

    a) Check to select the "Perform Typical Configuration" and press Next...

    b) Select the option "No, I will create Net Service names myself...Next

    c) Select Oracle 8i or later (as appropriate for your Oracle database version)

    d) Enter the Service name of the database to which you are connecting...Next

    e) Select the protocol you are using (TCP for example)...Next

    f) Enter the Host name and Port number (e.g. the default port 1521)...Next

    g) Perform a Test (Yes). The test will most likely fail as the Configuration Assistant uses default values for UserName and Password

    h) Select Change Login, enter an appropriate Username and Password...Test Successful...Next

    i) Enter a service name for this configuration

    j) Choose Yes or No to configure another Net Service... Next...

    k) Net Service Configuration Complete!...Next

    l) Oracle Net Configuration complete...Finish...Exit

    Among other things, The Net configuration Assistant builds the tnsnames.ora file in C:\Oracle\ora92\Network\Admin

    As far as the ACL permissions, I granted 'Everyone' Read and Execute permission on the Oracle share. All other users had inherited permissions from the root (Administrators, SYSTEM, Users etc.) and were added or had their permissions modified by me. In fact, "Everyone" was granted its permission as a function of creating the share itself.

    9) Reboot the server. Following all of this, my application was able to implement the Oracle OLE DB driver.

    After spending an inordinate amount of time (on and off for a day and a half) it is my belief that ALL of these steps were necessary in their entirety and in the order specified. No other combinations of installs, "deinstalls" and permissions granting, clicking, unchecking etc., worked for me.

     

     

     

     

     

     

     

    Thursday, August 24, 2006 8:47 PM