How to Attach Database and Grant Access to SSAS Service Account in SQL Server 2012

Ahamed Fazil Buhari
Senior Developer
November 18, 2016
Rate this article
[Total: 0    Average: 0/5]

Consider that we have a Database and we need to attach that in our SharePoint Database engine and in addition to that we need to grant access to that database to the Service Account which has been used to install SQL Server Analysis Service (SSAS).

Here, I’ve couple of sample databases downloaded from CodePlex. AdventureWorksDW2012 Data File and AdventureWorks Multidimensional Models SQL Server 2012.


Let’s open the File Explorer and paste the AdventureWorksDW2012_Data.mdf File in the following location, C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\



Now open up the SQL Server 2012 Management Studio to connect to our Database Engine,

1. Right click on the Server and choose Attach.


2. In Attach Database window, click on ‘Add’ button and select the database that needs to be attached and click on OK.


3. After attach, we can see that database in our server,


Now we need to grant access to our SSAS service account for the attached Database.

1. Go to Security -> Login -> New Login


2. We need to add a login for the Service Account that we use for our SQL Server Analysis Service


3. Now go ahead and click on User Mapping in side navigation, select the database and provide the role membership for that selected db.



In the next article, we will go ahead and add the Multidimensional Cube to Analysis Service.



Happy Coding


Category : SQL

Author Info

Ahamed Fazil Buhari
Senior Developer
Rate this article
[Total: 0    Average: 0/5]
Ahamed is a Senior Developer and he has very good experience in the field of Microsoft Technologies, especially SharePoint 2013, 2016 and O365, Azure, ASP.NET, SQL Server, IIS and client more

Leave a comment