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

Populating MDS step 2—invoking the staging process


Once you have loaded one or more of the staging tables with data, the majority of the practical work has been done. You can invoke the staging process using either the user interface or the T-SQL stored procedure. To understand what happens when the staging process runs, it is worth exploring exactly what happens in the MDS database when the process is invoked:

  1. Data is inserted into one or more of the staging tables. The Batch_ID for each record will be Null and the Status_ID will be 0.

  2. The mdm.udpStagingSweep stored procedure is called (either using the user interface or using T-SQL). This does the following:

    • Calls the mdm.udpStagingBatchSave stored procedure that does a simple insert into the mdm.tblStgBatch table. This returns a Batch_ID.

    • Updates any new records in the mdm.tblStgMember with the Batch_ID.

    • Updates any new records in mdm.tblStgMemberAttribute with the Batch_ID.

    • Updates any new records in mdm.tblStgRelationship with the Batch_ID...