Loading...

MS SQL Server Interview Questions and Answers Complete List Download

Here I am providing some SQL server interview questions which are very helpful in interviews. Interview Questions and Answer contains questions from beginner to advance users. Many of my friends have asked me to write on SQL server where they can get all the information to be a good database developer. These sql server interview questions provide a lot of information.

Some of the questions which I have covered are as follows.

What Is Database?
What is Relational Database?
Explain some SQL Server Query?
What are the null values in SQL SERVER?
What is normalization?
What are different normalization forms?
What is Stored Procedure?
What is Trigger?
Difference between Triggers and Stored Procedures
What is View?
What is partitioned view?
What is Index?
What is cursor?
Types of cursors:
What is difference between DELETE & TRUNCATE commands?
What is User Defined Functions?
Difference between Function and Stored Procedure?
What types of Joins are possible with SQL Server?
What is SQL Profiler?
What is SQL server agent?
What is OLTP (OnLine Transaction Processing)?
What is a transaction and what are ACID properties?
...and many more

You may download the attached file containing questions and answer. I welcome your comments






Debugging Stored Procedure

Introduction

Debugging is a necessary process in almost any new software development process.
We write complex business logic in store procedure and many companies using store procedure extensively. One of my ERP project have stored procedure which has more then 50 thousand lines and it was very difficult for me to debug them. I had struggled with really challenging bugs in my SQL store procedures. I had been spending many days and sometime weeks just to figure out the exact error for my store procedures.
I am sharing my experience so that you can gain from knowledge and improve your debugging skill for SQL store procedure.
Reader is assumed to have basic knowledge of Visual Studio and SQL store procedures.


Demonstration

To follow this demonstration you need SQL server and Microsoft Visual Studio.
So let’s start step-by-step tutorial for debugging SQL sever 2005 store procedure using Visual Studio IDE.
Add data connection in your Visual Studio 2005. 
We first need data connection.
To add a data connection in the Visual Studio 2005 Servers windows right click on "Data Connections" and click on "Add New Connection"


Provide credential for Northwind database

Once we are connected to Northwind database we will have following window

We will debug usp_Region_Insert in our tutorial. You may use different server as well as procedure.
Open the procedure in code window
Debugging Procedure

Right click on usp_Region_Insert store procedure and click "Step Into Stored Procedure"


We will be asked to provide parameters.
I have provided RegionID = 5 and RegionDescription = Southwest

Debugger will execute first line and wait for our instruction.
If you are using VB [F-8] or C# [F-11] is your key to execute next line of code.
We can step by step execute each line of code and debugger will show the value of the variable. We can even modify the value while debugging.
Hovering your mouse on the variable will provide value of it.
We can place breakpoints in a store procedure that is very useful if you are dealing with large store procedure

Conclusion
Debugging is a huge step forward and I am sure it will be very much useful to you.
By now you can debug any store procedure.
I have tried to keep this tutorial as simple as I can, but if you have any queries or comments please feel free to write at umisha.shah@gmail.com.



Older Posts

Contact Me

© Copyright Source Code World | Designed By Code Nirvana
Back To Top