Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15694

SQL Server 2008 CDC?

$
0
0

Hello:

I have CDC (Change Data Capture) enabled for 3 tables. due to heavy workload\INSERT, my CDC Capture Job is set to continous.when i run my DMVs i see that column waittype & last waittype is "WAITFOR" for column TEXT = sp_CDC_scan and this store proc is used by CDC Capture Job. As my DMVs also has join with sys.dm_os_tasks where pending_io_count = 25718193 is showing high number.

i don't see any blocking and task_state (sys.dm_os_tasks) is SUSPENDED and total_elapsed_time is 732784540.

i want to know if it is by design or i am missing something over here.

As per Sanjay Mishra whitepaper "WAITFOR is executed when a scan cycle drains the log completely or whenmaxscans scan cycles are completed."

http://msdn.microsoft.com/en-us/library/dd266396(v=sql.100).aspx

in that case my pending_io_count should have less count or 0.

The DMV query that i ran is shown below.

Any help or pointer is greatly appreciated.

Thanks

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

DMV Query:-

SELECT
REQ.session_id,SQLT.text,REQ.start_time,REQ.status AS REQ_STATE,REQ.total_elapsed_time, REQ.wait_type,REQ.command,REQ.blocking_session_id,
REQ.last_wait_type,REQ.wait_resource,

    OT.task_state,
    OT.pending_io_count,
    OT.pending_io_byte_count,
    OT.pending_io_byte_average,
    QP.query_plan
  FROM sys.dm_exec_requests REQ
  CROSS APPLY sys.dm_exec_sql_text(REQ.sql_handle) as SQLT
  OUTER APPLY sys.dm_exec_query_plan(REQ.plan_handle) as qp
  JOIN sys.dm_os_tasks OT
  ON REQ.task_address = OT.task_address
  ORDER BY REQ.session_id DESC
GO


Viewing all articles
Browse latest Browse all 15694

Trending Articles