Is there any way to use the OpenRowSet and OpenDataSet commands in SQL Server 2008 R2 without having to have SysAdmin rights?
I’m trying to load data from an Excel file and our service account that will do the actual loading can’t have sysadmin rights.
It’s currently not a linked “server” and the file name can change from month to month.
Here is my query:
SELECT
Center,
Amount
FROM OPENROWSET(
'Microsoft.ACE.OLEDB.12.0'
,'Excel 8.0;HDR=NO;Database=C:\exceldata.xls'
,'SELECT
F1 as Center,
F2 as Amount
FROM [Sheet1$]')
WHERE Amount > 0
Thanks
You don’t necessarily require sysadmin rights, just the
ADMINISTER BULK OPERATIONSpermission (which is a server level permission but not quite sysadmin).If this isn’t an option, you can try setting up a linked server connection and follow the method in this post.