Audit database with DBCC & sys.dm_exec_requests (Tips)

Posted on Updated on


You can follow different aspects of your database, put the focus on the following subjects, for example :

– Ensure that the index and data pages are correctly linked.

– Pointers are consistent.

For this used the command DBCC with type CHECKTABLE.

DBCC CHECKTABLE ('Clients') WITH PHYSICAL_ONLY
GO

However you can edit different aspects, below a link that describes every possible aspect was audited

Link : https://technet.microsoft.com/en-us/library/aa258281(v=sql.80).aspx

We will change perimeters we will look a blocked processing, suspended, however, the proposed solution remains little used, unlike sp_who2 ou sp_who,

This is the table which must be selected : sys.dm_exec_requests.

SELECT 
session_id,
status,
blocking_session_id,
wait_type, 
wait_time,
wait_resource,
transaction_id 
FROM sys.dm_exec_requests 
WHERE status = N'suspended';
GO

GC.Collect

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s