Friday, March 30, 2012

Role deleted

I get this error when I try to build my cube.

Error 1 The 'Role' with 'ID' = 'Sales_Marketing' doesn't exist in the collection. 0 0

I had added and deleted some roles, now I receive this message, does anyone have any idea where do I go find this code to delele this role, it no longer exists in my cube? in the designer tool or in management studio.

thank you!

Analysis Services security is based on the role objects that belong to a database. At the same time, individual objects like cubes and dimensions also contain additional security related objects that reference database role objects. If you set permission on a dimension and then you get XMLA script of dimensions defition, you will see DimensionPermission object as part of a XMLA script.

This DimensionPermission object would look like:

<DimensionPermission>

<ID>DimensionPermission</ID>

<Name>DimensionPermission</Name>

<RoleID>Role</RoleID>

<ReadDefinition>Allowed</ReadDefinition>

<Read>Allowed</Read>

</DimensionPermission>

As you see it references RoleID.

Most likely in your case there is a leftover permission object that references non-existent role. Script your database as XMLA and try to find which Permission object is referencing your Sales_Marketing role.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Thank you, my role is defined in my desktop tool, not on the server which will not allow me to build or deploy my cube. My permission looks like this, one is object ID Role and the second is Role 1. The one I deleted was probably Role 2 but I don't see where that is documented in the xml, I guess I could bring my deployed cube back to my desk top but I wanted to resolve the issue since I had made calculation changes there; Any ideas on how I can identify it? thank you!

</Dimension>

</Dimensions>

<CubePermissions>

<CubePermission dwdBig Smileesign-time-name="34abb275-a50e-48ab-89b1-bb47d248d4a3">

<ID>CubePermission</ID>

<Name>CubePermission</Name>

<CreatedTimestamp>0001-01-01T08:00:00Z</CreatedTimestamp>

<LastSchemaUpdate>0001-01-01T08:00:00Z</LastSchemaUpdate>

<RoleID>Role</RoleID>

<ReadDefinition>Basic</ReadDefinition>

<Read>Allowed</Read>

<ReadSourceData>Allowed</ReadSourceData>

<DimensionPermissions>

<DimensionPermission dwdBig Smileesign-time-name="76086471-b808-41e6-ba68-36fef34146a4">

<CubeDimensionID>Measures</CubeDimensionID>

<Read>Allowed</Read>

</DimensionPermission>

<DimensionPermission dwdBig Smileesign-time-name="d85a2673-a178-409e-a7dd-06271444acc0">

<CubeDimensionID>Dim TIME Fiscal</CubeDimensionID>

<Read>Allowed</Read>

<AttributePermissions>

<AttributePermission dwdBig Smileesign-time-name="be0c4193-c0cc-49a5-b4cb-354388d59896">

<AttributeID>Calendar Quarter</AttributeID>

<AllowedSet>{}</AllowedSet>

</AttributePermission>

</AttributePermissions>

</DimensionPermission>

</DimensionPermissions>

</CubePermission>

</CubePermissions>

|||

You can try to fix your project by opening the project files directly and finding reference to the offending permission object there.

Find the .cub file that contains definition of your cube and see if you can fix it.

Word of caution, it is very easy to mix up XML when editing it. Please make sure you make a copy of your project files before you edit them.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Hi,

Thank you for the information, I just rebuilt it from the server, I thought it would be a good thing to know how to repair, but don't have the time for reviewing any more xml, you are correct, it is very easy to mix it up.

Thank you for the help.

No comments:

Post a Comment