SQL Server interview questions, c# interview questions, .NET interview questions, ASP.NET interview questions

Lesson 6/Lab 6 :- Debugging real physical phones in Xamarin.

As greats as it using an Android emulator it’s a pain to debug applications in it.Emulators are slow and laggy plus they can never compare to a real android device experience as they do not support some of the functionalities of a real device.

The reasons to debug on real device:

  • To check accelerometer and physical motions.

  • Emulator debugging is slow and configuration is complex.</br>
    To test your application on your Android device follow the steps shown below:

  • Turn on USB debugging in your android settings by going into about device and then click on the built number multiple times and then go to the outer settings menu to turn it on.

Now connect your phone to your pc via USB take care that USB debugging is still switched on.

As you can see we have our device show up in the emulators list.

Now run the app in the phone by pressing the green emulator icon.

As we can see our device has hosted our application and so it’s a real test on device rather than an emulator.

You can also go thorugh below simple video of Xamarin Mobile Development :-

SQL Server interview questions, c# interview questions, .NET interview questions, ASP.NET interview questions

Lesson 5/Lab 5 :- Multiforms & passing data between them.

Multiforms in Xamarin means to have multiple views instead of a single view like Main.axml and our application can navigate between those and pass data in between them.

Okay now let’s get started by adding another form in our application.

Next we a new activity to invoke the SecondForm as every UI in android is invoked via activity.

Add the following code to ActivitySecondForm to enable it to invoke SecondForm.

We need to send a call from Main form to SecondForm

Now from our Main activity we need to invoke the ActivitySecondForm so let’s do it by adding this code to MainActivity.

For this we need to create an object of Intent and as we learned earlier StartActivity is used to start any activity.

As you can see below we can now navigate from one form to another form.

Now we need to pass the data from one page to another

Let’s create an object of Person so that we can pass data from one page to another but we need to pass it in json format.

So we need to serialize the object of Person.

Now pass parameters into the object created

But for using Json we need to install some dependencies so let’s use Visual Studios Inbuilt package manager which is Nuget.

In Nuget Package Manager go to browse and install Newtonsoft.Json.

After installing you should see Newtonsoft in your references.

To convert the object to json use the following code:

Here the persondata is the key and jsonperson is value which is passed in the PutExtra method.

PutExtra is used to push the data with the key while GetStringExtra is used to receive data while providing the key.

After passing data from MainActivity.cs to ActivitySecondForm.cs .we need to deserialize it to a normal format to display it in the small TextView which we need to create in ActivitySecondForm before we write this code

Code to be written in ActivitySecondForm.cs

Important note don’t forget to add Newtonsoft.Json in the name space above.

Good we are done with the coding part so just deploy the application next to see the Output:

Our data which was name and address have been passed from the Main form to the Second form.

Before starting with the labs do watch below Xamarin stratup video

SQL Server interview questions, c# interview questions, .NET interview questions, ASP.NET interview questions

Lesson 4/Lab 4:- Dialog boxes and Intents in Xamarin.

Below is a youtube video which demonstrate about Xamarine Mobile Development concept :-

Dialog boxes are message boxes that are used by the developer to convey a particular message regarding the functionality of the application to the user.

So that the user can click on the buttons on the dialog boxes to perform a particular action.

These are steps involved in making a Dialog Box:

Step 1: we have to create an object of type builder which is used to create dialog box.

Step 2: Now create a dialog box object.

Step 3: Next Create a button, TextView and Title for dialog boxes as shown below:

In the above code we have created an anonymous function to create three button in dialog box on pressing each will display an output in the TextView.

The title is defined in SetTitle while message text in SetMessage.


Intent are messages which are passed through activities to services as they define what we want to do.

Now to use Intent we need to create an object of intent and the following code:

The string inside the Parse function is a telephone number.

The above code we created an uri object using Uri.Parse and we pass the uri to Intent.

ActionDial is used to pass the Intent that we want to dial a number and StartActivity is used in which we pass dialingintent.

But we might encounter some error in the above code if we want we can remove Android.Net add the following in the namespaces

Now deploy the app and click on the button.

We will see the following action on the device which is the Dialer called and the Telephone no in the string is passed to the dialer.

In the same way we can write the application code such that we can view a geolocation in our device.

With the following code:

Let’s alter this code to Visit a particular site

SQL Server interview questions, c# interview questions, .NET interview questions, ASP.NET interview questions

Lesson 3/Lab 3 :- Xamarin Android Activity Lifecycle.

Here is a very simple overview of Android Activity with sequence of states

Initially we start our application now there may be some interruption like a phone call we might need to attend so the application gets interrupted and runs in the background.

After we are finished with the phone call the application gets restarted and comes to the foreground so that we can resume our activity.

After completing our activity we can choose to exit it with the back button.

Here is a more detailed Android Activity Lifecycle which explains the applications working from start to exit.

There are seven events in the above diagram some of them will help us track the transition and some will help to track the state.

OnCreate event is an event which starts only once at the launch of the application.

OnStart event occurs after OnCreate and all the user interface is loaded but the application is still not visible.

OnResume causes the application to become and hence the app starts running in the foreground of your android device.

OnPause event occurs when any kind of interrupt occurs which causes the application to go into the background by various reasons such as incoming calls etc.

OnStop event is called when the app goes to the background or a visible false state.

OnRestart occurs when the interruption that caused OnPause event is finished and since the app is running in the background app can resume its functionality while calling the OnResume event. But it is still not visible as it can only come to the foreground in OnResume.

OnDestroy is the event where the user exits the application or it is terminated by the device due to low device memory.

To this Events in Action let’s write the following code in your MainActivity.cs .

Add a Multiline text in the designer window

Rebuilt to generate Resource Id and add the above code in your project.

Next add the following code to see the occurrence of events in your application

Also add the custom text below each event to see it in the MultiText window.

Now let’s rebuild and start the app

As we can see OnCreate, OnStart and OnResume event get triggered.

Let’s go to the appdrawer in the Android emulator and return to the app.

As you we can see OnPause, OnStop we executed and as we returned to the application OnRestart, OnStart and OnResume were started.

See the below video to understand basic concept on Xamarin Mobile Development :-

SQL Server interview questions, c# interview questions, .NET interview questions, ASP.NET interview questions

Xamarin Lesson 2/Lab 2 :- Activity, Resources and Assets.

Activity can be defined as any action performed by the user concerning our app.

User interacts with our application to do different tasks such as viewing photos, videos, music etc.

This activities can be categorized into two types:

  • Assets
  • Resources

Assets files are fixed such as logo or images which need to be loaded without any alteration

So Assets are files without options or raw without alternatives.

Resources are files which can be loaded according to environment.

In resources there is folder called drawable.

According to your version of Xamarin this may or may not contain an image file called Icon.png.

This is your default image that is displayed on your emulator.

Now let’s create another folder called drawable-hdpi, what this does is tell the Xamarin to use the image under drawable-hdpi if your phone has a high pixel density or has a high resolution.

In the ResourcesDesigner.cs file all entries in the resources folder generate a unique id.

This id’s are used to recognize and load resources into the user interface.

As we can see a new ID has been generated for icon.png file.

But it is recommended that you store your app icons in minmap folders which have different resolution named folders ready to use.

Now let’s start building a simple application

Go to Layout folder in Resources and click on Main.axml

This will launch a designer window

Now in toolbox which can be found on the left-hand side of visual studio or just open View in the upper menu to see it.

Follow the procedure as shown:

Drag and drop Plain Text, Button and Large Text in the order shown above.

Now rebuilt to generate Id’s in ResourceDesigner

When we launch our application the first thing to run is the MainActivity.cs file

As we can see MainLauncher is set to true this is what launches the MainActivity.

Now uncomment the code line in the MainActivity.cs which is

The above line allows us to load the startup User Interface.

When the user starts an Activity or clicks on the app the MainActivity.cs is invoked which in turn invokes ResourcesDesigner.cs which loads Icon, UI and Buttons etc. in the application.

Great we are done with the UI designing let’s get to coding.

Double click on the button in Main.axml or just go to MainActivity.cs .

Declare three variables as null for EditText, Button and TextView as show below:

Next Write

In the above image FindViewById is used to locate the button resource id generated in ResourcesDesigner.cs and typecast it as generics to "btn" along with editxt and txtview.

The Next line of code say when someone click on the button append Hello to the text entered in the editxt (Plain Text) also the + sign represents event to be subscribed.

Now deploy the application

Here is a startup video tutorial on Xamarin :-

SQL Server interview questions, c# interview questions, .NET interview questions, ASP.NET interview questions

Learn Xamarin step by step :- Basic(Lesson1/Lab 1).

This is the Lesson 1/Lab 1 of the Xamarin Tutorial

Now let’s start with Xamarin Mobile Development.

What is Xamarin?

Xamarin is a mobile development platform which uses C# to create mobile application for Android, IOS and so on.

In Xamarin we use C# as a single language to write and create mobile applications for all major platforms.

Hence Unlike other Solutions which use interpretation, Xamarin is natively compiled on the machine which makes it a preferable option for building high-performance apps with native look and feel of their respective platform.

In Xamarin, while the code related to database access, business logic and network communication can be shared across multiple platforms, The Xamarin Development allows you to create platform-specific UI code layer.

So Xamarin cross-platform applications look 100% native on any mobile device.

Thus providing better user experience and feel as compared to other hybrid apps.

Do watch the following video of Xamarin Mobile Development :-

Prerequisites for Xamarin Mobile Development:

  • Visual Studio 15 with update 3 or Visual studio 17 (either Xamarin Studio Add-on Installed )

  • With Xamarin studio also Ensure that you have installed Android Development SDK in Visual Studio 15

  • In Visual Studio 17 just check Mobile Development with .Net and Install

In this Tutorial we will be opting for Android App development in Xamarin on a Windows Machine.

Development of IOS apps on Visual Studio requires MacOS.

The recommended Operating system for Xamarin Development is Windows 10 with at least 4gb of ram and a dual core cpu.

But the minimum operating system version is Windows 7.

Also Xamarin. Forms Windows support requires Windows 8.1, and Xamarin. Forms UWP support requires Windows 10.

Let’s get started with Xamarin Android Development...

When you open a new project in visual studio and if you see the following options under Visual C# namely Android, iOS and Cross-Platform it means Xamarin has been properly installed on your system.

Xamarin has two approaches for Mobile app development:

  • Xamarin Native

  • Xamarin Forms

We must choose one of these approaches before we can continue further.

Xamarin Forms (Cross-Platform):

  • We can create a single UI for all platforms.

  • Fast Cross platform development.

  • Used in apps where UI is less important than code sharing and we have a single code base.

  • More suitable for simple application with a few functionality which do not require platform specific code functionality.

Xamarin Native (Android, iOS):

  • We can create one UI per respective platform.

  • We can customize and get the maximum out of our UI.

  • The cross platform development in this approach is slow.

  • We have multiple code bases.

  • This apps exploit the most out of the native OS and use many platform specific API’s

  • This are well polished apps which serve multiple functionality and work with smooth interface and fast operations.

Now let us start with Xamarin Native Programming with android...

Click on the Blank Android option and create a new android application.

We use Emulators in Xamarin to test Android Applications

Emulators are software applications which simulate mobile environments like android, iOS and other in out Computer.

We can download different emulators in the options for emulator and the latest version supports all previous versions of android apps built.

The android emulator works inside a virtual machine so deployment time may depend upon your system configuration.

When we press the green emulator button Visual studio will launch the emulator and our application icon along with its name will appear in the simulated android phone.

SQL Server interview questions, c# interview questions, .NET interview questions, ASP.NET interview questions

Explain Change Detection in Angular.

Change Detection


Now Change Detection…..

Now Before going into any technical details let’s first understand what’s the proper meaning of change detection?

Change Detection means Identifying and Reacting to a Change in the state of being of any Entity.

Change Detection in Angular basically means that just describes a simple task in which taking the internal state of an application and trying to make it visible in its user interface.


A Model can represent an object, array and even references to other model (hence the connected models in the above diagram).

A DOM (Document Object Model) is the structure behind the scenes which gives life to the buttons, paragraphs and links. As we give some input as data structure and DOM basically renders it in the browser.

Many times there are changes in state of the Model and they must be reflected in the DOM.

Tricky part of Change Detection:

Accessing the DOM is a drain on the server and can potentially make the UI slower.

We need to find out where specifically the Model has been altered and what change has occurred and change the DOM respectively.

There different ways other than Change Detection we can use to detect change in the model.

  • We can have a server-side solution to re-render a page when someone clicks on it.

  • Virtual DOM used in React js.

Change detection basically is used to Project the data of our application in its respective UI.

First Simple Example on Change Detection:-

Here the above component that we have made simply displays two properties also provides a method to change them when the button in the template is clicked.

Now moment this particular button is clicked is the exact time when application state has changes, because it changes the properties of our component.

On Clicking Change name button

In Angular each component has its own change detector also angular application consists of a component tree, the result is that we get a change detector tree as well. This change detection tree can also be viewed as a directed graph where data always flows from top to bottom.

The Conditions that cause Change Detection:

➢Events - click, submit, …

➢XHR - Fetching data from a remote server

➢Timers - setTimeout(), setInterval()

All of these conditions are asynchronous.

Hence whenever asynchronous operations happen in angular, it will change our application state.

This is the moment Angular should update its respective views.

What tells Angular to update its View?


What is Zones.js?

A zone is a context for execution that persists across multiple async tasks.

Zones are an excellent for Angular 2+ as they help provide everything required by Angular in order to perform change detection in the applications.

Below this page is a simple example of Zones in JavaScript.

The following HTML page has two functions :-

f1 () and f2 ()

In this application we are going to invoke f2 () after 6 seconds.

Output on the console:

Now we have to count the time needed to execute function both functions.

time() and timeEnd() counts the total execution time of the two functions.

Output :

The time for execution represented is 7 seconds instead of 6 seconds.

Here f1() is synchronous and f2() is asynchronous.

So to get the proper time we need to create a context around the function and this is exactly what zone does.

For that we need to add zone in our package.json file

Now perform npm install in your terminal window.

Also Lets add the following code in our HTML page.

New Output:

So OnHasTask displays us proper output i.e. for f1() and f2()

Angular has its own Zone called NgZone

NgZone is forked zone with additional API’s based on Observables

  • onTurnStart()-Emits before turn starts

  • onTurnDone()-Emits after turn is done

Whenever this events are fired angular executes a function called tick().

The change detection tree:

Each Angular component has a Change Detection associated with it which is created at the application Startup time.

Now let’s have a look at our TodoItem component:

Here this Todo Object will receive a Todo object as input and emit an event if the todo status is toggled.

To illustrate further we add nested object

In the above code we observe that todo has a property owner which itself is an object with two properties i.e. first name and last name.

What does the Todo Item change detector look like?

We can observe at runtime what the change detector looks like. Let’s just add some code in the Todo class to trigger a breakpoint when a certain property is accessed.

While debugging when the breakpoint hits, we can watch the stack trace and observe change detection in action:

Now let’s understand the default change detection mechanism in work?

In the above image of JavaScript debugging we need to look into an important concept:

For each expression used in the project template, it's comparing the current value of the property used in the expression with the previous value of that property.

In the Image we can see that the property value before and after is different, it will set
isChanged to true, and that's all. Well Pretty close, its comparing values by using a method called
looseNotIdentical(), which is really just a === comparison with special logic for the
NaN case

Now let’s talk about the nested object that we talked about earlier

In the Change Detection Code we have written earlier. The properties of the nested object owner is being checked for differences.

Here first name of the property is being compared, But not the last name property.

Reason for it is last name is not used in the component template.

It is the same reason top-level id property of todo is not being compared.

What we have learned from the above example?

Well the answer is Angular Change Detection by default works by checking if the value of template expressions have changed.

Also the same process works for all the component of an angular application.

Now for a Surprising Conclusion to the above Analysis:

We concluded to the point that by default, Angular does not do deep object comparison to detect changes.

Hence it only takes into account properties used by the template.

Why does Angular Change Detection work like this?

As one of the main goals of Angular 2 & 4 is to be more transparent and easy to use, so that framework users don't have to go through great lengths to make the developer to debug the framework.

Hence he need not be aware of internal mechanisms in order to make it easy to use and more effective.

You might have heard that angular 1 had $digest() and $apply() and all the pitfalls of when to use them / not to use them.

Angular 2+ main goals are to avoid this.


In angular even if we have to check every single component every single time an event happens angular is fast enough to perform more than a hundred thousand checks in a matter of Milliseconds.

Well this mainly due to the fact that Angular generates VM friendly code.

When it is said that each component has its own change detector, it’s not like there’s this single generic thing in Angular that takes care of change detection for each individual component.

The Main reason for that is that it has to be written in a dynamic way, so that it can check every component no matter what its model structure looks like.

The JavaScript VMs do not like this sort of dynamic code, because they are unable to optimize it.

Hence it can be considered polymorphic as the shape of the objects isn’t always the same.

To solve this particular problem in angular change detector classes are created at runtime only, which is monomorphic because they know exactly what the shape of the component’s model.

Hence VM’s can perfectly optimize this code and make for a faster execution.

Comparison by Reference in Angular Change Detection:

In JavaScript the objects are mutable, and Angular desires to give full support out of the start.

Here Even something as simple as a TODO application would be tricky to build: So developers would have to be very careful to create a new Todo instead of simply updating the current properties.

The OnPush change detection mode

We should configure the todo List component to update itself as our todo list get really big only when changes occur in todo list.

So this can be done by changing the component change detection strategy to OnPush:

In our current application let's add a couple of buttons: one to toggle the first item of the list by mutating it directly, and another that adds a Todo to the whole list.

The code for the same looks like this:

  • The first button that we have i.e. "Toggle First Item" does not work! This is because the toggleFirst() method directly mutates an element of the list.

  • Todo List won’t detect this since its input reference todos didn’t change.

  • The second button does work. We can Notice that the method addTodo() creates a copy of the todo list, and then adds an item to the copy and finally replaces the todos member variable with the copied list. This will trigger change detection due the component detecting a reference change in its input and it received a new list. Directly mutating todo list in the second button will not work. Hence getting a new list paramount.

OnPush not just comparing inputs by reference, if you try to toggle a todo by clicking on it, the button still works

This is because on OnPush does not only check for a components input it will trigger when a component emits an event that will also trigger change detection.

But although allowing for better performance, the use of OnPush in our application comes at a high complexity cost if used with mutable objects. It might introduce bugs that are hard to reason about and reproduce. But there is a way to make the use of OnPush work.

We can use Immutable.js to simplify the building of Angular apps and resolve all its problems.

Understanding Mutable and Immutable objects


In this example VCardApp uses as a child component, which in turn has an input property vData.

We will pass data to that component with VCardApp’s own vData property.

In the example vData is an object with two properties.

To add to that there’s a method changeData(), which changes the name of vData.

The important part is that changeData() mutates vData by changing its name property.

The vData reference itself stays the same, even though that property is going to be changed.

Wondering when change detection is performed, assuming that some event causes changeData() to be executed? vData.name gets altered/changed before it gets passed to <v-card>.The <v-card>’s change detector now checks whether the given vData is still the exact same as before, and yes, it is. The reference hasn’t changed. Angular will perform change detection for that object anyways as name property is changed.

In JavaScript every objects are mutable by default (except for primitives) but angular has to be conservative and run change detection every single time for each and every component when an event happens.

This is where immutable data structures can help us solve this problem.

Immutable Objects

Immutable objects make it impossible for objects to change.

Which in turn means if we want to make a change in immutable object, we will always get a new reference with that change since the original object is immutable.

How can we use Immutable.js to improve angular change detection

So if we build our application using immutable objects and immutable lists only, it’s possible to Use OnPush everywhere transparently, without the risk of running into change detection bugs.

That’s cause because with immutable objects the only way to modify data is to create a new immutable object and replace the previous object.

Hence with an immutable object, we have the guarantee that:

  • A new immutable object will always trigger OnPush change detection.

  • We can’t accidentally create a bug by forgetting to create a new copy of an object because since only way to modify data is to create new objects.

Here a good choice for using immutable is to use the Immutable.js library it provides immutable primitives for building applications, like for example immutable objects (maps) and immutable lists.

One of the biggest differences between angular 1&2 change detection is as follows:

➢Angular 1 is unidirectional in data flow. Hence when the data on our controller classes gets updated, change detection runs and our view gets updated.

➢act of rendering the view does not affect the view itself, creating a loop like it could happen in the case.

➢This is called digest cycle in Angular 1.

Triggering a change detection loop in Angular

There is one way we can do it by using lifecycle callbacks.

In our example in the todolist component we can trigger a callback to another component that will change one of the bindings:


This Error might show up in your console as you run this code in your machine.

EXCEPTION: Expression '{{message}} in App@3:20' has changed after it was checked

Don’t get scared or disheartened this error message will only appear if we are running Angular project in development mode.

Let’s see what will happen when enable production mode.

This error will not appear and the issue would remain undetected in production mode.

Activating and Deactivating Change Detection and triggering it manually

Some times in our project there may be special cases where it may need to turn off change detection.

Let’s imagine a situation where a lot of data arrives from the backend via a websocket.

We may be interested in updating a certain part of the UI only once every 5 seconds. To do the same, we begin with injecting the change detector into our component:

As shown above, we just detached the change detector, which effectively turns off change detection. Then we simply trigger it manually every 5 seconds by calling detectChanges ().


The Angular 2+ inbuilt change detection mechanism is actually quite similar to Angular 1.

As it compares the values of templates expressions before and after a browser event to see if anything has changed and it does so for all components. But there are also some stark differences:

For once there are no change detection loops, or a digest cycle as it was named in Angular 1. This allows us to understand change detection better in each component just by looking at its template and its controller.

The Change detectors are much quicker due to inherent working mechanism.

Now for a last argument the angular 2+ change detection mechanism is customizable which angular 1 lacks.

SQL Server interview questions, c# interview questions, .NET interview questions, ASP.NET interview questions

How to create an OLAP Cube?

This article will have no theory rather than it will have only be demonstrating practical step by step in detail included to create SSAS OLAP Cube: -

Creating SSAS project

Click on Start Menu -> then Microsoft SQL Server 2012 -> Click on SSDT.

Click File -> New -> Project ->Business Intelligence Projects ->select Analysis Services Project-> Assign

Project Name -> Click OK

Step 1 :- first go and select the “New Project”.

Step 2 :- Select the analysis Services inside the “Business intelligence”.

Step 3 :- Then go and select the “Analysis Serices Multi-Dimensional and Data mining… Business Intelligence”.

Step 4  :- put the project “Name”.

Step 5 :- Click “OK”.

Creating New Data Source

Data Source  :- In data Source we define where is the RDBMS.

Then go to the Solution Explorer.

Step 1 :- Right click on Data Source

Step 2 :- Click New Data Source

Data Source Wizard

Then you right click on the “Data Sources” actually open the wizard see the below :-

Click to “Next”.

Creating Connection Manager

For create a data source based on an existing or New Connection than click on the “New” as see the below :-

Then you click on the new its open the “Connection manager”.

Step 1 :- Give the Server name where your Data Warehouse was created.

Step 2 :- Give the connection to the database.

Step 3 :- Clicks “OK”.

Select the Connection created in the Data connection  :- click “Next”.

Impersonation information

Select the “Inherit” option.

Completing the Wizard

Step 1 :- Give the Data Source Name

Step 2 :- Click Finish

Now it is ready to use “Data Source”.

Creating New Data Source View

Data view  :- it is helps you decouple physical database structure from SSAS database Structure. It is helps to choose which table should participate in the SSAS project.

You have different logical structure in the data Source view and physical structure can be different view all together. We can go and defined the relationship between Fact Table and Dimension Table. It is nit effect the SQL Server data structure.

Then go to the Solution Explorer,

Step 1 :- Do a right Click on Data Source View.

Step 2 :- Then click on New Data Source View.

Data source view wizard

Then open the “data source view wizard” and click “Next”.

Select Relational Data Source we have created previously than Click Next.

Select table and views

First move your Fact Table to the right side to include in object list.

Select MyFactTable -> Click on Arrow Button to move the selected object to Right Pane.

Now to add dimensions which are related to your Fact Table, follow the given steps :-

Select Fact Table in Right Pane (Fact product Sales) -> Click On Add Related Tables

It will add all associated dimensions to your Fact table as per relationship specified in your CutromerHouse and click “Next”.

Completing the Wizard for data source view

Step 1 :- Name (CustomerHouse)

Step 2 :- Click Finish

Now Data Source View is ready to use.

Creating New Cube

Step 1 :- First go to the Solution Explorer

Step 2 :- Right Click on Cube

Step 3 :- Click New Cube

Cube Wizard

When you click on the “New Cube” It’s the wizard. Then click “Next”.

Creation Method

Step 1 :- Select Option Use existing Tables

Step 2 :- Click Next

Measure Group Tables for selecting Fact

Step 1 :- Select Fact Table Name from Measure Group Tables (CustomerHouse)

Step 2 :- Click Next

Measures Group Tables for selecting Measures

Step 1 :- Choose Measures from the List which you want to place in your Cube

Step 2 :- Click Next

Measures Table

Step 1 :- Select All Measures here which are associated with your Fact Table

Step 2 :- Click Next

New Dimension for Cube

Step 1 :- Select All Dimensions here which are associated with your Fact Table

Step 2 :- Click Next

Completing the Wizard

Cube Name (CustomerHouse) -> Click Finish

Now your Cube is ready, you can see the newly created cube and dimensions added in your solution explorer.

Hope that you have understood practical steps required to create CUBE in SSAS. If you want to revise MSBI practically project based then we suggest start with following SSIS video: -

SQL Server interview questions, c# interview questions, .NET interview questions, ASP.NET interview questions

Instrumentation is SSIS using Data Taps

In this short article we will hover around some important questions related to Instrumentation done in SSIS using Data Taps. We will only discuss about the theoretical part to make reader’s base stronger so that afterwards when practical is done it will become more effective.

What is the need of Data Taps?

  • Data Taps are nothing but they are like Data Viewer which we use in our SSIS package to view what data is passing through between Components.

  • So the importance of Data Taps is to view the data between components and this Data Taps is used in the production environment and not in development environment.

Differentiate between data viewer & data taps?

  • The main difference between data viewer & data taps is that though they both are used to view data between the components in SSIS package, but they both are implemented in different environments.

  • Data viewer is used when we want to view the data between the components in our development environment.

  • Data Taps is used when we want to view the data between the components in SSIS during production environment.

Differentiate between debugging & instrumentation?

  • The main difference between debugging & instrumentation is that when we want to debug our package in the development environment, we call it as Debugging.

  • And when we want to debug our SSIS package during the production environment we call it as Instrumentation.

Explain the importance of Identification String in data taps?

  • The identification string in our SSIS package is that thing which says that the data is coming from the control flow to data flow or the data is passing between the components in our data flow.

  • Now every component is connected with another component through a path. And every path has a connection string which identifies that the path is between these two components.

  • Now in data taps to reach to this path we have to specify that to access the path we have to go through the Control Flow then Data Flow and then we have to enter the identification string which is our path which is identified by some connection string.

  • So Control Flow/Data Flow/Identification String.

In which path does the data tap dump data?

The data tap usually dumps the data in our local machine C drive. For example, the path will be

C:\Program Files\Microsoft SQL Server\110\DTS\DataDumps

That’s all for article, before winding up this article we would also like to suggest go and refer to SSIS project video link which is the first video from project series named “Learn MSBI in 4 days” as below: -

SQL Server interview questions, c# interview questions, .NET interview questions, ASP.NET interview questions

Create job using SQL Server Agent step by step.

In MSBI while working on SSIS projects we have to run repetitive task which has to carried out daily like running package or to take weekly backup and making such task as automated is the

smart choice. For this we have expert present within SQL Server often commonly referred as SQL Server agent. In this article we will step by step how to create job using SQL Server agent.

Use of SQL Server Agent

  • SQL Server Agent is a service which is used to perform jobs or tasks in a Scheduled manner. Now for example if we want to update our SSAS cube whenever our Fact table gets updated, so we create a job which will run on a fix schedule and that job will update the SSAS cube. So for this thing we use SQL Server Agent.

  • So this SQL Server Agent is a service or a utility provided by SQL Server to do jobs or processes in background in a scheduled manner.

Steps for creating the Job:

Step 1: First of all start the SQL Server Agent in the object explorer. Now we can start this service from the object explorer in SQL management studio and also we can start this service from the services in our machine.

Once the SQL Server Agent is started it will show green color sign. Here in the above image we can see that the SQL Server Agent is already started.

Step 2: Now go to the Jobs folder in the SQL Server Agent and select the option new Job.

Then we will see the following window :-

We will give a name for our job.

Step 3: After giving the name we will then write down the steps which will be there in our job, so that when our job is executing these steps will be executed as well.

Now in the step we will have to copy paste our XMLA query and select other options like,

Step 4: Now after creating steps we will now create a schedule so that our job can run in the background.

Now we can fill all the details as per our convenience or choice what will be our schedule, when the job will repeat itself, etc. we can see in the above image what all fields have to be filled.

After creating the schedule, all the steps are completed and then we can select OK and our Job will be created. We can see our created job in the Jobs folder in SQL Server Agent.

By following the above steps we can create a job and also we can run XMLA query in SQL Server Agent.

Invoking SSAS cube processing from SSIS:

We can also make a SSAS cube in our SSIS and process the cube from SSIS. To do that we can follow the steps here:

Step 1: Create a new SSIS package and then from the SSIS toolbox and select the component “Analysis Services Processing Task”.

Step 2: Now we will configure the “Analysis Services Processing Task”.

Here in the configuration we will give our analysis connection name and add the object lists, like which all objects Facts, dimensions we want to add. In short it asks us what objects we want to add for processing.

And that’s it; these are the steps for invoking SSAS cube through SSIS.

Below is one start-up video for SSIS to start with project: -