Sunday, November 16, 2014

How do you remove old records from the BAMPrimaryImport TDDS_FailedTrackingData table?

How can you remove old records from the BizTalk BAMPrimaryImport TDDS_FailedTrackingData table? 
... not the TDDS_FailedTrackingData in the BizTalkDTADb database


Well it looks like it's a case of manually deleting the records (`TRUNCATE TABLE` or `DELETE FROM`) ...


I've used Red Gate's SQL Search and looked for `TDDS_FailedTrackingData` throughout the database ...

*all objects and all databases* 

Found 8 references in the entire system ... see below

Records are removed from the `[BizTalkDTADb].[dbo].[TDDS_FailedTrackingData]` in two stored procedures ...

- `[dtasp_CleanHMData]` does a `TRUNCATE TABLE` 
- `[dtasp_PurgeTrackingDatabase_Internal]` does a `DELETE FROM` for 100 records at a time

However the `[BAMPrimaryImport]` database only has one stored procedure that has any mention of the `[BAMPrimaryImport].[dbo].[TDDS_FailedTrackingData]` table ...

- `[BAMPrimaryImport].[dbo].[TDDS_InsertFailedTrackingData]`
- and it just inserts records, with the addition of current date & time from GETUTCDATE()


Found lots of posts about clearing down the `[BizTalkDTADb]` table, but very few on clearing down the `[BAMPrimaryImport]`

This on [TechNet](https://social.technet.microsoft.com/Forums/systemcenter/en-US/8df43060-e6f3-46d7-94fa-55f87ec35773/question-about-bamprimaryimportdbotddsfailedtrackingdata-table?forum=biztalkgeneral) from a BizTalk MVP

And this on [MSDN](https://social.msdn.microsoft.com/Forums/en-US/ce8e7fc0-649c-47c1-8005-9769f900b928/delete-rows-from-table-tddsfailedtrackingdata-of-bamprimaryimport-db?forum=biztalkgeneral) from another BizTalk expert. 

![SQL Search results for TDDS_FailedTrackingData][1]



  [1]: http://i.stack.imgur.com/Wf7Z2.jpg


See also Stack Overflow

0 Comments:

Post a Comment

<< Home