Expensive Queries of a database

Share via:

Expensive Queries of a database

Following Query will find the expensive queries on specific database on SQL Instance.

select DB_NAME(s.dbid) DBNAME , t.Text, spid from sysprocesses s
CROSS APPLY sys.dm_exec_sql_text( s.sql_handle ) t
where DB_NAME(s.dbid) like ‘Database_Name%’

 

Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates

KTEXPERTS is always active on below social media platforms.

Facebook : https://www.facebook.com/ktexperts/
LinkedIn : https://www.linkedin.com/company/ktexperts/
Twitter : https://twitter.com/ktexpertsadmin
YouTube : https://www.youtube.com/c/ktexperts
Instagram : https://www.instagram.com/knowledgesharingplatform

Share via:
Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (10 votes, average: 4.90 out of 5)
Loading...

2 thoughts on “Expensive Queries of a database

Leave a Reply to Manikanta Cancel reply