Hard Delete all soft delete records (members) in Master Data Service (MDS) database

Hi,

I am using Master Data Service for couple of months now. I can load, update, merge and soft delete data in MDS. Occasionally we even have to hard delete data from MDS. If we keep on soft deleting records in a MDS table eventually there will be huge number of soft deleted records.

Is there an easy way to hard delete all the soft deleted records from all MDS tables in a specific Model.

Regards,

Rehan


May 19th, 2012 3:11pm

You can hard delete members through Entity Based Staging feature in MDS, you just need specify import type to Purge when you prepare staging table.

Free Windows Admin Tool Kit Click here and download it now
May 22nd, 2012 8:16pm

Like Yang said, use the import type = 6. 
  • Proposed as answer by BI Baracus Wednesday, May 30, 2012 7:29 PM
May 30th, 2012 7:29pm

Actually there are 2 import type for purge, 4 and 6. The following link contains the details 

http://msdn.microsoft.com/en-us/library/ee633854

Free Windows Admin Tool Kit Click here and download it now
May 30th, 2012 8:08pm

So if I get this right...

  • You create a SELECT that pulls the soft-deleted records into the entity's staging table
  • When you do the staging above, you also set the appropriate import type (4 or 6) to cause the hard delete
  • You run that through.

June 6th, 2012 10:46am

Can you please send me t-sql script for deleting the records

Free Windows Admin Tool Kit Click here and download it now
June 28th, 2012 5:26pm

Hi Rehan,

This is probably going to be fixed in the first service pack of SQL 2012.

We are adding new Stored Proedure that will hard delete old soft deleted members from a given model.

Thanks,

Tomer (MSFT).

June 28th, 2012 6:42pm

Hi Rehan,

Did you know if it is fixed in the SP1 of SQL 2012 ?

Thanks.

Free Windows Admin Tool Kit Click here and download it now
April 24th, 2013 1:31pm

any updates on this?
August 6th, 2013 12:43pm

Any updates on this? Seems this is a dead end product (based on the very sparse responses form the MS individuals in this forum).
Free Windows Admin Tool Kit Click here and download it now
April 14th, 2014 7:04pm

Hi,

What you can do is automate the hard deletions by creating a WCF workflow that executes the "delete" via the staging process when a particular attribute value contains the value "Delete".

Regards,

Johan Machielse

April 18th, 2014 12:40pm

Hello,

There is a connect request for more automated handling of soft deleted records.

Please vote for it:

https://connect.microsoft.com/SQLServer/feedback/details/786251/how-know-the-desactivated-member-simply


  • Edited by Piotr Palka Thursday, April 24, 2014 9:58 PM
Free Windows Admin Tool Kit Click here and download it now
April 24th, 2014 9:46pm

Can I use table trigger for hard delete ?
March 5th, 2015 3:05pm

EXEC mdm.udpDeletedMembersPurge @ModelName = N'Product', @VersionName = N'Version 1'     

Free Windows Admin Tool Kit Click here and download it now
March 5th, 2015 4:59pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics