I have an issue where I have renamed the database for which my cube deploys to from, say, SalesAndStuff to Sale.

This has been no issue, I have changed the database name in Management Studios etc.

My issue is that when I try to deploy my cube now from Visual Studio I get the error that

The database with the name of 'SalesAndStuff' already exists in the 'abc' server

Which I have read is because SSAS figures that the database I wish to deploy my cube to should be to the database with the same name as the database ID created when I created the cube originally.

This name is SalesAndStuff. I have configured my cube under Project -> Cube properties -> Deployment -> Deploy to database Sale but for some reason this isn't recognized.

Any ideas how I can avoid this issue? Am I required to change my deployment properties to the original database, and subsequently rename the database in management studio?

The cube is used by many people who uses it for Excel reports etc. so I don't want to alter any Connection strings towards the cube.


This is basically because the Sale cube still has SalesAndStuff as the ID, renaming your database only changed the name

It will probably be the easiest if you just click "view code" in visual studio and change the <id> node to match your new name.

If that doesn't work out or you think that's too risky you can follow this procedure on msdn.

Make sure you only edit the ID for the database though. If you edit ID's for other objects such as dimensions you will mess up a lot of objects.

Create a backup of your database and solution before you try this.

  • Hello! I changed the <id> to match my database name, but when I tried to deploy this solution it still stated that the databas already exist. Do I Think wrong? Should I not use Deploy cube? If I understand your latter suggestion, do I understand it correct as they, in my case, would have used the settings I already have, create a new database with the name SalesAndStuff, and simply rename that database to Sales, leveraging the fact that the cube gets updated from its DatabaseID reference? ¨ – Cenderze Dec 16 '17 at 12:24
  • 1
    @cenderze Can you script the existing database to xmla in ssms and verify? – Tom V - try topanswers.xyz Dec 16 '17 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.