Hi, I'm having trouble with a specific DMV, $SYSTEM.DISCOVER_LOCKS, while querying it using T-SQL OPENQUERY.
For example, this query will run just fine:
select * from openquery(OLAP_SERVER, 'SELECT * FROM $SYSTEM.DISCOVER_CONNECTIONS')
But when I try:
select * from openquery(OLAP_SERVER, 'SELECT * FROM $SYSTEM.DISCOVER_LOCKS')
I get the following error:
OLE DB provider "MSOLAP" for linked server "OLAP_SERVER" returned message "Internal error: An unexpected error occurred in conversion.". OLE DB provider "MSOLAP" for linked server "OLAP_SERVER" returned message "An error occurred while parsing the 'C5' element at line , column ('urn:schemas-microsoft-com:xml-analysis:rowset' namespace) under Envelope/Body/ExecuteResponse/return/root/row/(any).". Msg 7320, Level 16, State 2, Line 3 Cannot execute the query "SELECT * FROM $SYSTEM.DISCOVER_LOCKS" against OLE DB provider "MSOLAP" for linked server "OLAP_SERVER".
Similar problems [*] were present on SQL Server 2008, but the author obviously managed to execute queries to all DMV-s. Could the linked server properties play a role in this?
[*] I am not able to post links or images at the moment until my account is verified, but I was referring to an article by Vidas Matelis, "SSAS 2008 DMVs – querying from the SQL Server and database diagrams"