Wednesday, July 13, 2011

SQL Server Replication: LEVEL 1 - Introduction to SQL Server Replication

Level 1: Introduction to SQL Server Replication

The word replication comes from the Latin word replicare which means to repeat. Replication describes the process of reproducing or duplicating (www.merriam-webster.com).

Replication in SQL Server does exactly that; it reproduces or duplicates data. Any time you need to create a copy of your data, or to reproduce a change to that data, replication can be used. That copy can be created in the same database or at a remote location on a separate server.

The copy can be continuously kept in sync with the source data, or synchronized at scheduled intervals. One-way synchronization, as well as bidirectional synchronization, is possible. Replication can even be used to keep several datasets in sync with each other.

In this first level, I'll tell you about the basic replication components and describe how they work together to allow you to replicate your data and your data changes. We'll also look at a detailed example of setting up a simple replication scenario.

Replication Components

SQL Server replication consists of three components: The Publisher, the Distributor and the Subscriber. These components act on articles that are defined within publications and subscriptions.

Article

For each SQL Server object that should be replicated, a replication article needs to be defined. Each article corresponds to a single SQL Server object, or a subset of an object. The objects that are replicated most often are tables, views and stored procedures. For a complete list of objects that can be replicated, check out Publishing Data and Database Objects in Books Online. The properties of an article determine whether the article contains the entire object, or if a filtered subset of the objects makes up the replicated article. With some restrictions, multiple articles can be created on a single object.

Publication

A group of articles that logically belong together can be combined into a publication. The publication has options defined that apply to all the articles in that publication. The main option defined by a publication is the type of replication that is to be used.

Publisher

The SQL Server instance that makes a publication available for replication is called the publisher.

The publisher monitors all articles for changes, and makes information about those changes available to the distributor.

Distributor

The distributor is the SQL Server instance keeps track of all subscribers and all published changes and makes sure that each subscriber gets notified of each change. Most of the changes are tracked in a distribution database. The distributor can be a separate SQL Server instance, but often the distribution service runs on the same machine as the publisher.

Subscriber

The subscriber is the SQL Server instance that receives all the published information through subscriptions.

Subscription

A subscription is the counterpart of the publication. A subscription defines which server (subscriber) is to receive the updates published in a publication. Each subscription creates a link between one publication and one subscriber. There are two types of subscriptions: push subscriptions and pull subscriptions. In a push subscription, the distributor directly updates the data in the subscriber database. In a pull subscription, the subscriber asks the distributor regularly if any new changes are available, and then updates the data itself.

Replication Types

There are three main types of replication available in SQL Server. They are snapshot replication, merge replication and transactional replication.

Snapshot Replication

Snapshot replication creates a complete copy of the replicated objects and their data each time it runs. It uses SQL Server's BCP utility to write the contents of each table into the snapshot folder. The snapshot folder is a shared folder location that has to be set up on the distributor when enabling replication. Each participant in a replication setup needs to have access to the snapshot folder.

Every time snapshot replication is run, everything is recopied from scratch, so it has high bandwidth and storage requirements. All other types of replication use - by default - a single replication snapshot to sync up all subscribers with the distributor only during the initial setup.

Transactional Replication

Transactional replication works, as the name suggests, on a transaction basis. Every committed transaction gets scanned for changes applied to replication articles. Scanning of the changes is done by a log reader agent, which reads through the transaction log of the publisher database. If there are changes affecting a published object, those changes get logged on the distributor in the distribution database. From there they make their way to the subscribers.

Transactional replication allows for close to real time synchronization and leaves only a small footprint on the publisher. While there are several options to allow for bidirectional data movement, transactional replication was originally designed to work one way only.

Merge Replication

Merge replication was designed from the beginning to allow for changes to the data to be made on the publisher as well as the subscriber side. Merge replication also allows for disconnected scenarios, where a subscriber might not be connected during the day. That subscriber would synchronize after reconnecting in the evening. If a row gets updated in two different places at the same time, a conflict occurs. Merge replication comes with several built in options to resolve those conflicts.

Setting up Transactional Replication

This section is a step by step guide, of how to setup transactional replication involving a single replicated table.


To setup replication, the distributor, the publisher and the subscriber need to be configured. Replication can be completely setup and controlled using T-SQL scripts. However, the necessary T-SQL involves the use of stored procedures which together have well over a hundred required parameters. So it makes sense to start out by using the SSMS-GUI. The example screenshots shown here were made on a single server (WIN2008A) with a SQL-Server instance (R2A) installed on it. This instance is a SQL-Server 2008R2 instance. However, you can follow the examples on SQL Server 2008 and 2005 as well.



Setting up distribution


The distributor is the core of transactional replication. It is required to be available when setting up all the other components, so it needs to be configured first.


Start out by opening SSMS and connecting to the SQL-Server instance that will contain your replication source data. While the distributor can be on its own SQL-server instance, in many cases it makes sense to have the publisher and the distributor live on the same machine, as will be assumed in this example.


After you connected to the server, right click on the "Replication" folder under your server and select "Configure Distribution..." as shown in Figure 1.


Figure 1


Figure 1: Configure Distribution



The Configure Distribution Wizard will greet you with its start-up screen as shown in Figure 2.


Figure 2


Figure 2: Configure Distribution Wizard


It is safe to ignore this screen and click "Next".


On the next screen (Figure 3) you will choose whether the distribution service should run on this server or whether you already have a configured distributor in your network. The machine on which the distribution service runs will also contain the distribution database. Leave this selection at the default, which is to install distribution on this server and click "Next".


Figure 3


Figure 3: Selecting the server for Distribution


This brings up the dialog in Figure 4, asking you to select the location for the snapshot folder.



Figure 4


Figure 4: The Snapshot Folder


The snapshot folder can be any location on your machine or in your network. It makes sense to create a network share on the distributor for it. This example uses "\\WIN2008A\ReplicationSnapshotFolder".
The setup of the snapshot folder requires appropriate rights to be granted as well. Without going into too much detail right now, grant write access to "Authenticated Users" (Figure 5) on the folder itself and read access to "Everyone" (Figure 6) on the share. More information about how to tighten security in this area will be given in a later
level in this Stairway.


Figure 5


Figure 5: Granting access to the Snapshot Folder



Figure 6


Figure 6: Granting access to the Snapshot Folder Share


After you setup your share and put the network path into the wizard's input field, press "Next" to go to the "Distribution Database" form shown in Figure 7.


Figure 7


Figure 7: The Distribution Database


Here you specify the name of the distribution database and also where its data and log files shall be located. Leave the defaults and click "Next" to advance to the "Publishers" screen (Figure 8).



On the "Publishers" screen you prepare potential publishers to be able to use this distributor. We will install our publisher on the same instance, so you can leave the default and "Next" to the final question (Figure 9).


Figure 8


Figure 8: Preparing Publishers


Figure 9


Figure 9: Wizard Actions


The final question is whether you want the wizard to execute your selections immediately or whether you want the wizard to create script that you will execute manually at a later time. Again, leave the default setting and click "Next" one last time.



Now you will see a list of actions as in Figure 10 that will take place. Click "Finish" to start the process.


Figure 10


Figure 10: Wizard Summary


Finally, the screen shown in Figure 11 gives information about progress and success of the replication configuration.


Figure 11


Figure 11: Execution Status


The First Publication


To create a publication, we need to first have a database containing a table to publish. Execute the SQL Script 1 to create a test database for the publication.



USE MASTER;
GO
EXECUTE AS LOGIN = 'SA';
GO
CREATE DATABASE ReplA;
GO
USE ReplA;

GO
IF OBJECT_ID('dbo.Test') IS NOT NULL DROP TABLE dbo.Test;
GO
CREATE TABLE dbo.Test(
Id INT IDENTITY(1,1) PRIMARY KEY,
Data INT CONSTRAINT Test_Data_Dflt DEFAULT CHECKSUM(NEWID())
);


GO
INSERT INTO dbo.Test DEFAULT VALUES;
GO 1000
USE MASTER;
GO
REVERT
;
GO

Script 1: Create a test database for the publication


Now you are ready to setup a publication.


In the SSMS Object Explorer open the Replication folder and right click on "Local Publication". Select "New Publication..." in the drop down menu (Figure 12).



Figure 12


Figure 12: New Publication


The welcome page of the "New Publication Wizard" appears as shown in Figure 13.


Figure 13


Figure 13: Configure Publication Wizard


Click "Next".


In the "Publication Database" box (Figure 14) select the database ReplA that you just created and click "Next". The "Publication Type" screen (Figure 15) lets you choose which type of replication you want to use. Select "Transactional publication" and click "Next".



Figure 14


Figure 14: Select the Publication Database


Figure 15


Figure 15: Publication Type


Now you get to choose which articles should be part of this publication (Figure 16). Select the table dbo.Test and click "Next" again to move on to the "Filter Table Rows" dialog (Figure 17). Filters are an advanced topic that will be covered in a later
level in this Stairway, so for now just click "Next" without making a selection on this form.



Figure 16


Figure 16: Articles


Figure 17


Figure 17: Row Filters


The next three screens deal with the snapshot agent. On the first screen (Figure 18) select "Create a snapshot immediately" and click "Next". On the "Agent Security" Screen (Figure 19) click the "Security Settings" Button and pick "Run under the SQL Server Agent service account" on the form that opens (Figure 20).



Figure 18


Figure 18: Snapshot Schedule


Figure 19


Figure 19: Agent Security


Figure 20


Figure 20: Select an Account


Click "OK" on the form and then "Next" on the Agent Security screen.



That brings up the "Wizard Actions" form (Figure 21) for you to select "Create the publication". One last time of clicking "Next" brings you to the summary screen (Figure 22).


Figure 21


Figure 21: Wizard Actions


Figure 22


Figure 22: Wizard Summary


Here you need to pick a name for your publication. Type "MyFirstPublication" into the field and click "Finish" to start the process. Again, the last screen (Figure 23) shows progress information and a success status when the process is finished.



Figure 23


Figure 23: Execution Status


The first subscription


In most cases, the subscriber will be on a different machine but there are scenarios in which you want it to be on the same instance. To keep this example simple we are going to stay on the same instance as well. Use the code in Script 2: to create the database ReplB.


USE MASTER;
GO
EXECUTE AS LOGIN = 'SA';
GO

CREATE DATABASE ReplB;
GO
REVERT
;
GO

Script 2: Creating the target database


We now go to the SSMS Object Explorer and right click on "Local Subscriptions" and select "New Subscriptions..." in the drop down menu (Figure 24).



Figure 24


Figure 24: Select New Subscription


The "New Subscription Wizard" (Figure 25) welcomes you and gives you another opportunity to practice pressing a "Next" button.


Figure 25


Figure 25: New Subscription Wizard


In the "Publication" form (Figure 26) select the publication you just created and click "Next". The "Distribution Agent Location" screen (Figure 27) allows you to select between push and pull subscription. Leave the default and move on to the "Subscribers" Screen (Figure 28).



Figure 26


Figure 26: Select the Publication


Figure 27


Figure 27: Push or Pull


Figure 28


Figure 28: Target Database


Here you need to select your server and pick the ReplB database.


The next screen allows you to setup "Distribution Agent Security" (Figure 29).


Figure 29



Figure 29: Distribution Agent Security


Click the small ellipsis button on the right side and select "Run under the SQL Server Agent service account" in the form that opens (Figure 30).


Figure 30


Figure 30: Select an Account


Clicking "OK" and then "Next" gets you to the "Synchronization Schedule" Screen (Figure 31). Pick "Run continuously" and move on to the "Initialize Subscriptions" screen (Figure 32). Leave the default, to initialize immediately and then "Next" to the "Wizard Actions" form (Figure 33).



Figure 31


Figure 31: Synchronization Schedule


Figure 32


Figure 32: Initialization


Figure 33


Figure 33: Wizard Actions


As before, leaving the default (Create the subscriptions) and clicking "Next" gets you to the summary screen (Figure 34) with a list of actions about to be performed. Click "Finish" to start the process and wait for the green success logo to appear on the final form (Figure 35).



Figure 34


Figure 34: Wizard Summary


Figure 34


Figure 35: Execution Status


Success!


Script1 created the table dbo.Test in ReplA and inserted 1000 rows into it. After the initial snapshot was transferred over to the subscriber you will find the dbo.Test table also in ReplB with all 1000 rows in it. A couple of minutes after you finished the setup you can run Script 3 to verify that replication pushed all the data to the subscriber as expected. This script joins the ReplA.dbo.Test and the ReplB.dbo.Test tables together to show which rows got replicated correctly. You can now run further tests of your own, you can inserting and updating rows in ReplA.dbo.Test and watch those changes magically appear in ReplB.dbo.Test as well.


SELECT TOP(20) A.Id AS [ReplA.Id],A.Data AS [ReplA.Data],B.Id AS [ReplB.Id],B.Data AS [ReplB.Data]

FROM ReplA.dbo.Test A
FULL OUTER JOIN ReplB.dbo.Test B
ON A.Id = B.Id
ORDER BY A.Id DESC

Script 3: Compare Publisher and Subscriber

Summary

Objects in a database on a SQL Server instance referred to as the publisher that are marked for replication are called articles. Articles are grouped together into publications. The subscriber gets updated with the changes that occur to the articles through a subscription. The data flows through the distribution database which resides on the distributor. Publisher, distributor and subscriber can be the same instance or separate instances on the same or on different machines. The source and the target database can be the same (if publisher and subscriber are in fact the same SQL Server instance), but the distribution database has to be separate.


Friday, July 8, 2011

SSAS Interview Questions

1. What you should know about MDX? [Beginner]

Q. How is the syntax for MDX different and alike to T-SQL?
A. http://www.mosha.com/msolap/articles/MDXForEveryone.htm

Q. Define a Dimension, Hierarchy, Level, Member, a Cube, a Cell, a Tuple, and a Set?
A. A Dimension is an object in an OLAP Database that contains elements that can be used to define how we look at OLAP data. For example, in a typical OLAP Database you would have a Date Dimension and we might want to view the data my Years, Months or Periods, Weeks, or Days. We have a Hierarchy when there are elements within a Dimension that relate to one another in a typical, one to many, relationship. An example is sown by a year having 12 months, a month having 28, 29, 30, or 31 days depending on the month. The heirarchical relationship is Year -> Month -> Day in this example. Each layer of the hierarchy is a Level. In the above example, we have a root Level (Year) and a leaf Level (Day), and an intermediate Level (Month). A member is a single element within the Dimension. June would be a member of the Month Level within Year-Month-Day Hierarchy of a Date Dimension. To understand a Tuple, you must know what a Cube and a Cell is. A Cube is a many sided (based on the number of dimensions associated to it) object that houses the aggregate and non-aggregate data in individual Cells that are the intersection of the many sides of the Cube. A Cell is simply the intersection of the many sides of a Cube for any given Member of each Dimension. The Tuple is the representation of each Dimension Member that defines a Cell within a Cube. Tuples are syntactically represented by Parentheses. A Set is one or more Tuples that define the cells for a given query result. Typically, a query will result in two dimensional axes (Columns and Rows). Each axis (Column and/or Row) must have a Set defined for the axis. Sets are syntactically represented by Curly Braces.

Q. What the difference between flexible and rigid attribute relationship in SSAS Dimensions. How does this relationship impact aggregation design and performance?
A. A Rigid relationship indicates that the dimension data does not change. A Flexible relationship (default setting) allows for changes in the dimension data. Flexible relationships force Analysis Services to drop and re-compute any existing aggregations during incremental dimension processing.Rigid relationships do not require the re-computing of existing aggregations during incremental processing and thereby reduce total processing time. Hierarchies with rigid relationships can also be queried faster than those with flexible relationships. The flip side of the coin is that changing any dependent attribute that has a rigid relationship within any hierarchy requires full process of the entire dimension.

Q. In MDX, what is the difference between the IF and IIF statements?
A. The IF statment checks for a condition THEN if true performs some operation then END IF. The IIF statement checks for a condition if true (,) performs an operation, else if false (,) performs another operation. Syntax for each follows:
IF [Measures].CurrentMember IS [Measures].[Sales Amt] THEN [Measures].[Sales Amt] * .10 END IF
IIF([Measures].[Sales Amt] > 1000, "Sales are Good.","Sales are not Good")

Q. When setting up partitions, what must you do to make sure you don't load duplicate data into a partition?
A. You must define a Where Clause in the Partition Configuration.

Q. What is the first statement in a Cube's MDX Script?
A. The CALCULATE statement.

Q. How do you create SubCube space in a Cube?
A. By using the SCOPE statement within the MDX Script.

Q. What is the best practice for keeping your cubes sparse?
A. Don't populate null values with 0.

Q. How does SSAS handle null values in terms of math operations?
A. Null * 2 = Null, Null + 1 = 1

Q. How do you define the Cube Space in SSAS 2005?
A. The cube space is defined by the Attriute Hierarchies in the many dimensions of the cube. More specifically, it is the product of all attribute hierarchies in a cube. User Hierarchies do not impact the cube space and attributes without attribute hierarchies exist outside the cube space.

Q. How can dimension attributes that do not have an attribute hierarchy be used in a cube?
A. They can be used as a Member Property within the dimension.

Analysis Services Performance Guide

MSOLAP: Processing

  • Rows read/sec

MSOLAP: Proc Aggregations

  • Temp File Bytes Written/sec
  • Rows created/Sec
  • Current Partitions

MSOLAP: Threads

  • Processing pool idle threads (I sometimes find "query pool idle threads" more significant, maybe you want to monitor both)
  • Processing pool job queue length (I sometimes find "query pool job queue length" more significant, maybe you want to monitor both)
  • Processing pool busy threads (I sometimes find "query pool busy threads" more significant, maybe you want to monitor both)

SQL-Server: Memory Manager

  • Total Server Memory
  • Target Server Memory

Process

  • Virtual Bytes – msmdsrv.exe
  • Working Set – msmdsrv.exe
  • Private Bytes – msmdsrv.exe
  • % Processor Time – msmdsrv.exe and sqlservr.exe

Logical Disk:

  • Avg. Disk sec/Transfer – All Instances

Processor:

  • % Processor Time – Total

System:

  • Context Switches / sec

So it should be clear that you need to monitor the server machine comprehensively and not only the Analysis Services Process.

However, I picked some SSAS counters from the list that are a good one to start your exploration when focusing on the SSAS processes.

Storage Engine Query

I think that this is a really interesting category of counters to start with. Here you find information about the number of queries processed per second, the caching rate of the queries, the average time per query etc. There are really a lot of counters. So this category gives you a good overview of the servers' workload. For the beginning you might want to look at the following counters:

Object

Counter

Description

MSAS 2008:Storage Engine Query

Current measure group queries

Current number of measure group queries being actively worked on.

MSAS 2008:Storage Engine Query

Measure group queries/sec

Rate of measure group queries

MSAS 2008:Storage Engine Query

Queries answered/sec

Rate of queries answered.

MSAS 2008:Storage Engine Query

Bytes sent/sec

Rate of bytes sent by server to clients, in response to queries.

MSAS 2008:Storage Engine Query

Queries from cache direct/sec

Rate of queries answered from cache directly.

MSAS 2008:Storage Engine Query

Queries from cache filtered/sec

Rate of queries answered by filtering existing cache entry.

MSAS 2008:Storage Engine Query

Queries from file/sec

Rate of queries answered from files.

MSAS 2008:Storage Engine Query

Avg time/query

Average time per query, in milliseconds. Response time based on queries answered since the last counter measurement.

MSAS 2008:Storage Engine Query

Dimension cache lookups/sec

Rate of dimension cache lookups.

MSAS 2008:Storage Engine Query

Dimension cache hits/sec

Rate of dimension cache hits.

MSAS 2008:Storage Engine Query

Measure group cache lookups/sec

Rate of measure group cache lookups.

MSAS 2008:Storage Engine Query

Measure group cache hits/sec

Rate of measure group cache hits.

MSAS 2008:Storage Engine Query

Aggregation lookups/sec

Rate of aggregation lookups.

MSAS 2008:Storage Engine Query

Aggregation hits/sec

Rate of aggregation hits.

Connections

This category gives information about the number of connections, sessions and request which is also important to understand the workload and to see when bottlenecks occur.

Object

Counter

Description

MSAS 2008:Connection

Current connections

Current number of client connections established.

MSAS 2008:Connection

Requests/sec

Rate of connection requests. These are arrivals.

MSAS 2008:Connection

Current user sessions

Current number of user sessions established.

MDX

There are really a lot of counters about MDX. Just to name a few of them:

Object

Counter

Description

MSAS 2008:MDX

Number of cell-by-cell evaluation nodes

Total number of cell-by-cell evaluation nodes built by MDX execution plans

MSAS 2008:MDX

Number of bulk-mode evaluation nodes

Total number of bulk-mode evaluation nodes built by MDX execution plans

MSAS 2008:MDX

Total cells calculated

Total number of cell properties calculated

Memory

Memory is always important. Here you can also query the amount of memory being allocated by the aggregation cache.

Object

Counter

Description

MSAS 2008:Memory

Memory Usage KB

Memory usage of the server process. Same as perfmon counter for Process\PrivateBytes.

MSAS 2008:Memory

AggCacheKB

Current memory allocated to aggregation cache, in KB.

MSAS 2008:Memory

Quota KB

Current memory quota, in KB. Memory quota is also known as a memory grant or memory reservation.

MSAS 2008:Memory

Quota Blocked

Current number of quota requests that are blocked until other memory quotas are freed.

Aggregations

If your cubes rely on aggregations it might be interesting to know if they can be held in memory or if the are written to a temporary file. So you might also want to look at the following aggregation counters:

Object

Counter

Description

MSAS 2008:Proc Aggregations

Temp File Bytes Writes/sec

Usage of temporary file

MSAS 2008:Proc Aggregations

Current partitions

Current number of partitions being processed.

MSAS 2008:Proc Aggregations

Memory size bytes

Size of current aggregations in memory. This count is an estimate.

MSAS 2008:Proc Aggregations

Temp file bytes written/sec

Rate of writing bytes to a temporary file. Temporary files are written when aggregations exceed memory limits.

Processing

Processing time is also very important when considering performance especially when you're processing your cube regularly over the day while users are also making their queries. Knowing about the processings may also make the exploration of performance issues more easy. If you're just looking at the average query time for instance, you should also check what the server does in the meantime.

Object

Counter

Description

MSAS 2008:Processing

Rows read/sec

Rate of rows read from all relational databases.

MSAS 2008:Processing

Total rows read

Count of rows read from all relational databases.

MSAS 2008:Processing

Rows converted/sec

Rate of rows converted during processing.

MSAS 2008:Processing

Total rows converted

Count of rows converted during processing.

MSAS 2008:Processing

Rows written/sec

Rate of rows written during processing.

MSAS 2008:Processing

Total rows written

Count of rows written during processing.

Threads

Object

Counter

Description

MSAS 2008:Threads

Query pool job queue length

Nonzero values means that there are more queries than query threads. You may increase the number of threads (but only if CPU utilization is not too high because otherwise this would only result in more context switches and degrade performance)

MSAS 2008:Threads

Query pool busy threads

The number of busy threads in the query thread pool

MSAS 2008:Threads

Query pool idle threads

The number of idle threads in the query thread

Interview Questions for MDX (MDX Interviews)

General concept: Usually interviewer starts with few conceptual questions to understand level of interviewee in related field.

Question1: Explain the structure of MDX query?

Question2: Tell me your 5 mostly used MDX functions?

Question3: What is the difference between set and tuple?

Question4: What do you understand by Named set? Is there any new feature added in SSAS 2008 related to named set?

Question5: How will you differentiate among level, member, attribute, hierarchy?

Question6: What are the differences among exists, existing and scope?

Question7: What will happen if we remove CALCULATE keyword in the script?

Question8:How will you pass parameter in MDX?

Question9: What is the diffrence between .MEMBERS and .CHILDREN?

Question10:What is the difference between NON EMPTY keyword and NONEMPTY() function?

MDX Queries: If person does well in "general concept" category, interviewer tries to evaluate if person has actually worked on product/tool.

Question1: Write MDX for retrieving top 3 customers based on internet sales amount?

Question2: Write MDX to find current month's start and end date?


Question3: Write MDX to compare current month's revenue with last year same month revenue?

Question4: Write MDX to find MTD(month to date), QTD(quarter to date) and YTD(year to date) internet sales amount for top 5 products?

Question5: Write MDX to find count of regions for each country?

Question6: Write MDX to rank all the product category based on calendar year 2005 internet sales amount?

Question7: Write MDX to extract nth position tuple from specific set?

Question8: Write MDX to set default member for particular dimension?

If you want to practice more on writing MDX queries than you can try following posts/articles:

SSAS - MDX Query Interview Questions and Answers-I

SSAS-MDX Interview questions - Time based function-II

MDX SCOPE statement Interview questions & Answers

SSAS MDX Query Interview Questions and Answers

MDX time cheat sheet

Performance: If interview position is for MSBI developer then you might not to address performance questions but if you are for MSBI tech lead position then there will be few questions on performance aspect.


Question1:What are the performance consideration for improving MDX queries?


Question2: Is Rank MDX function performance intensive?


Question3: Which one is better from performance point of view...NON Empty keyword or NONEMPTY function?

Question4: How will you find performance bottleneck in any given MDX?

Question5: What do you understand by storage engine and formula engine?

Hope this list will help you in coming interviews. Best of luck :)