Book Image

Microsoft SQL Server 2008 R2 Master Data Services

Book Image

Microsoft SQL Server 2008 R2 Master Data Services

Overview of this book

Table of Contents (18 chapters)
Microsoft SQL Server 2008 R2 Master Data Services
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Clearing the staging tables


If you regularly load large amounts of data into your staging tables, you will want to clear them out on a regular basis as part of your SQL Server maintenance plans. You can do this easily for individual batches using the MDS UI as follows:

  1. Select the Integration Management function from the MDS home page.

  2. Highlight an individual batch entry in the grid on the staging batches screen.

  3. Click the delete icon (circled in the following screenshot):

Of course, this could be time consuming if you have many batches you need to clear. As with most MDS functions you can alternatively clear the staging tables by calling a SQL stored procedure—mdm.udpStagingClear. This can be run with a number of different parameters as described next:

mdm.udpStagingClear

Parameter name

Data type

Description

@User_ID

Int

MDS user id—when specified with relevant @DeleteType_ID only data loaded by the specified user will be cleared. Pass NULL for all user data to be cleared.

@StagingType_ID...