Browsed by
Month: January 2011

Error message explained: The ‘Role’ with ‘ID’ = ‘Role 1’ doesn’t exist in the collection.

Error message explained: The ‘Role’ with ‘ID’ = ‘Role 1’ doesn’t exist in the collection.

It could happen that you move around your cube files and with the deployment, you run into some errors. A common error that I’ve encountered again is the following.

The ‘Role’ with ‘ID’ = ‘Role 1’ doesn’t exist in the collection.
This happens mostly when you have copied a .cube and .partitions file to another project and added this to the new SSAS project/solution.
The underlying meaning of this error is that in your cube file, you have a role defined in your old project that has set specific permissions on this cube. When this role does not exist under the same name and the same permissions set in the new project, your deployment will fail with the above error.
I’ve always deleted the permissions on the cube and re-created them again with the roles that I’ve used in the new project. You can do this by opening up the cube file in Notepad or another text editor, and look for the text CubePermissions. Everything starting at this term (including the tag of CubePermissions as well), remove that node from the file.
Apart from possible other errors that you might stumble upon, your copied cube should now be able to be deployed.