Professional Documents
Culture Documents
Step 2: IN visual studio 2008->Solution Explorer ->Analysis service Project8->shown in figure click on -> Right Click On Data Source Views And Select New Data Source.
Step: 6 Write Down Your Server Name /computer Name e.g PUNIT-PC AND SELECT DATABASE NORTHWIND AND Click Ok.
Step: 7 Then Click On Next Button and Select Inherit Option and Click Next and then Click on Finish. And then Cancel.
Step: 8 Opne Microsoft SQl Server 2008--> clicl on SQl Server Management Studio
Step: 10 Left Corner select Nortwind Select TablesRight Click On dbo.employess Select Script Table as Create toClick On New Query Editor WindowRemove Query
And Write Down Below Query and Then Execute. Step: 11 Create tbTime Table and copy below Query in it. USE [Northwind] GO
/****** Object: Table [dbo].[tblTime] Script Date: 03/01/2013 09:25:08 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON
GO CREATE TABLE [dbo].[tblTime]( [TimeKey] [int] IDENTITY(1,1) NOT NULL, [OrderDate] [datetime] NULL, [Year] [int] NULL, [Quarter] [int] NULL, [Month] [int] NULL ) ON [PRIMARY] GO INSERT INTO tblTime (OrderDate, [Year], [Quarter], [Month]) SELECT DISTINCT OrderDate, YEAR(OrderDate) AS [Year], DATENAME(QUARTER,OrderDate) AS Quarter , MONTH(OrderDate) AS [Month] FROM dbo.Orders ORDER BY [Year],[Quarter],[Month]
Step:12
Left Corner select Nortwind Select TablesRight Click On dbo.employess Select Script Table as Create toClick On New Query Editor WindowRemove Query and Write Down Following Query.
CREATE TABLE [dbo].[tblFact] ( [OrderDate][datetime] NULL, [PostalCode] [varchar](10) NULL, [ProductID][int] NOT NULL, [EmployeeId][int] NULL, [ShipperId][int] NULL, [Total Sales][float] NULL, [Discount][float] NULL, [Unit Sales][int] NULL, [TimeKey][int] NULL )ON [PRIMARY] GO INSERT Into tblFact SELECT Orders.OrderDate, Customers.PostalCode, Products.ProductID, Orders.EmployeeID, Orders.ShipVia AS ShipperId, SUM([Order Details].UnitPrice * [Order Details].Quantity) AS [Total Sales],
SUM([Order Details].UnitPrice * [Order Details].Quantity * [Order Details].Discount ) AS Discount, SUM([Order Details].Quantity)AS [Unit Sales], tblTime.TimeKey FROM Orders INNER JOIN [Order Details] ON Orders.OrderID =[Order Details].OrderID INNER JOIN Customers ON Orders.CustomerID = Customers.CustomerID INNER JOIN Products ON [Order Details].ProductID = Products.ProductID INNER JOIN tblTime ON [Orders].OrderDate = tblTime.OrderDate GROUP BY Orders.OrderDate, Customers.PostalCode, Products.ProductID, Orders.EmployeeID , Orders.ShipVia, tblTime.TimeKey
Step 13:
Left Corner select Nortwind Select TablesRight Click On dbo.employess Select Script Table as Create toClick On New Query Editor WindowRemove Query and Write Down Following Query. CREATE VIEW vwEmployees AS SELECT EmployeeID, LastName + ','+ FirstName AS EmployeeName FROM Employees
Step: 14
Left Corner select Nortwind Select TablesRight Click On dbo.employess Select Script Table as Create toClick On New Query Editor WindowRemove Query and Write Down Following Query. CREATE VIEW vwGeography AS SELECT DISTINCT PostalCode, City, Region AS State, Country FROM Customers
Step: 15
Left Corner select Nortwind Select TablesRight Click On dbo.employess Select Script Table as Create toClick On New Query Editor WindowRemove Query and Write Down Following Query. CREATE VIEW vwProducts AS SELECT Products.ProductID, Products.ProductName, Categories.CategoryName FROM Products INNER JOIN Categories ON Products.CategoryID = Categories.CategoryID
Step: 16
Left Corner select Nortwind Select TablesRight Click On dbo.employess Select Script Table as Create toClick On New Query Editor WindowRemove Query and Write Down Following Query. CREATE VIEW vwShippers AS SELECT ShipperId, CompanyName AS ShipperName FROM Shippers
Step: 17
Left Corner select Nortwind Select TablesRight Click On dbo.employess Select Script Table as Create toClick On New Query Editor WindowRemove Query and Write Down Following Query. CREATE VIEW dbo.vwSuppliers AS SELECT Products.ProductID, Products.ProductName, Suppliers.CompanyName AS SupplierName FROM Products INNER JOIN Suppliers ON Products.SupplierID = Suppliers.SupplierID
Step: 20 Open Visual Studio -Select Data Source Views and Create New Data Source View
Step: 22 Select Table from and left and move to right shown in figure. And Click Next and then finish.
Step: 24 Make a StarModel arrange star model in shown figure. And select column name and move for connection shown in figure.
Step: 25 Creating CUBE, IN visual studio 2008->Solution Explorer ->Analysis service Project8>shown in figure click on -> cube-> Select New Cube
Step 27: Click Next and then click On Suggest Button and Click on Next
Step: 29 Uncheck Mark Tbl Fact Count and then click Next Button
Step: 32 Keep in mind if you forgot given a password During Sql Server So its give an error so follow this step 1.Right Click on Analysis Server Project->go to Properties->Select Deployment->Go to Server and Write Down localhost Or 1. Goto-> Control Panel\All Control Panel Items\Administrative Tools-> click on Local Services
Right Click And Go to -> Properties Select Logon Option and Ok and Apply Go to General and Restart
Step:36
Step: 40 Select EmployeeName from Data Source View And Drop to Attribute Section.
Step: 41 Go to Solution Explorer->Dimensions->Double Click on Vw Product.dim. Select Product Name from Data Source View And Drop to Attribute Section.
Step: 42 Go to Solution Explorer->Dimensions->Double Click on Tbl Time.dim. Select ALL from Data Source View And Drop to Attribute Section.
Step: 44 Go to Solution Explorer->Dimensions->Double Click on Vw Suppliers.dim. Select Supplier Name from Data Source View And Drop to Attribute Section.
Step: 45 Go to Solution Explorer->Dimensions->Double Click on Shippers.dim. Select Shippers Name from Data Source View And Drop to Attribute Section.
Step: 50 Click On Northwind.Cube and Go to Cube Menu->Reconnect and Right Click and Clear Result