Renaming an Analysis Services 2005 cube

There is a question on how to rename an Analysis Services 2005 cube since you cannot do that within SSMS (you can rename a database but you cannot a cube).  If you want to rename a cube prior to its deployment, you can alter it through XMLA.  To do this:

<Cube …><ID>Blah</ID><Name>Foo</Name>

As you can see from above, the <Name> node can be changed so that while the ID for this cube is still "blah", now your name can be "Foo".

But if you want to change the name of your cube after its already been deployed, there are an additional number of steps that will need to be performed.  First you will need to go the Olap database folder, e.g.

C:\Program Files\Microsoft SQL Server\MSSQL.2\olap\Data\[Database Name].0.db

and then access the cube XML definition file within that folder, such as: [Cube Name].0.cub.  The XML within this file will look like (with a cube name of “Blah”)

<Cube><Name>Blah</Name><ID>Blah</ID>…

So you need only to change the name of the <Name> node (e.g. now “Foo”) to:

<Cube><Name>Foo</Name><ID>Blah</ID>…

You will also need to stop/restart the AS service for it to register the new name.

 

2 Comments

  1. James Dionne (@jadionne)

    Have you ever automated this using powershell?

    1. Not offhand – but it certainly seems like a good idea, eh?!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s