Reputation: 43
Help!
Would highly appreciate if anyone could show a solution on how to use adhoc queries using openrowset Microsoft.ACE.OLEDB.12.0 on a non sa account? Been having a hard time looking for this all over the cloud.
Thanks,
Upvotes: 0
Views: 214
Reputation: 11
Couple of things... make sure your SA has enabled Ad Hoc on the server.
sp_configure 'show advanced options',1
reconfigure with override
go
sp_configure 'Ad Hoc Distributed Queries',1 reconfigure with override go
go
Then decide on your architecture. Do you want to focus on DateTime2 values (1/1/-4712 through 1/1/4712) or can your Excel function with the older architecture.
If the latter, use the MSDASQL driver for the openrowset query.
Upvotes: 1