Log in | Register

Rahul Sharma, Author at SQL Server Blogs, Events, Webcasts, Videos, SQL Server learning & education Rahul Sharma, Author at SQL Server Blogs, Events, Webcasts, Videos, SQL Server learning & education

RahulSharma

SQLServerGeeks Annual Summit 2016 IS HAPPENING IN BANGALORE. HAVE YOU REGISTERED?

About Rahul Sharma

This author has not yet filled in any details.
So far Rahul Sharma has created 19 entries.

Query to find the size of the database and database file

Hi All,

Query to find the size of the database and database file is a simple and most common requirement. There are many ways & techniques to do this. Here are ‘just’ some of them:

Technique 1:

Gives you the database size and certain more properties of it:

Technique 2: For a specific database:

And you get the following output: […]

Find the Size of all Tables in a Database – SQL Server Query

Hi All,

Find the Size of all Tables in a Database is a simple and most common requirement. And whenever I come across these requirements, I get a little nervous since I am not very good in coding/programming. I wonder how these Poker games online like http://de.partypoker.com/ program the entire thing. Anyways, back to the […]

SQL Server 2012 DENALI-new DMV- sys.dm_os_windows_info

Dear All,

As I mentioned in my last few posts, I have started exploring new DMVs and some enhancements to existing DMVs in SQL Server 2012 DENALI. My last few posts talked about sys.dm_exec_query_stats & sys.dm_os_volume_stats

Today, I will talk about sys.dm_os_windows_info – this DMV returns information about the operating system & version. Before I show […]

SQL Server 2012 DENALI new DMV- sys.dm_os_volume_stats

Dear All,

As I mentioned in my last post, I have started exploring new DMVs and some enhancements to existing DMVs in SQL Server 2012 DENALI. In my last post I talked about sys.dm_exec_query_stats

Today, I will talk about sys.dm_os_volume_stats – this DMV returns information about the operating system volume on which the specified databases and […]

SQL Server 2012: DENALI-new columns added to sys.dm_exec_query_stats

Dear All,

I have started exploring new DMVs and some enhancements to existing DMVs in SQL Server 2012 (DENALI).

Today, I will talk about sys.dm_exec_query_stats – this DMV is heavily used to troubleshoot long running queries. Four new columns have been added to this DMV which are as follows:

Description of columns extracted from MSDN)

total_rows
bigint
Total number of […]

SQL Server: Did someone talk about DBCC ROWLOCK? – Its discontinued !

Today, at my workplace, we talked about locking and DBCC ROWLOCK came up. Many of you know, but I still want to say – it has been deprecated now.

If I am not mistaken, DBCC ROWLOCK was used in ver 6.5 to lock a row explicitly in INSERT operations. But that is automatic now. Locking […]

SQL Server: Removing a specific plan from the plan cache using DBCC FREEPROCCACHE

Dear All,

It is possible to remove a single, specific plan from the plan cache. DBCC FREEPROCCACHE optionally accepts a parameter, plan_handle, which uniquely identifies a particular plan. But before you supply a plan_handle, you need to extract one from the plan cache for your query in question. Let us see:

Suppose you run this query:

You […]

SQL Server error message severity levels – sys.messages

There are about 98000 error messages as of SQL Server 2008 – including repitions for all the languages supported.

sys.messages catalog view represents one row per error message.

You can simply run select * from sys.messages to see all the error messages. You can see that every message has a unique message_id and the description in  […]

Detect SQL Server CPU Pressure

Dear All,

The other day I saw a blog post from Amit regarding version store troubleshooting. I have been involved in similar scenarios of performance issue where the SQL Server box is undergoing CPU pressure – most of the times the Processor – Processor Time counter is choked at 100%. There is one way to […]

Newsletter_Footer