OPenrowset with Microsoft.ACE.OLEDB.16.0 only works with SA

Anonymous
2022-08-23T12:43:45.103+00:00

Hello -

I am using SQL SERVER 2019 with Excel office 365 64 bit and have configured the Microsoft.Ace.OLEDB.16.0 linked server correctly. I am able to use openrowset and import an excel file without any issues as long as I am logged in as the SA account.

NT Service/MSSQLSERVER is permissioned for the folder as well.

As soon as I login with a normal account with all rights granted - i get the following error Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.16.0" for linked server "(null)" and sometime i get an error saying bpipe is closing and the MSSQLSERVER service gets shut down.

BUt if i start an instance and login as SA then disconnect without shutting down and re-connect with a normal account it works.

Any ideas?

SQL Server | Other
0 comments No comments
{count} votes

5 answers

Sort by: Most helpful
  1. Erland Sommarskog 121.9K Reputation points MVP Volunteer Moderator
    2022-08-23T21:51:00.593+00:00

    That normal account, is that a Windows login? Does that login have access to the file?


  2. Anonymous
    2022-08-23T22:08:23.637+00:00

    What do you think that login needs permission to? So this is strange - I start ssms and login as sa - run the openrowset and it works. I leave ssms open and just click on disconnect. I then connect and log in with windows auth. It now works. If i shut down ssms and launch and log in as windows auth - it doesn't work.

    I am pretty certain my windows auth has more rights now that sa other than the sql tables. This is so bizarre.


  3. Anonymous
    2022-08-23T22:12:50.52+00:00

    That is what i thought. But i moved directories and copied and renamed file just in case and it still worked. I also have complete access to root of server as I installed everything.

    0 comments No comments

  4. Anonymous
    2022-08-24T10:47:29.333+00:00

    I think ive pretty much exhausted all SQL steps to fix this problem. At this point I think it maybe related to windows local policy.

    0 comments No comments

  5. YufeiShao-msft 7,146 Reputation points
    2022-08-25T08:39:35.993+00:00

    Hi @Anonymous ,

    There are a lot of people who use windows auth to login in ssms have encountered the same problem, maybe you can try their solution
    https://techcommunity.microsoft.com/t5/sql-server/microsoft-ace-oledb-16-0-openrowset-not-working-from-remote/m-p/2579666
    https://stackoverflow.com/questions/1362108/cannot-initialize-the-data-source-object-of-ole-db-provider-msdasql-for-linked

    -------------

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.