Arun Kumar

Arun Kumar has over 8 years' extensive working experience in database query development, design, supporting many different versions of MS-SQL. He has worked to develop efficient reports, index optimization for complex queries, and has finance and operation domain experience. He has also worked with SPLUNK and enjoys training technical and non-technical colleagues.
  • Interests: Database developer and designing

Blog Post

Find Most executed queries

SELECT TOP 50
QueryState.execution_count
,OBJECT_NAME(objectid)
,query_text = SUBSTRING(
qt.text,
QueryState.statement_start_offset/2,
(CASE WHEN QueryState.statement_end_offset = -1
THEN len(convert(nvarchar(max), qt.text)) * 2
ELSE QueryState.statement_end_offset
END - QueryState.statement_start_offset)/2)
,qt.dbid
,dbname = db_name(qt.dbid)
,qt.objectid
FROM sys.dm_exec_query_stats QueryState
CROSS APPLY sys.dm_exec_sql_text(QueryState.sql_handle) as qt
ORDER BY...

2018-09-18

2,086 reads

Blog Post

Get all queries running against any specific table

/*Get list of all queries hitting any specific tables*/SELECT DISTINCT TOP 100ProcedureName = OBJECT_SCHEMA_NAME(sqlTxt.objectid) + '.' + OBJECT_NAME(sqlTxt.objectid),SQLStatement = SUBSTRING(sqlTxt.Text,(QueryState.statement_start_offset/2)+1,CASE QueryState.statement_end_offsetWHEN -1 THEN DATALENGTH(sqlTxt.text)ELSE QueryState.statement_end_offsetEND...

2018-09-18

3,826 reads

Blogs

Don’t Miss Out – SQL Server 2025 Unleashed Training Starts Next Monday!

By

Next Monday, March 9, 2026, my one-day live online training SQL Server 2025 Unleashed:...

What is ALM in Fabric?

By

As someone who’s worked with data for over 20 years and with many cloud...

The Most Successful Startups in 2025 — And What They Have in Common

By

2025 belongs to the AI startups. If you peek into the tech headlines, you’ll...

Read the latest Blogs

Forums

A Quick Restore

By Steve Jones - SSC Editor

Comments posted to this topic are about the item A Quick Restore

Guarding Against SQL Injection at the Database Layer (SQL Server)

By tedo

Comments posted to this topic are about the item Guarding Against SQL Injection at...

Ola Hallengren Index Optimize Maintenance can we have data compression = page

By JSB_89

I have a quick question on Ola Hallengren Index Optimize Maintenance . Do we...

Visit the forum

Question of the Day

A Quick Restore

While doing some testing of an application, I wanted to reset my environment after doing some testing with this code:

USE DNRTest

BACKUP DATABASE DNRTest TO DISK = 'dnrtest.bak'
GO
/*
Bunch of stuff tested here
*/RESTORE DATABASE DNRTest FROM DISK = 'dnrtest.bak' WITH REPLACE
What happens if this runs, assuming the "bunch of stuff" isn't anything affecting the instance.

See possible answers