Linked Server connection with EXCEL file only works when running SSMS as Administrator

Noga, Stephen F 31 Reputation points
2023-02-17T16:27:22.08+00:00

I am creating a LINKED SERVER in SSMS (2018) to import an EXCEL file into my SQL instance (2019). For testing purposes I have placed the Excel file in the same directory as my DB. I am accessing SSMS with an account that has full control over the DB Directory. When I attempt the creation I get a "Cannot initialize the data source" error -- see below. An interesting twist to this is if I attempt the creation running SSMS as Administrator it is successful. Once created I am limited to SSMS run as Administrator to access it.

My goal is to access the LINKED SERVER from a stored procedure that is called from PowerShell. To do this I expect I will need a non-privileged access method.

  1. Is the use of Administrator access required to create a LINKED SERVER?
  2. Can a LINKED SERVER be accessed without Administrator access?

User's image

Thanks

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

1 answer

Sort by: Most helpful
  1. Noga, Stephen F 31 Reputation points
    2023-02-17T21:02:55.5266667+00:00

    After doing some additional testing I was able to resolve my issues and now have a workable powershell solution.

    The major adjustment was to log into Invoke-sqlcmd using a windows account with appropriate privileges.

    The Authentication issue shared in my initial request was likely due to a missing Data Source at that particular point in time.

    0 comments No comments

Your answer

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