Building a Visual Studio project from an existing SSAS database

Imagine you join a company, and there is an existing SSAS database that contains a few cubes that are working nicely.  You are asked to add an enhancement to one of the cubes, so you poke around in source control for the Visual Studio analysis services project, but can’t find it.  Further research reveals the developer who you replaced never did check the project into source control, leaving it instead on his laptop.  But his laptop was wiped clean when he left.  Uh oh.

Fortunately, one great thing about SSAS is you can “reverse engineer” a SSAS database and build the Visual Studio analysis services project from a deployed SSAS database.  Just go into Visual Studio, and from the menu choose File -> New -> Project… -> “Import Analysis Services 2008 Database” (in 2012 it is “Import from Server (Multidimensional and Data Mining)”).  Then enter the name and location to save the new project, and that is all that is too it.

This feature has also helped me once when I checked out a project from source control, made a bunch of changes, deployed those changes, then accidentally pulled the project again from source control, wiping out my changes.  I “reverse engineered” it and got the changes back: when I built the project from the cube on the server I then copied the resulting project files and overwrote the TFS “checked out” files.  Then I checked those files into TFS.

There is another feature called “online mode” that you can use if you want to make a change to the SSAS database, but don’t want to create a project.  In this mode, you connect to the cube without saving any local files.  Any changes you make are made directely to the SSAS database.  To do this, in Visual Studio go to the menu File -> Open -> Analysis Services Database… -> “Connect to existing database” (or create a new one).  I can’t think of many reasons why you would want to use online mode, except maybe if you need to make a quick change to a cube and don’t have the time to create a project and deploy the cube.

About James Serra

James is SQL Server MVP and a independent consultant with the title of Business Intelligence/Data Warehouse/Master Data Management Architect and Developer, specializing in the Microsoft SQL Server BI stack.
This entry was posted in SQLServerPedia Syndication, SSAS, Visual Studio 2008. Bookmark the permalink.

One Response to Building a Visual Studio project from an existing SSAS database

  1. Tobi says:

    Old article but still solved my problem.
    So easy and kind of obvious but who cares for options which are provided in a menu.
    Any how.
    Thanks alot

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>