Quantcast
Channel: SQLServerCentral » Data Warehousing » Analysis Services » Latest topics
Viewing all articles
Browse latest Browse all 1341

Using XMLA to alter a SSAS database, and the ObjectExpansion attribute

$
0
0
Hi folks,Using SSAS in SQL Server 2008R2, my intention is to bulk-update several roles in an SSAS database in one go, using an ALTER-script. I only want to modify the usergroups and useraccounts connected to the roles, everything else in the database should remain unchanged. (This is of course very important.)What I have done so far:- I started by creating an ALTER-script of the entire database.- I removed all unrelated XML before and after the <Roles> and </Roles> tags.- I changed the value of the ALTER-element's ObjectExpansion-attribute from "ExpandFull" to "ObjectProperties", To my understanding the value "ExpandFull" would erase all other objects in the SSAS database (except for the ones included in the script). When testing the script, I have also verified that this indeed seems to be the case.As mentioned before, I only want to change the usergroups and useraccounts in the roles (by using Search&Replace) before executing the script. Nothing else should be changed in the SSAS database. For example, all existing permissions connected to the roles should remain unchanged and of course all cubes, dimensions and DSV's too.Will the usage of the value ObjectExpansion="ObjectProperties" in the ALTER-element in my script satisfy those requirements?Here is a text from Microsoft's documention regarding this, but since I don't understand it completely I am asking in this forum instead.[quote]If set to ObjectProperties, the ObjectDefinition element should contain only the complete definition of the major object to be altered, including subordinate minor objects. Subordinate major objects of the object to be altered remain unchanged.[/quote][url=https://msdn.microsoft.com/en-us/library/ms186630%28v=sql.105%29.aspx]Link[/url]For reference, below is the structure of my XMLA script.Thanks in advance,Martin[code]<Alter ObjectExpansion="ObjectProperties" xmlns="http://schemas.microsoft.com/analysisservices/2003/engine"> <Object> <DatabaseID>MySSASDB</DatabaseID> </Object> <ObjectDefinition> <Database various xmlns-references...> <ID>MySSASDB</ID> <Name>MySSASDB</Name> <Roles> <Role1> <role-elements> (ID, Name, Members etc) </Role1> <Role2> <role-elements> (ID, Name, Members etc) </Role2> </Roles> </Database> </ObjectDefinition></Alter>[/code]

Viewing all articles
Browse latest Browse all 1341

Trending Articles