SSIS Slowly Changing Dimension

Posted on 2010-08-23
Last Modified: 2013-11-10
I have inherited alot of SSIS packages and I am seeing a common theme. He uses a SCD for every load of data to a table he has. There is one table in particular that is failing on the load in multiple packages. I have an OLEDB source with a SCD that has an OLEDB Destination(New records) and an OLEDB Command used for updates. All the packages fail when trying to load to this table saying that its is a violation of Unique Key. I am somewhat new to the SCD but I get how it works for the most part. Any help would be appreciated.

I'll give an additional 500 points if I get this figured out today...
Question by:johnnyaction
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
LVL 30

Accepted Solution

Reza Rad earned 500 total points
ID: 33501647
when a violation on a constraint happens, task fail and as a result whole package fail.
you should set Failed Error Output and configure it to handle violating Unique key errors.
this is my article about how to handle the Failed Error Output:


Author Comment

ID: 33501732
This is the error I am getting when I execute the package. My question is, why would it try to do an insert into a table when it should be doing the update? Doesnt the Slowly Changing Dimension handle that? I have attached a pic of what I am trying to run.

[Insert Destination [728]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E2F. An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80040E2F  Description: "The statement has been terminated.". An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80040E2F  Description: "Violation of UNIQUE KEY constraint 'AK_DimProduct'. Cannot insert duplicate key in object 'dbo.DimProduct'.".

Author Comment

ID: 33502257

I added the new table and redirected the failed rows to this table. The package ran with Success but it did not write any rows to the FailedRows table? This is making me think that it may not have run properly? Any thoughts

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.


Author Closing Comment

ID: 33504727
Thanks for your help
LVL 30

Expert Comment

by:Reza Rad
ID: 33505491
sorry for delay on answering.
did your problem solved now?

Author Comment

ID: 33505825
I am just curious how I did not get any values put into my FailedRows table. It fails without the redirect rows. Also, why would it fail in the first place. If the key exists its supposed to do an Update if it doesnt then Insert. So Im not sure why this redirect would be needed? Any clarification would be appreciated. Thanks
LVL 30

Expert Comment

by:Reza Rad
ID: 33507991
where did you set FailedRows? in destination?
and about SCD: did you configure it correctly?

and last thing:
I don't suggest SCD at all, because this has performance issue, you can use
Lookup Transformation with better performance,
use Kimball SCD component
use Merge statement is T-SQL

and I think last one is better at all because all things will happen in server side exactly.

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how the fundamental information of how to create a table.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question