How to setup basic dimension security in SSAS

SQL Server Analysis Services offers the possibility to create roles, whereby you can manage the access certain users will have to data in the cube(s) on the database. The following is a basic tutorial on how to create a role Limited Access, used to limit the access to the Product dimension of the Adventure Works cube.

First we right-click the Roles collection on the database and select New Role:

Then we give the role a meaningfull name and perhaps a description to distinguish it even more:

Next we add the members of the role, eg. the users:

We can add as many users as we like, even groups to let he IT Administration handle the permissions:

We then need to decide which cube(s) the role is granted access to:

We jump a few steps here in order to get to the basic part of setting dimension security in SSAS 20008.
Select the Dimension Data tab, and select which dimension(s) the role is to be restricted on:

This particullar role is limited to seeing only members Accessories and Bikes, hence Clothing and Components are prohibited:

In order for us to test this newly created role, we can select to browse the cube using the credentials of the role.
This is done in the browse cube dialog:

We then select our new role:

And voilà, the permissions show up as expected:

For more advanced stuff on security in cubes, please refer to: http://www.ssas-info.com/analysis-services-articles/51-security

How to get SSAS to return the correct currency format.

Although setting the language and collation correctly, it’s not easy to see why a specific MDX would not return the right formatting, in regards to monetary, thousands seperator etc.
There is however a way of forcing the language, through a property available on the calculated measure. In the following example, I’ll show that even though the server settings are da-DK (Danish), the results are displayed as en-US, unless we provide a property value.

First, a screenshot of the server settings:

Then the query, that returns en-US formatting:

For this to work, we need to add: Language=1030 as property to the calculated member, then we get:

See more on FORMAT_STRING and LANGUAGE @ http://msdn.microsoft.com/en-us/library/cc879322.aspx

Reporting Services og lokal Domain Controller issue

Problem:

Jeg havde forleden den førnøjelse, at installere en Domain Controller lokalt på det udviklingsmiljø vi arbejder på. Vi har måtte troppe op med egen server, da kunden ikke kunne afse serverkraft til et udviklingsmiljø. Så maskinen står altså i et domæne vi ikke rigtig kan kontrolere.

Reporting Services, og i særdeleshed rsreportserver.config, håndterer det ikke så elegant som man kunne have ønsket sig. Servicen kører, i vores tilfælde, under kontoen Network Services, som erstattes i det øjeblik Domain Controlleren bliver installeret. Kontoen får altså tildelt en ny SID.

Problemet opstår fordi Reporting Services registrerer SID’en på Network Services, som jo erstattes. Hvorfor den nye konto ikke længere har adgang.

Løsning:

Giv kontoen Network Services rediger/modify rettigheder til mapperne: C:Program FilesMicrosoft SQL ServerMSRS10.MSSQLSERVERReporting ServicesLogFiles og C:Program FilesMicrosoft SQL ServerMSRS10.MSSQLSERVERReporting ServicesRSTempFiles

Server og database collation clasher i sikkerhedsindstillingerne for en bruger

Tænkte jeg lige ville dokumentere hvilke skridt der skal til, for at reproducere en lidt underlig fejl i SQL Server Management Studio 2008 (SSMS).

Setup:
Serveren er sat op med collation: SQL_Latin1_General_CP1_CI_AS
Databasen er oprettet med collation: Danish_Norwegian_CI_AS
Login er oprettet med default sprog: Engelsk
Database bruger er oprettet med collation: Danish_Norwegian_CI_AS

Følgende skridt vil reproducere fejlen:

1. Se properties for server-login:

2. Klik User Mapping

3. Klik Securables

4. Observer fejl:

Cannot resolve the collation conflict between “Danish_Norwegian_CI_AS” and “SQL_Latin1_General_CP1_CI_AS” in the UNION operation. (Microsoft SQL Server, Error: 468)

MS burde måske nok have været dette scenarie igennem, med en server sat op med én collation og databasen med en anden.