DBCC (Transact-SQL) Overview
SQL Server 2012 Posted from TechNet The Transact-SQL programming language provides DBCC statements that act as Database Console Commands for SQL Server. Database…
Read MoreSQL Server 2012 Posted from TechNet The Transact-SQL programming language provides DBCC statements that act as Database Console Commands for SQL Server. Database…
Read MoreThis post will demonstrate how to run the undocumented DBCC PAGE command to view the properties of a page. First we execute the…
Read MoreViews – 1470
Read MoreWhen you restore a transaction log using the NORECOVERY option, SQL Server does not need to analyze the transaction log and roll back…
Read More1. The command parser evaluates the query and generates a hash to see if the buffer pool has an execution plan already stored.…
Read More
1 2 3 4 5 6 7 8 |
SELECT OBJECT_NAME(objectid) ,BlockTime = total_elapsed_time - total_worker_time ,execution_count ,total_logical_reads FROM sys.dm_exec_query_stats qs CROSS apply sys.dm_exec_sql_text(qs.sql_handle) ORDER BY total_elapsed_time - total_worker_time DESC |
Views – 1870
Read More
1 2 3 4 |
SELECT DISTINCT objname = object_name(p.object_id) FROM sys.partitions p JOIN sys.dm_tran_locks t1 ON p.hobt_id = t1.resource_associated_entity_id |
Views – 1637
Read MorePosted on June 17, 2009 by Derek Dieter Finding the lead blocker in a chain of blocks is a difficult challenge when using…
Read MoreTemp tables are your friend, but there are other options. One of those is using a local TABLE variable table in your query.…
Read More
1 2 3 4 |
EXEC sys.sp_check_log_shipping_monitor_alert SELECT secondary_database, last_restored_date FROM msdb.dbo.log_shipping_secondary_databases |
First check the last file copied and restored to the secondary. Run the following queries on the secondary node. The following query…
Read More