Tuesday, June 9, 2015

Visual Studio SSDT COM Error When Opening an SSAS Cubes DSV - Fix and Work Around

Summary of Issue:
In Visual Studio (versions 2010, 2012, 2013), when opening some dimensions of Analysis Services project, the data source view does not display the table that is being used. When opening the Data Source View (.dsv) we get the error below:
 "An error prevented the view from loading. Additional Information: Error HRESULT E_FAIL has been returned from a call to a COM component. (msddsp)"

Root Cause:
The relevant error being returned is coming from a call to AtlIPersistStreamInit_Load in the DdsShapes.dll.  The first thing this code does when reading data from the stream is check the version of ATL that was used to save the data stream.  If the version used to save the data was greater than the version used to build the DDSShapes.dll which is reading the data, then it will return E_FAIL. 

In Summary, an object in the DSV was either created or modified and saved with a newer version of Visual Studio SSDT that has a newer version of the DDSShapes.dll

Summary of the Solutions:
Installing a newer version of Visual Studio SSDT and Registering the DdsShapes.dll for use on the machine regardless of the version of SSDT needed to develop in.

This solution will correct previous version of Visual Studio SSDT (2010, 2012, etc) even though a newer version is being installed. The goal is to setup the latest version of the DdsShapes.dll for the machine to use.

Step-by-step guide

Step 1
Verify the latest version of SSDT being used by Developers, as of this guide it will be SSDT Visual Studio 2013 for SQL Server 2014

If you are currently running the latest version skip ahead to Step 2

If you are not running the latest or same latest version as the other developers you can download the latest version here: https://msdn.microsoft.com/en-us/data/hh297027

Install SSDT Visual Studio 2013 for SQL Server 2014

Step 2

2.1 Run the command prompt as an Administrator on the machine you are updating

2.2 Run regsvr32 command with the newest version of the DdsShapes.dll
The DdsShapes.dll should be located in for the SSDT for SQL Server 2014 location:  
C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Bin \DdsShapes.dll

  2.3 Confirm Registration of the DLL.

This will complete the fix, and now allow all version of Visual Studio on the machine to use the newly registered version of the DdsShapes.dll.

No comments:

Post a Comment