Browse by Tags

All Tags » snippet » sql (RSS)
Sorry, but there are no more tags available to filter with.
select case when dbid = 32767 then 'resource' else db_name(dbid) end [db_name] , object_schema_name(objectid,dbid) [schema_name] , object_name(objectid,dbid) [object_name] , sum(usecounts) [executions] , max(max_execution_time) [last_execution_time...
Posted by royashbrook | with no comments
Filed under: ,
Great useful base diag scripts! Snipped from http://glennberrysqlperformance.spaces.live.com/blog/cns!45041418ECCAA960!893.entry -- SQL Server 2005 Emergency Diagnostic and Performance Queries -- Glenn Berry 3-17-2008 -- Step 1 - Check Task Manager. Are...
Posted by royashbrook | with no comments
Filed under: ,
select top 10 t.text , s.last_execution_time , * from sys.dm_exec_query_stats s cross apply sys.dm_exec_sql_text(s.sql_handle) t where t.objectid is not null and text like '%procname%' order by s.last_execution_time desc obviously replace procname...
Posted by royashbrook | with no comments
Filed under: ,
EXEC sp_configure @configname = 'Show Advanced Options', @configvalue = 1 RECONFIGURE WITH OVERRIDE GO EXEC sp_configure @configname = 'clr enabled', @configvalue = 1 RECONFIGURE WITH OVERRIDE GO EXEC sp_configure go
Posted by royashbrook | with no comments
Filed under: ,