SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in


I have total of 11 years of IT experience with Application development, Database Development and Database Administration. I have worked with different version of SQL server from 7.0 to 2008.Started my carrier as VB ,VC++ and database developer in a banking sector for implementing their core banking solution. Currently working as Database Administrator with wide knowledge in performance tuning, high availability solution, troubleshooting and server monitoring. This blog is my humble attempt to share my knowledge and what I learned from my day to day work.

Archives: August 2012

SQL Server:Understanding the Data Record Structure

In our last post, we have gone through the data page structure and we have noticed that there is an overhead of 7 bytes in each records. Let us try to understand how SQL Server stores the records in a data pages.

Data record stores actual data. In other…

Read more

9 comments, 4,849 reads

Posted in PracticalSQLDba on 22 August 2012

SQL Server: Understanding the Data Page Structure

We all know very well that SQL server stores data in 8 KB pages and it is the basic unit of IO for SQL server operation. There are different types of pages like data , GAM,SGAM etc. In this post let us try to understand the structure of data pages.

Read more

18 comments, 4,473 reads

Posted in PracticalSQLDba on 12 August 2012

SQL Server: List Explicit Permission on Database for Login and Database Role

As part of security audit of login's, we have discussed earlier about the orphan users , listing server level and database level role membership.To keep the the SQL server secure, it is very important to review the permission/authorization  level of users in database. A user can have access on database in two ways,…

Read more

11 comments, 4,360 reads

Posted in PracticalSQLDba on 7 August 2012

SQL Server: How Recursive Common Table Expression (CTE) Works ?

Last Friday evening, I forced to look into a procedure which is using Recursive Common Table (CTE) . The procedure was not returning the result.I was not very comfortable with the recursive CTE as I am not able to visualize the execution of recursive CTE. After struggling for an hour ,…

Read more

9 comments, 9,587 reads

Posted in PracticalSQLDba on 6 August 2012

SQL Server : Lost all Administrator Account in SQL Server and Forgot sa Account Password

What will happen if you lost all your administrator account by mistake ? As per the best practice you have disabled the sa login. Those who had login with sysadmin rights left the company or not able to remember their password. Now you do not have any login with sysadmin…

Read more

13 comments, 6,874 reads

Posted in PracticalSQLDba on 6 August 2012

SQL Server : List Login's Database and Server Level Role Permission

In my last post, we have discussed about the orphaned users and fixing the orphaned users. The next step in the security audit of our server was to review the login's database role membership and server role membership. 

There is a system stored procedure sp_helpsrvrolemember to list server role…

Read more

25 comments, 6,618 reads

Posted in PracticalSQLDba on 5 August 2012

SQL Server : Fixing the Orphaned Users

In my last post , we have discussed about orphaned uses and how to find out the orphaned users. In this post let us see how to fix the orphaned users.

In the scenario where the login is got deleted , the orphan users can be fixed by dropping the…

Read more

7 comments, 1,366 reads

Posted in PracticalSQLDba on 2 August 2012

SQL Server:Finding the Orphaned Users

Orphaned user is a common problem in SQL server world.When I was working on internal security audit of our production servers, I realized that sp_change_users_login with report option will not work with users associated with the windows login.

Who is an Orphan Users?

An user in a database is called…

Read more

25 comments, 1,619 reads

Posted in PracticalSQLDba on 2 August 2012

SQL Server : Implementation of Table Valued Parameter (TVP)

Some time there will be situation in application , where a grid is populated with data and user has option to edit records or to add new records and save all his/her  changes in a single click on Save button. How do you save the data in the database? 


Read more

4 comments, 5,579 reads

Posted in PracticalSQLDba on 1 August 2012