Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Validation Stored Procedure (Master Data Services)

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

In Master Data Services, validate a version to apply business rules to all members in the model version.

This topic explains how to use the mdm.udpValidateModel stored procedure to validate data. If you are an administrator in the Master Data Services web application, you can do validation in the UI instead. For more information, see Validate a Version against Business Rules (Master Data Services).

Note Note

If you invoke validation before the staging process is complete, members that have not finished staging will not be validated.

DECLARE @ModelName nVarchar(50) = 'Customer' 
DECLARE @Model_id int 
DECLARE @UserName nvarchar(50)= 'DOMAIN\user_name' 
DECLARE @User_ID int 
DECLARE @Version_ID int 

                 FROM mdm.tblUser u 
                 WHERE u.UserName = @UserName) 
SET @Model_ID = (SELECT Top 1 Model_ID 
                 FROM mdm.viw_SYSTEM_SCHEMA_VERSION 
                 WHERE Model_Name = @ModelName) 
SET @Version_ID = (SELECT MAX(ID) 
                 FROM mdm.viw_SYSTEM_SCHEMA_VERSION 
                 WHERE Model_ID = @Model_ID)

EXECUTE mdm.udpValidateModel @User_ID, @Model_ID, @Version_ID, 1 

The parameters of this procedure are as follows:




The user ID.


The model ID.


The version ID.

Community Additions

© 2015 Microsoft