none
MDS - Commit Version Not working

    Domanda

  • 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.

    venerdì 6 gennaio 2017 14:31

Tutte le risposte

  • 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 )

    sabato 7 gennaio 2017 19:49
  • 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.

    lunedì 9 gennaio 2017 15:00
  • Sorry, not sure why you can not commit version.

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


    Thomas LeBlanc twitter ( @TheSmilingDBA )

    venerdì 13 gennaio 2017 15:37
  • 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

    mercoledì 6 giugno 2018 15:02