Download presentation
Presentation is loading. Please wait.
Published byAndrew Williamson Modified over 9 years ago
1
Adam Machanic Database Consultant SQLblog SESSION CODE: DAT318
2
Independent SQL Server and.NET Consultant Boston, MA Conference and INETA Speaker Connections, PASS, TechEd, DevTeach, etc. Author SQL Server 2008 Internals Expert SQL Server 2005 Development Co-Founder: SQLblog.com The SQL Server Blog Spot on the Web
3
Change Detection: A Primer and Prehistory Change Tracking: Which Rows Changed? Change Data Capture: What Changed? SQL Audit: Who Made a Change? (or: Who Read My Data?)
4
Change Detection: A Primer and Prehistory Change Tracking: Which Rows Changed? Change Data Capture: What Changed? SQL Audit: Who Made a Change? (or: Who Read My Data?)
7
T0: Txn 1 Starts Time (T) T1: Txn 2 Starts T1: Txn 2 Ends T3: App Requests Changes T4: Txn 1 Ends
9
Change Detection: A Primer and Prehistory Change Tracking: Which Rows Changed? Change Data Capture: What Changed? SQL Audit: Who Made a Change? (or: Who Read My Data?)
14
Database Commit Table xact_id – transaction identifier commit_ts – the external version # Change Table xact_id xact_sequence xact _operation (I,U,D) Base Table PK cols Base Table xact_id – what transaction last modified the row? (hidden column) 1: Transaction Starts xact_id generated 2: Rows Modified xact_id used in base and change table 3: Transaction Committed commit_ts generated
17
SNAPSHOT Transaction ? Is MIN_VALID_VERSION > [version from the last collection] … or … Does [version from the last collection] == 0 Call CHANGETABLE in VERSION mode Get the initial snapshot Call CHANGETABLE in CHANGES mode Get changes since the last collection Collect CHANGE_TRACKING_CURRENT_VERSION Store for the next iteration YES NO
19
Change Detection: A Primer and Prehistory Change Tracking: Which Rows Changed? Change Data Capture: What Changed? SQL Audit: Who Made a Change? (or: Who Read My Data?)
26
Step 1: Rows Modified, Transaction Committed Step 2: Sometime later… Log Reader kicks in, reads the changes from the log Step 3: Change information written to table in CDC schema
29
Change Detection: A Primer and Prehistory Change Tracking: Which Rows Changed? Change Data Capture: What Changed? SQL Audit: Who Made a Change? (or: Who Read My Data?)
31
Advanced tracing infrastructure—new in SQL Server 2008 SQL Audit is built on top of XEvent Similar scope to SQL Trace, but much bigger surface area Designed from the ground up for performance and scalability
39
Required Slide Track PMs will supply the content for this slide, which will be inserted during the final scrub.
40
www.microsoft.com/teched www.microsoft.com/learning http://microsoft.com/technet http://microsoft.com/msdn
42
Sign up for Tech·Ed 2011 and save $500 starting June 8 – June 31 st http://northamerica.msteched.com/registration You can also register at the North America 2011 kiosk located at registration Join us in Atlanta next year
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.