Ошибка 7302 sql server

  • Remove From My Forums
  • Question

  • I just installed SQL Server 2012 to test differences and make sure it is ok for my Work. I may not be a pro at SQL, but I don’t see how to add a Link
    to Jet database on my server. I have imported Jet Databases, but when going thru the GUI to Link a JET Database I see no Provider for JET. I am running Access 2003 (I don’t like the 2008+ GUI)

    I can Improt Access 2003 data, but somehow linking to SQL 2012 to Access 2003 I can’t figure out. I know how to do this in previous versions of SQL,
    but it bewilders me in 2012.  I searched an found nothing simular to my issue; at least nothing I understood. Nothing mentioned how to add Jet db Provider.

    I ran a connection string to the Jet Database thru QA:

    sp_addlinkedserver
    ‘USGEScrub’,‘Access’,‘Microsoft.Jet.OLEDB.4.0’,‘D:\Lead$\SupList\USGEScrub.mdb’

    TITLE: Microsoft SQL Server Management Studio
    Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)
    For help, click:
    http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&LinkId=20476
    ADDITIONAL INFORMATION:
    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
    Cannot create an instance of OLE DB provider «Microsoft.Jet.OLEDB.4.0» for linked server «USGEScrub». (Microsoft SQL Server, Error: 7302)

    For help, click:
    http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.2100&EvtSrc=MSSQLServer&EvtID=7302&LinkId=20476

    • Moved by

      Thursday, June 28, 2012 7:24 AM
      (From:Getting started with SQL Server)

Answers

  • Hi Crazyd,

    The error indicates that SQL Server is not able to initialize the OLEDB provider that is specified in the definition of the linked server. The messsage may occur if any of the following conditions is true for the system that is running SQL Server where the
    linked server is defined:

    •The OLEDB provider is not yet installed.
    •The installed OLEDB provider’s bitness does not match the bitness of SQL Server. For example, you may have installed 32 bit version of the provider but SQL Server is running in 64 bit mode.
    •The OLEDB provider is not registered.

    For more information, please refer to this KB article:
    http://support.microsoft.com/kb/2555855.
     sp_addlinkedserver (Transact-SQL):
    http://msdn.microsoft.com/en-us/library/ms190479.aspx.

    In addition, your issue is related to SQL Server Data Access. In this forum, you would receive better and quicker support.

    TechNet Subscriber Support
    If you are
    TechNet Subscription user and have any feedback on our support quality, please send your feedback
    here.

    Thanks,
    Maggie


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.

    • Marked as answer by
      Iric Wen
      Monday, July 9, 2012 1:36 AM

When you execute TSQL queries that use linked servers definitions or adhoc queries that access remote data sources (via OPENROWSET or OPENDATASOURCE functions), you may encounter error messages similar to the following:

Error message 1:

The OLE DB provider «provider name» has not been registered. (Microsoft SQL Server, Error: 7403)


Error message 2:

Cannot create an instance of OLE DB provider «provider name» for linked server «linked server name». (Microsoft SQL Server, Error: 7302)

Note: You may also encounter these messages after you migrate your SQL Server from one server to another or when you restore the master database from one server on another server.

Symptoms

These errors indicate that SQL Server is not able to initialize the OLEDB provider that is specified in the definition of the linked server. These messsages may occur if any of the following conditions is true for the system that is running SQL Server where the linked server is defined:

  • The OLEDB provider is not yet installed.

  • The installed OLEDB provider’s bitness does not match the bitness of SQL Server. For example, you may have installed 32 bit version of the provider but SQL Server is running in 64 bit mode.

  • The OLEDB provider is not registered.

Note: When you create linked server using sp_addlinkedserver, SQL Server does not report any error messages even when one or more of the above conditions is true.

Cause

Review the list of linked servers defined on the SQL Server and find out the OLEDB provider associated with it. Then install the OLEDB provider using the software from the corresponding vendor. Ensure that you are also installing the provider that corresponds to the platform [x86 or x64] of SQL Server.

To get a list of installed OLEDB providers, use the SQL Server Management Studio and navigate to the «Server Objects» node and expand the «Linked Server» node. You could also use the catalog view sys.servers to find the list of all defined linked servers and their associated OLEDB providers.

Resolution

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Problem

This document describes a resolution to an «Error 7302 Could not create an instance of OLE DB provider IBMDASQL» being received when attempting to create a linked server in SQL Server.

Resolving The Problem

This document describes a resolution to an «Error 7302 Could not create an instance of OLE DB provider IBMDASQL» being received when attempting to create a linked server in SQL Server.

Resolution

When using Microsoft SQL Server and distributed queries with the IBM OLE DB Providers supplied with iSeries Access for Windows, the Allow InProcess option must be enabled. This option is required because SQL Server passes the proper authentication across the remote procedure call only when the OLE DB Provider is configured for Allow InProcess (Microsoft Corporation 2007).

Allow InProcess

SQL Server allows the OLE DB provider to be instantiated as an in-process server. The default behavior is to instantiate the OLE DB provider outside the SQL Server process. Instantiating the provider outside the SQL Server process protects the SQL Server process from errors in the OLE DB provider. SQL Server requires an in-process server for handling specific types of data including long columns, text, and image data. The OLE DB Provider for DB2 does not currently support the DB2 Large Object (LOB) types.

This option may be enabled or disabled for the OLE DB Provider for DB2; however, this option is normally unnecessary when using SQL Server 2000.» (Microsoft Corporation 2007)

Setting the Allow InProcess Provider Option

SQL Server 2000

When creating a new linked server (under Microsoft SQL Servers -> SQL Server Group -> [SQL Server Database] -> Security -> Linked Servers -> Right-click on Linked Servers, and select New Linked Server), select the Provider Options button below the OLE DB provider name. Check the Allow InProcess option to enable the property.

SQL Server 2005

The Allow InProcess option must be set on the specific provider before the linked server is created. You can add the linked server provider option under [SQL Server Database] -> Server Objects -> Linked Servers -> Providers -> Right-click on a provider, and select Properties. Finally, check the Allow InProcess option to enable the property.

References

«Distributed Query Support Using the OLE DB Provider for DB2.» 2007. Microsoft Corporation. 24 April 2007.

//msdn2.microsoft.com/en-us/library/ms943674.aspx>

[{«Type»:»MASTER»,»Line of Business»:{«code»:»LOB57″,»label»:»Power»},»Business Unit»:{«code»:»BU058″,»label»:»IBM Infrastructure w\/TPS»},»Product»:{«code»:»SWG60″,»label»:»IBM i»},»Platform»:[{«code»:»PF012″,»label»:»IBM i»}],»Version»:»6.1.0″}]

Historical Number

448254665

I am trying to run openrowset from MS SQL Server on an Oracle server.

When i execute the following command:

select * from
OPENROWSET('OraOLEDB.Oracle','srv';'user';'pass', 
'select * from table')

the following error occurs

Msg 7302, Level 16, State 1, Line 1
Cannot create an instance of OLE DB provider "OraOLEDB.Oracle" for linked server "(null)".

Can anyone tell me how I can use openrowset with OraOLEDB.Oracle?

I am using 64 bit version of MS SQL Server and Oracle OLEDB driver.

Edit

I have tried this on two machines running Windows 7 x64 & Windows Server 2008 x64 with MS SQL Server 2008 x64. Both showed the same error message.

patrickmdnet's user avatar

patrickmdnet

3,3321 gold badge29 silver badges34 bronze badges

asked Jan 24, 2013 at 11:14

th1rdey3's user avatar

1

In SQL Server Enterprise Manager, open \Server Objects\Linked Servers\Providers, right click on the OraOLEDB.Oracle provider, select properties and check the "Allow inprocess" option. Recreate your linked server and test again.

You can also execute the following query if you don’t have access to SQL Server Management Studio :

EXEC master.dbo.sp_MSset_oledb_prop N'OraOLEDB.Oracle', N'AllowInProcess', 1

Hybris95's user avatar

Hybris95

2,2862 gold badges16 silver badges33 bronze badges

answered Jan 24, 2013 at 12:28

David Brabant's user avatar

David BrabantDavid Brabant

41.7k16 gold badges83 silver badges112 bronze badges

7

Ran into this issue where the linked server would work for users who were local admins on the server, but not for anyone else. After many hours of messing around, I managed to fix the problem using the following steps:

  1. Run (CTRL + R) “dcomcnfg”. Navigate to “Component Services -> Computers -> My Computer -> DCOM Config”.
  2. Open the properties page of “MSDAINITIALIZE”.
  3. Copy the “Application ID” on the properties page.
  4. Close out of “dcomcnfg”.
  5. Run “regedit”. Navigate to “HKEY_CLASSES_ROOT\AppID{???}” with the ??? representing the application ID you copied in step #3.
  6. Right click the “{???}” folder and select “Permissions”
  7. Add the local administrators group to the permissions, grant them full control.
  8. Close out of “regedit”.
  9. Reboot the server.
  10. Run “dcomconfig”. Navigate to “Component Services -> Computers -> My Computer -> DCOM Config”.
  11. Open the properties page of “MSDAINITIALIZE”.
  12. On the “Security” tab, select “Customize” under “Launch and Activation Permissions”, then click the “Edit” button.
  13. Add “Authenticated Users” and grant them all 4 launch and activation permissions.
  14. Close out of “dcomcnfg”.
  15. Find the Oracle install root directory. “E:\Oracle” in my case.
  16. Edit the security properties of the Oracle root directory. Add “Authenticated Users” and grant them “Read & Execute”, “List folder contents” and “Read” permissions. Apply the new permissions.
  17. Click the “Advanced Permissions” button, then click “Change Permissions”. Select “Replace all child object permissions with inheritable permissions from this object”. Apply the new permissions.
  18. Find the “OraOLEDB.Oracle” provider in SQL Server. Make sure the “Allow Inprocess” parameter is checked.
  19. Reboot the server.

Ranger's user avatar

answered Jun 5, 2013 at 18:19

Matt Anderson's user avatar

3

When connecting to SQL Server with Windows Authentication (as opposed to a local SQL Server account), attempting to use a linked server may result in the error message:

Cannot create an instance of OLE DB provider "(OLEDB provider name)"...

The most direct answer to this problem is provided by Microsoft KB 2647989, because «Security settings for the MSDAINITIALIZE DCOM class are incorrect.»

The solution is to fix the security settings for MSDAINITIALIZE. In Windows Vista and later, the class is owned by TrustedInstaller, so the ownership of MSDAINITIALIZE must be changed before the security can be adjusted. The KB above has detailed instructions for doing so.

This MSDN blog post describes the reason:

MSDAINITIALIZE is a COM class that is provided by OLE DB. This class can parse OLE DB connection strings and load/initialize the provider based on property values in the connection string. MSDAINITILIAZE is initiated by users connected to SQL Server. If Windows Authentication is used to connect to SQL Server, then the provider is initialized under the logged in user account. If the logged in user is a SQL login, then provider is initialized under SQL Server service account. Based on the type of login used, permissions on MSDAINITIALIZE have to be provided accordingly.

The issue dates back at least to SQL Server 2000; KB 280106 from Microsoft describes the error (see «Message 3») and has the suggested fix of setting the In Process flag for the OLEDB provider.

While setting In Process can solve the immediate problem, it may not be what you want. According to Microsoft,

Instantiating the provider outside the SQL Server process protects the SQL Server process
from errors in the provider. When the provider is instantiated outside the SQL Server process,
updates or inserts referencing long columns (text, ntext, or image) are not allowed.
— Linked Server Properties doc for SQL Server 2008 R2.

The better answer is to go with the Microsoft guidance and adjust the MSDAINITIALIZE security.

Chris Simmons's user avatar

answered Nov 21, 2013 at 14:24

patrickmdnet's user avatar

patrickmdnetpatrickmdnet

3,3321 gold badge29 silver badges34 bronze badges

1

For error 7302 in particular, I discovered, in my registry, when looking for OraOLEDB.Oracle that the InprocServer32 location was wrong.

If that’s the case, or you can’t find that string in the registry, then you’ll have to install or re-register the component.

I had to delete the key from the GUID level, and then find the ProgID (OraOLEDB.Oracle) key, and delete that too. (The ProgID links to the CLSID as a pair).

Then I re-registered OraOLEDB.Oracle by calling regsvr32.exe on ORAOLEDB*.dll.

Just re-registering alone didn’t solve the problem, I had to delete the registry keys to make it point to the correct location. Alternatively, hack the InprocServer32 location.

Now I have error 7308, about single threaded apartments; rolling on!

answered Jan 14, 2016 at 12:27

GilesDMiddleton's user avatar

1

Received this same error on SQL Server 2017 trying to link to Oracle 12c. We were able to use Oracle’s SQL Developer to connect to the source database, but the linked server kept throwing the 7302 error.

In the end, we stopped all SQL Services, then re-installed the ODAC components. Started the SQL Services back up and voila!

answered Mar 29, 2019 at 17:36

Josh Jay's user avatar

Josh JayJosh Jay

1,2402 gold badges14 silver badges26 bronze badges

Just enable option «Allow in process» on the properties of the OraOLEDB.oracle provider as below

  • [open server objects > Linked Severs > providers] 1 [right click on
  • OraOLEDB.oracle > properties ] 2 then choose optaion «Allow in
  • process» and click ok

answered Feb 20, 2022 at 11:06

Mohamed Ouda's user avatar

Aside from other great responses, I just had to give NTFS permissions to the Oracle installation folder.
(I gave read access)

answered Mar 13, 2018 at 16:42

jaraics's user avatar

jaraicsjaraics

4,2593 gold badges30 silver badges35 bronze badges

1

Similar situation for following configuration:

  • Windows Server 2012 R2 Standard
  • MS SQL server 2008 (tested also SQL 2012)
  • Oracle 10g client (OracleDB v8.1.7)
  • MSDAORA provider
  • Error ID: 7302

My solution:

  • Install 32bit MS SQL Server (64bit MSDAORA doesn’t exist)
  • Install 32bit Oracle 10g 10.2.0.5 patch (set W7 compatibility on setup.exe)
  • Restart SQL services
  • Check Allow in process in MSDAORA provider
  • Test linked oracle server connection

answered Jul 24, 2018 at 7:22

gaffcz's user avatar

gaffczgaffcz

3,46914 gold badges68 silver badges108 bronze badges

  • Remove From My Forums
  • Question

  • Hello,

    After reboot all linked servers to Oracle stopped working and produce «Cannot create an instance of OLE DB provider «OraOLEDB.Oracle» for linked server (Microsoft SQL Server, Error: 7302)». Is there any trace files I can check or any trace can be generated?

    Thanks

Answers

    • Marked as answer by

      Tuesday, June 14, 2011 8:59 AM

  • Hello Stephanie,

    Thank you for the trace tip. Unfortunately :), everything went back to normal after we rebooted server again.

    Thanks again,

    Igor.

Понравилась статья? Поделить с друзьями:
  • Ошибка 73 h на фискальном регистраторе как убрать
  • Ошибка 7301 kyocera
  • Ошибка 7266 мерседес w204
  • Ошибка 730 ошибка настроек егаис меркурий 185ф
  • Ошибка 7296 мерседес атего