none
MDS - Commit Version Not working

    Question

  • Working on SQL 2016 MDS.

    I have a simple model with one entity.  Model version is locked and data is validated.  Clicking Commit but nothing happens.  Also even though model / version is locked, I'm still able to add members to the entity.

    Friday, January 06, 2017 2:31 PM

All replies

  • The lock only works (prevents access) to users that are not Administrators.

    You are probably an administrator and that enables you to change the locked version. I know, strange!!!


    Thomas LeBlanc twitter ( @TheSmilingDBA )

    Saturday, January 07, 2017 7:49 PM
  • Thomas,

    Thank you for your response.  Adding data to a locked model as an administrator is fine.

    Do you have any insight into why I cannot commit the version?

    I have all the appropriate access and all the data is validated.

    Monday, January 09, 2017 3:00 PM
  • Sorry, not sure why you can not commit version.

    I just tried on my dev system and it worked fine.


    Thomas LeBlanc twitter ( @TheSmilingDBA )

    Friday, January 13, 2017 3:37 PM
  • We experience the same but commit using the sp works fine.  The following script will commit a locked/validated version and set the Export flag

    USE

    MDS


    GO

    DECLARE

    @UserID

    INT,


    @ModelID

    INT,


    @ModelVersionID

    INT,


    @ModelVersionFlag

    INT



    WITH

    LastVersion AS


    (

    SELECTModel_id,MAX(ID)LastVersion FROM  mdm.tblModelVersion WHEREStatus_ID =2 GROUPBYModel_ID)



    SELECT

    @ModelID =LV.Model_ID,


    @ModelVersionID

    =LV.LastVersion FROMmdm.tblModel M


    LEFT

    JOINLastVersion LV ONLV.Model_ID =M.ID


    WHERE

    M.name='yourmodelnamehere'



    SELECT

    @ModelVersionFlag =ID FROMmdm.tblModelVersionFlag


    WHERE

    Model_ID =@ModelID



    SELECT

    @UserID =ID FROMmdm.tblUser WHEREUserName =SUSER_NAME()


    SELECT

    @ModelID,@ModelVersionID,@ModelVersionFlag


    SELECT

    NameFROMmdm.tblModel WHEREID =@ModelID


    SELECT

    NameFROMmdm.tblModelVersion WHEREID =@ModelVersionID


    SELECT

    NameFROMmdm.tblModelVersionFlag WHEREID =@ModelVersionFlag


    SELECT

    UserName FROMmdm.tblUser WHEREID =@UserID


    EXEC

    mdm.udpVersionSave@UserID,@ModelID,@ModelVersionID,null,3,NULL,NULL,@ModelVersionFlag,1

    Wednesday, June 06, 2018 3:02 PM