Feeds:
Posts
Comments

Archive for the ‘SQL Server DBCC’ Category

We often need to find the last running query or based on SPID need to know which query was executed. SPID is returns sessions ID of the current user process. The acronym SPID comes from the name of its earlier version, Server Process ID. To know which sessions are running currently, run the following command: [...]

Read Full Post »

Some time ago I was helping one of my Junior Developers who presented me with an interesting situation. He had a table with Identity Column. Because of some reasons he was compelled to delete few rows from the table. On inserting new rows in the table he noticed that the rows started from the next [...]

Read Full Post »

Just a day ago I have received following email from Siddhi and I found it interesting so I am sharing with all of you. Hello Pinal, I have seen many blogs from you on SQL server and i have always found them useful and easy to understand. Thanks for all the information you provide. I [...]

Read Full Post »

Just another day I was playing with my query which I posted earlier SQL SERVER – 2008 – 2005 – Find Longest Running Query – TSQL and I found that I got error devide by zero. I have fixed this error in following query as well I have updated query to return time in millisecond [...]

Read Full Post »

Previously I posted SQL SERVER – Find Row Count in Table – Find Largest Table in Database – T-SQL. Today we will look into the same issue but with some additional interesting detail. We can find the row count using another system SP sp_spaceused. This SP gives additional information regarding disk space reserved on database [...]

Read Full Post »

Older Posts »

Follow

Get every new post delivered to your Inbox.

Join 15,916 other followers