Search

Friday, May 20, 2011

Detach and Attach a SQL Server 2008 Analysis Services Database

Detaching an Analysis Service Database Using SSMS


1. Connect to Analysis Service Database Instance using SQL Server Management Studio.


2. In the Object Explorer, expand Databases and then right click the Analysis Service Database and choose the Detach… option from the pop-up menu as shown below. In this example I will be detaching Adventure Works DW database.





3. In Detach Database screen, click OK to detach the Adventure Works DW database.  Note that you can also include a password to encrypt certain data.





Attaching an Analysis Service Database Using SSMS


1. Connect to the Analysis Service Database Instance using SSMS.


2. In the Object Explorer, right click Databases and then select the Attach… option from the pop-up menu. In this example I will be attaching the Adventure Works DW database which we have detached earlier.





3. In the Attach Database screen, you need to specify the folder where Analysis Services DB resides and click OK to attach the database. In addition, you would need to specify the password that was used when you detached the database in the previous step.  Also, if you want to make this read only, select the Read-only check box. 


By default, Analysis Services databases reside in “<drive>:\Program Files\Microsoft SQL Server\<Instance Name>\OLAP\Data\”. In this example, I will be attaching the Adventure Works DW database from “C:\Program Files\Microsoft SQL Server\MSAS10.MSSQLSERVER\OLAP\Data\Adventure Works DW.1.db”.





To move an Analysis Database from one server to another you need to move the entire folder where the data exists.  
Also, you need to make sure that SQL Server has the correct folder and file permissions on the new location.

No comments:

Post a Comment