I am trying to run the following query:
SELECT * FROM OPENROWSET(\'Microsoft.ACE.OLEDB.12.0\',
\'Excel 12.0;Database=C:\\Somefile.xlsx\',
\'SELECT * FROM [Sh
We had this failure and nothing resolved until we noticed our service account was configured to use a domain account, not the default service account. Another server using Local System worked running the exact same job with the same impersonation settings and executing user.
We investigated and confirmed, adding the Act as part of the operating system right for the SQL Agent service account in the Local Security Policy under the Security Settings | Local Policies | User Rights Assignments resolved the issue.