Troubleshooting “Cannot create an instance of OLE DB provider”

Today I am going to blog about a frequent issue that we come across while creating linked server-:

Cannot create an instance of OLE DB provider "MSDADASQL" for linked server "MyDB2"

In this scenario I was creating a linked server to a DB2 server, but everything explained in this blog holds good for any linked server.

This error mostly happens due to security issues with DCOM class MSDAINITIALIZE . We needed to alter the DCOM Class MSDAINITIALIZE security settings to make it work.

Following are the steps:

1. Open Component Services (Start>Run>DCOMCNFG)

2. Expand Component Services>Computers>My Computer>DCOM Config

3. From the list of DCOM components on the right side, select MSDAINITIALIZE and go to its properties:


4. Go to the Security Tab, Choose ‘Customize’ and click on the ‘Edit’ Button:

5. Add the Domain User who is accessing the linked server and ‘Allow’ all the permissions available (Local Launch, Remote Launch, Local Activation, Remote Activation). If you are connecting to SQL server using SQL account, you need to provide this permission to the account under which the SQL service is running.

6. Do this for all the 3 sections in the above screenshot.

In Windows Vista onwards, a system account called TrustedInstaller owns the MSDAINITIALIZE class and does not allow normal domain accounts to edit the properties of this class. MSDAINITIALIZE is greyed out because only TrustedInstaller has the write permissions on it.

To edit the Security settings, we followed the below steps:

1. Start > Run > Regedit

2. Find the Key: HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{2206CDB0-19C1-11D1-89E0-00C04FD7A829}

3. Right Click>Permissions>Advanced>Owner Tab:


4. Change the owner to Administrators.

5. Now, grant ‘Full Control’ to Administrators:

After this you should be able to edit MSDAINITIALIZE security settings .

Hope this post would be helpful for you. Happy Coding!!

Author : Snehadeep(MSFT), SQL Developer Engineer, Microsoft

Reviewed by : Debarchan(MSFT), SQL Developer Engineer, Microsoft

Comments (9)
  1. MKM says:

    Thanks. able to setup linked server as out of process with giving access to MSDAINITIALIZE

  2. Vladimir says:

    Thanks a lot!!!

  3. Bud says:

    The Security tab controls are greyed out on Windows 2012 Server. I guess a system policy should be changed to allow editing on the tab.

  4. Hey Bud,

    You are correct. Please check how to enable that from point no. 6 onwards in the blog above.


  5. Bill F says:

    Good article! Kind of an obscure permission!

    System Event log on the sql server has something like this btw:

    The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID


    and APPID


    to the user DOMAINuser SID (S-1-5-21-…) from address LocalHost (Using LRPC). This security permission can be modified using the Component Services administrative tool.

  6. Nirad Chaudhary says:

    Hi Guys,  do I set these permissions on my SQL server or on my linked server?

  7. Prem says:

    I had done the above steps but things didnt work. for me the linked server -> oracle is working fine for users who has local admin privileges, But it doesnt work only for people who doesnt has local admin privileges. so i followed the above steps and added and provided privileges for the login id for the users who are facing the issue. but the issue persist still.  I tried to enable allow in process too but nothing worked. I have sql 2008r2 connecting oracle oracle.oledb provider.

  8. Ennio says:


    Thank for your post …

    It helped me to fix this same issue with Windows Server 2008 R2 and SQL Server 2014.


  9. Gera says:

    please help..i am trying to do these steps but i can't continue..the MSDAINTIALIZE properties' security tab options are disabled, i can't edit an options. what do i do? tia everyone.

Comments are closed.

Skip to main content