Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

PracticalSQLDba

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.

SQL Server: Part 2 : Approaching Database Server Performance Issues

In the Part 1, we have seen how quickly we can check the runnable task and I/O pending task on an SQL server instance. This  is very light weight script and it will give the result even if the server is under pressure and will give an over all…

Read more

2 comments, 2,298 reads

Posted in PracticalSQLDba on 21 September 2012

SQL Server: Part 1 : Approaching Database Server Performance Issues

When you work as DBA, many people will approach you with a complaint like "Application is taking ages to load the data on a page,could you please check something going wrong with database server?" There might be hundred of other reason for slowness of the page.It might be a Problem…

Read more

0 comments, 353 reads

Posted in PracticalSQLDba on 18 September 2012

How to Connect PerfMon to a Remote Server ?

Till now, we do not have any third party tool to monitor the SQL server, but we have implemented many custom alerts and report to help us in this regards.As our environments are growing,  we have decided to evaluate couple of third party monitoring tools. Yesterday we have installed the Red Gate  SQL…

Read more

1 comments, 832 reads

Posted in PracticalSQLDba on 17 September 2012

SQL Server: String Pattern Matching

It is common scenario that, we might need to extract the data from the SQL server based on some pattern. For example extract all customers information who has a valid PAN card number (XXXXX0000X). SQL server is not very powerful in pattern matching.We can easily implement simple pattern matching but…

Read more

1 comments, 713 reads

Posted in PracticalSQLDba on 13 September 2012

SQL Server: Understanding GAM and SGAM Pages

We know that SQL server stores the data in 8 KB pages. An extent is made up of 8 physically contiguous pages.When we create a database, the data files will be logically divided into the pages and extents.Later, when user objects are created, the pages are allocated to them to store…

Read more

1 comments, 1,608 reads

Posted in PracticalSQLDba on 12 September 2012

SQL Server : Usage of OVER Clause

Over  clause can be used in association with aggregate function and ranking function. The over clause determine the partitioning and ordering of the records before associating with aggregate or ranking function. Over by clause along with aggregate function can help us to resolve many issues in simpler way. Below is a sample…

Read more

3 comments, 3,413 reads

Posted in PracticalSQLDba on 10 September 2012

SQL Server:Output Clause

Couple of days back, one of my colleague came to me asking for help. He is inserting multiple record from a XML to a table which has identity column . He need those newly generated identity values to insert into one more supporting table. This is a very common scenario and…

Read more

0 comments, 361 reads

Posted in PracticalSQLDba on 9 September 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

3 comments, 1,266 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

7 comments, 1,109 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

1 comments, 932 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

3 comments, 1,964 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

2 comments, 1,722 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

1 comments, 1,339 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

2 comments, 452 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

0 comments, 667 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? 

At…

Read more

1 comments, 2,166 reads

Posted in PracticalSQLDba on 1 August 2012

SQL Server : Dedicated Administrator Connections

Think about a scenario : People are complaining about your production database server.Many users are getting continuous time out error. Rest of the users are not able to connect database server.When you tried to  run your diagnostic query , either you are not able to connect or it is not…

Read more

1 comments, 1,458 reads

Posted in PracticalSQLDba on 30 July 2012

Windows Cluster: Moving Quorum Disk to Another Node

In my earlier post I have explained about various quorum settings available in Microsoft windows 2008 cluster environment. While we plan to perform the maintenance in a cluster environment ,as per the design, it is not mandatory to move  the resources and witness disk manually  to another node.…

Read more

0 comments, 1,743 reads

Posted in PracticalSQLDba on 23 July 2012

Windows Cluster : Understanding the Quorum settings

In my earlier post , I have explained about the windows cluster and how Sql server works on cluster environment. In this post let us try to understand the quorum settings of windows cluster environment. When I say quorum, do not interpret as quorum disk. Quorum has literal meaning in…

Read more

2 comments, 700 reads

Posted in PracticalSQLDba on 18 July 2012

SQL Server: Instant Deadlock Alert Using WMI in Your Mailbox

In my last post I have explained,how to setup alert for blocking using WMI. In this post let us see how to set up an alert for dead lock, which will help us to trouble shoot the dead lock scenarios.

As I explained in the last post, we need to…

Read more

8 comments, 2,135 reads

Posted in PracticalSQLDba on 16 July 2012

Newer posts

Older posts