Friday, September 27, 2013

Configure web server to access SSAS cube using Excel


This post contains step-by-step instructions for configuring web server in order to access cube using excel. After successful configuration users can access the cube using excel and can create reports using cube data.


  1. Connect to the server on which you want to configure web server for accessing cube using excel.
  2. Create a folder named CUBE under C:\Inetpub\wwwroot.
  3. Copy all the contents from the folder C:\Program Files\Microsoft SQL Server\MSAS10.MSSQLSERVER\OLAP\bin\isapi into the C:\Inetpub\wwwroot\CUBE directory.
  4. Connect to “Internet Information Services” console. Follow following steps for the same. Click on “Start” -> click on option “Run” -> type “inetmgr” and press OK button. Refer following screen shot for the same.


     5. When you click on OK button, it will open an “Internet Information Services (IIS) Manager” console.   IIS Manager Console looks like following one.          


     6. Create “Application Pool”: 
  • Right click on “Application Pools” node and select option “Add          Application Pools”. Refer following screen shot for the same.



You will get following screen when you click on “Add Application Pool”. Mention following details       under “Add Application Pool” window.

Name: CUBE
.Net Framework version: .Net Framework v2.0.50727
Managed pipeline mode: Classic
Start application pool immediately should be in a checked state.


         
      7. Convert to Application:
    • Expand “Sites” folder and then expand “Default website” node. Right click on “CUBE” folder and select option “Convert to Application”. Refer following screen shot for the same.


    • When you click on “Convert to Application”, it opens “Add Application” form.

    • Click on Select button of “Add Application” window and that will open “Select Application Pool” window. Select “CUBE” under “Application Pool” drop down and click OK button.




    • When you click on OK button, you will find that CUBE folder now appears as an application. Refer following screen for the same.


       8. Directory Property settings:

    • Click on CUBE node and double click on “Handler Mappings” option. Refer following screen shot for the same.

    • When you double click on “Handler Mappings” option, you will find following screen.

    • Click on “Add Script Map” option which will open “Add Script Map” window. Insert the details as per following screen shot.


    • When you click on OK button, you will get following message box. Click Yes.




       9.  Setting Authentication:

    • Select CUBE node under IIS manager console. Double click on “Authentication” option.

    • When you double click on “Authentication” option that will open Authentication details screen which looks like following one.



    • Right click on “Anonymous Authentication” and select “Edit” option. When you click on “Edit” option, it opens “Edit Anonymous Authentication Credentials” window which looks like following one.


    • Click on “Set...” button and insert credentials of user.


       10. Change Binding settings:

    • Click on “Default Web Site” under IIS Manager Console and click on “Bindings” option. Refer following screen shot for the same.


    • When you click on “Bindings” option, it will open “Site Bindings” window. Select a row which contains Port 80 and click on “Edit” button. Refer following screen for the same.


    • When you click on “Edit” button, it will open “Edit Site Binding” window. Change Port to 8081 and click on OK button.
        
         11. Start “Actions”:

    • Select “Default Web Site” node under IIS manager console. On the right side there is “Actions” pane, click on Start option.       


Conclusion: You have successfully established the configuration settings of web server and now user can access cube using excel.



Monday, September 16, 2013

Create Tabular Project (for newbie)

Tabular model is very new to most of the developers and if someone wants to create his/her first tabular model then this article will help. Following are the steps to create a tabular model. I am giving an example considering only 2-3 dimensions and one fact.

1. Open "Microsoft SQL Server 2012" folder and launch "SQL Server Data Tools"



2. When you launch the wizard, you will get the Start Page of Microsoft Visual Studio. Click on "New Project" and you will get "New Project" wizard. Expand "Business Intelligence" node and click on "Analysis Services" node.


3. Click on "Analysis Services Tabular Project" and give appropriate name and Location to your project. Click on OK button.



4. Click on "Model" menu from a menubar and click on "Import From Data Source.." option.


5. When you click on "Import From Data Source.." option, you will get "Table Import Wizard" wherein you can see different relational databases options which you can use to create your tabular model.

As I am using AdventureWorks sample database, I am selecting "Microsoft SQL Server" option. So select "Microsoft SQL Server" and click on "Next" button.

Note: You can download a sample database named AdventureWorksDW2012 Data File from a link.

When click on "Next" button, you will be get "Connect to a Microsoft SQL Server Database" wizard. Give server name on which you have your database restored and select "Database name"


6. Click on Next button and select the Impersonation information i.e. you can give your windows credentials or you can use service account. Click on Next button.

When you click on Next button, you will get "Choose How to Import the Data" wizard. As I am going to demo this project through tables, I am selecting option "Select from a list of Tables and views to choose the data to import". you can even write a query to import data. Click on Next button.

When you click on Next button, you will get "Select Tables and views" wizard. Select tables which you want to use to create your tabular model. For sample purpose, I am selecting "DimDate", DimProduct, DimProductCategory, DimProductSubCategory and FactInternetSales. After marking the tables as checked, Click on "Finish" button.
When you click on Finish button, you will get following "Importing" wizard.



Your Tabular Project is ready to use. Bydefault you will get Data View of your tabular model. You can check the model by selecting "Diagram View" from Model View option of Model menu.




7. You can create measures on the columns of fact table. let me show you one example. toggle to Data view model. go to FactInternetSales table and select "SalesAmount" column. Click on summation icon and select SUM option. this will create a measure on SalesAmount column with SUM as aggregate function.



8. Open the properties of measure and change name to "Internet Sales Amount". Save the changes. Right click on project and select Deploy option.



9. After successful deployment, you can browse the data using Excel pivot tables similar to multi-dimensional cube. You can hide attributes, measures which you don't want to show to client using "Hide from Clients tools". Right click on column and select option "Hide from Clients tools".