Can I rename A 2005 Analysis Services DB?

  • I know you can rename an analysis services database via SQL Server Management Studio via a right click.

    I'd like to rename an analysis services DB via a script, either T-SQL, MDX, or somehow in an SSIS package. 

    Has anyone done this? 

  • Never tried it but have often read these details in MSAS2000 from the OlapObjects table in the repository.

    Theoretically you could maybe UPDATE that but the idea scares me somewhat... definetly something to experiment with on a test system!

  • If you're happy to have the underlying ObjectID not change (e.g DB is currently called StevesDB so the ID is also StevesDB), you can you SQL Server Management Studio to script this.  Open a connection to the server in Object Explorer, expand the databases section, right click the AS DB name and select Script Database As Alter To New Query Window.  Then in the top section you'll see the ObjectID, followign shortly after this you'll see the name element (tag).  Simply change the name to the new name within this tag and then execute the script.

    After running the script, right click the server and select refresh, the renamed ddb name will present.

    Just a note of caution, DON'T try to simplify things (ie the XML document) by removing/deleting the remaing XML tags, by runnign the update without these in there (eg dimensions, cube tags etc etc) you will indeed rename the DB but also delete everything it it (yes, I did this ).

    I'm sure there's a way to mod the opbjectID also, I just haven't seen it yet.

     

    Steve.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply