Current Position:Home > External Data Refresh Failed. We cannot locate a server to load the workbook Data Model. ThisWorkBookDataModel

External Data Refresh Failed. We cannot locate a server to load the workbook Data Model. ThisWorkBookDataModel

Update:10-11Source: network consolidation
Hi All,
I have been trying to fix this for days now. I have tried solutions in many articles but to no avail. So while the error message is something you may have seen may times, I just can't find a solution in my case.
This is the error:
And in text just in case the image isn't viewable:
"External Data Refresh Failed. We cannot locate a server to load the workbook Data Model. We were unable to refresh one or more data connections in this workbook. The following connections failed to refresh: ThisWorkBookDataModel."
What is worse is I have checked the ULS (SharePoint Trace Logs), the Event Viewer Logs and the OWA Logs and I cannot find a specific error that would help pin point the problem.
Excel Workbook
So what am I doing? I have an Excel 2013 workbook and I create an "SQL Server" connection to the AdventureWorksDW database, add a pivot table and a pivot chart, test in in Excel and all works fine.
I save the Excel workbook to SharePoint 2013 and then select "Data" then "Refresh All Connections" and then I get the error in the picture above.
Even more puzzling is I have another Excel workbook that also has pivot tables and pivot charts in the AdventureWorksDW2012Multidimensional cube database in "SQL Analysis Services" and this works fine. Hmmm.
My Environment
My environment is Windows 2008 R2 Server, SharePoint 2013 with the April Service Pack1 and a separate server with OWA2013 SP1. It has an SQL Server 2008 R2 database which has been upgraded to SQL Server 2012.
Data Model Settings
In Excel Services this is set to my server name which is "server-name". As I do not have instances all I can enter is the server name. As this works everywhere else including the workbook outside of SharePoint I do not think this is the problem.
But I could be wrong.
Unattended Account
I have set this up for the PowerPivot Services App and Excel Services App.
ODC Connections in Excel
I have tried all 3 authentication modes, Windows, Secure Store ID and "None" which is the unattended account. I have not tried the other connection types, should I?
Not in WOPI
I am not in WOPI mode.
AD Accounts
I have added permissions in the SharePoint Services and SQL Server, and as they work in Excel outside of SharePoint, I do not think it is a permissions issue. I could be wrong of course, but the problem is in one of SharePoint, OWA, AD,
SQL Server, Excel, and Windows Server.
Isolate the Error
Below is a list of errors I think are relevant but they do not tell me much. The SharePoint logs are not really giving me an error that tells me what to do and where to do it, or even why it cannot refresh, (perhaps not noticeable by the untrained eye).
Problem with SQL Server Not Analysis Services
So my cube database in analysis services works fine in SharePoint/OWA but not the databases in sql server. This is my best clue but I have no idea what it means. Why would it work with an Analysis Services connection but not an "SQL Server" connection?
It Works Outside of SharePoint
If I run the excel worksheet outside of SharePoint all works fine. When inside OWA this is where the refresh error occurs.
Errors from Event Viewer on SharePoint Server using ULS Viewer
"Failed to create an external connection or execute a query. Provider message: There are no servers available or actively being initialized., ConnectionName: , Workbook:"
"Refresh failed for 'ThisWorkbookDataModel' in the workbook 'http://server...'. [Session: 1.V22.26itT0lx8piNFeqtuGVhN214.5.en-US5.en-US36.98c0e158-9113-46e9-850e-edda81d9ed1c1.A1.N User: 0#.w|ad\testuser1]"
And an error in the ULS under the "Data Model" category:
"--> Check Deployment Mode (server-name): Fail (Expected: SharePoint, Actual: Multidimensional)."
This last error, as it turned out, defined the problem concisely, although I was yet to work out what it meant in some detail.

The Best Answer

I finally solved this myself (or should I say with the help of several key articles).
The refresh did not work because the database was not in "SharePoint Mode". Yes, SQL Server has modes, 3 of them in fact.
If you installed SharePoint to the default SQL instance which would be called <servername> then you cannot use this default instance for Excel 2013 workbooks in OWA 2013 because the refresh only works if the database is in SharePoint mode.
So what are these 3 modes? The Deployment Mode property in the msmdsrv.ini file has them as:
0 = Multidimensional mode (the default whenever you install SQL Server normally)
1 = PowerPivot for SharePoint mode
2 = Tabular mode mode
How do you know what mode you are in? That's easy, open SQL Studio Manager and connect to all your SQL database engine instances (ignore Analysis Services or SSRS as they are not database engines). If you only have the default instance then that is almost
definately in Multidimensional mode which is the default and what SharePoint installs its databases to.
You must have an instance called <servername>\POWERPIVOT. This instance is the "sharepoint mode" needed, and the default instance name when you install an SQL instance in this mode.
If you don't see <servername>\POWERPIVOT in SQL server then you are not in "sharepoint mode". It is more accurate to say, you do not have an instance that is in sharepoint mode. This is because you cannot simply switch modes on an SQL server.
You have to install a new instance in the required mode, thats the only way.
That's easy enough. Load up the SQL Server setup CD and run setup. Install a brand new instance and select "SQL Server PowerPivot for SharePoint" when you get there in the wizard.
Now you will have the default instance that stores all the SharePoint databases and that is in mode 0, and a new instance called <servername>\POWERPIVOT that is in mode 1. The "<servername>\POWERPIVOT" instance connection is what you
will use for Excel 2013 when rendering in OWA 2013.
You also need to ensure OWA 2013 is not in WOPI mode for Excel worksheets. See the last link below for more information about WOPI.
Next you should go to the Excel Service App in CA and click Data Model Settings and add the <servername>\POWERPIVOT instance.
Then you have to either turn off the firewall on the SQL server machine, or create an inbound rule on the Windows firewall to open the TCP port for the <servername>\POWERPIVOT instance:
1. Start Task Manager and then click Services to get the PID of the MSOLAP$InstanceName.
2. Run netstat –ao –p TCP from the command line to view the TCP port information for that PID.
Finally, you can now create Excel 2013 workbooks that run in OWA without refresh errors, as long as you are connecting to the <servername>\POWERPIVOT instance. Hooray.
Look for the string "There are no servers available or actively being initialized" in this article:
Determine the server mode:
Install the SharePoint PowerPivot instance (aka SharePoint mode)
Open the port for the new SQL instance:
Turn Off WOPI for Excel OWA