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.

Thursday, May 7, 2015


This is something I discovered during a migration to an APS/PDW Appliance. I have seen little documentation on it and figured I would write a small post about it.

PDW Destination Component:

Loading Mode: Upsert

Issue: When specifying a key column(s) for the Upsert.
In situations where the key column name has a space at the APS destination table. I.E. [Column Name]. The Upsert will throw an error that the destination columns: Column, Name do not exist.
Upon further investigation the component is reading the selected key column names as delimited by a space as well as comma. It will then treat each word separated by a space in a column name as a separate column specified for the key. Note that this includes columns wrapped in brackets []

Work Around:
Rename the column(s) on the APS destination by removing the spaces from the key column names.
For Example: [Column Name] Renamed to [ColumnName] or [Column_Name]

Steps to Recreate the Issue:

Step 1
Create a Destination Table in the APS/PDW Appliance with a column name that has spaces. Such as [Sample Column]. This table can either be Distributed or Replicated.

Step 2
Create an SSIS Package with a sample data set to load into this table.

Step 3
Use a PDW Destination with the Loading Mode set to Upsert.

Step 4
Select the Key Column for the Upsert to the column that has the name [Sample Column]

Step 5
Execute the load and record the error.