Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Problem reading sharepoint 2010 lists using TSQL openrowset from SQL2008r2

$
0
0

I have several different SQL servers reading sharepoint lists. However, I'm trying to configure another SQL server and I just can't get it to work. Here is the error message:

Msg 7399, Level 16, State 1, Line 2

The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" reported an error. Access denied.

Msg 7350, Level 16, State 2, Line 2

Cannot get the column information from OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)".

I know the drivers are installed OK as the Microsoft.ACE.OLEDB.12.0 driver is listed under 'linked servers' + 'providers' in SQL management studio.

The query is:

select *
from OPENROWSET
 (
 'Microsoft.ACE.OLEDB.12.0',
 'WSS;IMEX=1;RetrieveIds=Yes;
  DATABASE=http://192.168.1.26/;LIST=Pages;',
 'SELECT * FROM LIST'
 ) q

I've tried different lists.

I tried using a named account in the connection string.

I tried just querying title in the connection string.

The user account I am connecting to management studio with and tried in the connection string is a site admin with permissions to the lists and i checked i could see the lists contents ok.

One thing i did notice is the 'results' tab in 'management studio' shows the columns for the list. So the query is getting the structure from sharepoint, just not the data.

I found a web post about openrowset with Excel and it mentioned enabling 'dynamic parameters' and 'allow in process'. The odd thing about this was enabling 'dynamic parameters' didn't make any difference. 'Allow in process' does not respond at all, i left it for 30mins and killed it off. On this point one of the servers we have has both these options disabled. I don't want to start playing around with the configuration on those servers as they work and I don't want to break them.

Can anyone suggest some tests that I can carry out to try and isolate the problem?


Brian Searle


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>