Add new users in SSAS security

前端 未结 1 497
孤城傲影
孤城傲影 2021-01-20 22:32

I want to add users in SSAS security using following XMLA script.

DECLARE @CreateUserInSsasXMLA VARCHAR(MAX) = 
        \'

        
相关标签:
1条回答
  • 2021-01-20 22:50

    If you install ASSP then you can run the following SQL query which calls an ASSP sproc to get the list of current members. Once this completes, you can append @oldMembers to your existing XMLA:

    declare @members table (Sid varchar(1000), Name varchar(1000), Parent_RoleID varchar(1000), Parent_DatabaseID varchar(1000))
    
    insert @members
    EXECUTE('CALL ASSP.DiscoverXmlMetadata("\Database\Roles\Role\Members\Member")') at AdminCPM
    
    declare @oldMembers varchar(max) = ''
    select @oldMembers = @oldMembers + '<Member><Name>'+Name+'</Name></Member>
    '
    from @members
    
    0 讨论(0)
提交回复
热议问题