locked
Commit and validate IN MDS using store Procedure OR T-sql RRS feed

  • Question

  • HI

    Can any one  please  send t-sql or stored procedure script to commit and Validate data in MDS

    Thanks!

    Thursday, June 28, 2012 8:35 PM

Answers

  • See below.  I took this from here.

    DECLARE @ModelName nVarchar(50) = 'Customer' 
    DECLARE @Model_id int 
    DECLARE @UserName nvarchar(50)= 'DOMAIN\user_name' 
    DECLARE @User_ID int 
    DECLARE @Version_ID int 
    SET @User_ID =  (SELECT ID  
                     FROM  mdm.tblUser u 
                     WHERE u.UserName = @UserName) 
    SET @Model_ID = (SELECT 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 

    • Proposed as answer by Wang, Yang Friday, June 29, 2012 1:38 AM
    • Marked as answer by Elvis Long Monday, July 9, 2012 1:24 AM
    Thursday, June 28, 2012 9:29 PM