Today, I faced an issue while running a long MDX query in terms of execution time. I went through so many posts on this issue, but didn't get any answer. Below are the details:
Error Message:
"OLE DB provider "MSOLAP" for linked server "LINKED_SERVER_SSAS" returned message "XML for Analysis parser: The XML for Analysis request timed out before it was completed.".
Description: My SQL Server DB has a Linked Server connection (i.e. named "LINKED_SERVER_SSAS") to connect to SQL Server Analysis Services 2008 OLAP database. This connection is being used in Stored Procs & T-SQL queries to fetch stats from cube. I executed a MDX using this linked server connection, query ran for 10 mins and threw this error message.
Then I tried to ran MDX directly on Analysis Services which ran successfully & took around 18 mins. I checked multiple options to resolve the issue such as
- Linked Server Connection: Query Timeout property under Server Options
- SQL Server Analysis Services: Server Properties (including advance server properties)
- SQL Sevrer Management Studio: Query Execution Property
None of them were successful attempt in my case.
Solution:
- Open SQL Server Database Instance Property where linked server is created.
- Go to Connections.
- Check "Remote query timeout" value under "Allow remote connections to this server" property. Update this value as per Query/Business requirement. (In my case this value was set to 600 secs.)
As this value was 10 mins, my remote MDX query faced timeout issue. After updating value to 1800 secs remote MDX query executed successfully.
Readers: Kindly share your comments & suggestions.