Friday, July 13, 2012

Microsoft SQL Server Lock Escalation

Lock escalation is dynamically managed by Microsoft SQL Server. It is process of conversion of row locks and page locks into table locks thereby “escalating” the smaller or finer locks.

Lock escalation increases the system performance as each lock is nothing but a memory structure. Too many locks would mean more consumption of memory. Hence, escalation is used.

Blocking in Microsoft SQL Server

Blocking is one of the main problem which Microsoft SQL Server experience. Blocking happens due to following reason :

When one connection from an application holds a lock and a second connection requires a conflicting lock type. This causes the second connection to wait, blocked on the first. 


Second connection will be active only when first connection release lock required by second connection.

Failover Clustering in Microsoft SQL Server

Failover clustering in Microsoft SQL Server is used for data availability.

Typically two machines are used in a failover cluster. One machine provides the basic services and the second is available to run the service when the primary system fails. 


The primary system is monitored periodically to check if it works. This monitoring may be performed by the failover computer or an independent system also called as cluster controller. 


In an event of failure of primary computer, the failover system takes control.

Builtin Administrator Account in Microsoft SQL Server

Every Instance of Microsoft SQL Server has Built in Administrator Account. It is used during some setup to join some machine in the domain.

Built in Administrator account in Microsoft SQL Server should be disabled immediately thereafter. 


For any disaster recovery, the built in administrator account will be automatically enabled. It should not be used for normal operations.

Microsoft SQL Server Public Role

In Microsoft SQL Server, every database has a public role which holds all the default permissions for the users in database.

Public role in Microsoft SQL Server cannot be dropped and we cannot assign roles or groups to it. 


Minimum permissions should be granted to public role, due to security reasons.