Change Tracking Live Data Warehouse

Slides:



Advertisements
Similar presentations
By: Jose Chinchilla July 31, Jose Chinchilla MCITP: SQL Server 2008, Database Administrator MCTS: SQL Server 2005/2008, Business Intelligence DBA.
Advertisements

A comparison of MySQL And Oracle Jeremy Haubrich.
Change Data Capture & Change Tracking Deep Dive
Auditing Database DDL Changes with SQLVer. About PASS The PASS community encompasses everyone who uses the Microsoft SQL Server or Business Intelligence.
Course Topics Administering SQL Server 2012 Jump Start 01 | Install and Configure SQL Server04 | Manage Data 02 | Maintain Instances and Databases05 |
Best Practices for Data Warehousing. 2 Agenda – Best Practices for DW-BI Best Practices in Data Modeling Best Practices in ETL Best Practices in Reporting.
Data Warehousing Seminar Chapter 5. Data Warehouse Design Methodology Data Warehousing Lab. HyeYoung Cho.
Database Technical Session By: Prof. Adarsh Patel.
Sofia, Bulgaria | 9-10 October SQL Server 2005 High Availability for developers Vladimir Tchalkov Crossroad Ltd. Vladimir Tchalkov Crossroad Ltd.
By Lecturer / Aisha Dawood 1.  You can control the number of dispatcher processes in the instance. Unlike the number of shared servers, the number of.
DBSQL 14-1 Copyright © Genetic Computer School 2009 Chapter 14 Microsoft SQL Server.
SQL Server 7.0 Maintaining Referential Integrity.
Understanding SQL Server 2008 Change Data Capture Bret Stateham Training Manager Vortex Learning Solutions blogs.netconnex.com.
Views Lesson 7.
SQL Server 2005 Implementation and Maintenance Chapter 12: Achieving High Availability Through Replication.
Enterprise Database Administration & Deployment SIG ▪ 313M ▪ Sept 29, 2005 ▪ 10:15 AM SQL Server 2005 Performance Diagnosis and Tuning using SQL Tools.
© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. Slide 1.
DATABASE REPLICATION DISTRIBUTED DATABASE. O VERVIEW Replication : process of copying and maintaining database object, in multiple database that make.
Please note that the session topic has changed
SQL SERVER AUDITING. Jean Joseph DBA/Consultant Contact Info: Blog:
Log Shipping, Mirroring, Replication and Clustering Which should I use? That depends on a few questions we must ask the user. We will go over these questions.
SQL Server Replication HILARY COTTER SQL SERVER MVP
Does the Optimistic Concurrency resolve your blocking problems Margarita Naumova, SQL Master Academy.
7.5 Using Stored-Procedure and Triggers NAME MATRIC NUM GROUP Muhammad Azwan Bin Khairul Anwar CS2305A Muhammad Faiz Bin Badrol Shah CS2305B.
1 Copyright © 2005, Oracle. All rights reserved. Oracle Database Administration: Overview.
SQL Server DML Change Capture An overview of several useful SQL Server data change capture technologies Matt Smith Software Architect, Enterprise Data.
Session Name Pelin ATICI SQL Premier Field Engineer.
Carlos Bossy Quanta Intelligence SQL Server MCTS, MCITP BI CBIP, Data Mining Real-time Data Warehouse and Reporting Solutions.
11 Copyright © 2009, Oracle. All rights reserved. Enhancing ETL Performance.
Database Design: Solving Problems Before they Start! Ed Pollack Database Administrator CommerceHub.
With Temporal Tables and More
SQL Server Statistics and its relationship with Query Optimizer
Introduction to OpenEdge Change Data Capture
Katowice,
Temporal Databases Microsoft SQL Server 2016
Temporal Databases Microsoft SQL Server 2016
Antonio Abalos Castillo
What’s New in SQL Server 2016 Master Data Services
Troubleshooting SQL Server When You Cannot Access The Machine
Dynamic SQL: Writing Efficient Queries on the Fly
A time travel with temporal tables
Example of a page header
Presented by: Warren Sifre
Download Microsoft Exam Dumps - Valid Microsoft Question Answers - Realexamdumps.com
Performance Monitoring Using Extended Events, DMVs & Query Store
Marcos Freccia Stop everything! Top T-SQL tricks to a developer
Populating a Data Warehouse
Traveling in time with SQL Server 2017
Populating a Data Warehouse
BRK2279 Real-World Data Movement and Orchestration Patterns using Azure Data Factory Jason Horner, Attunix Cathrine Wilhelmsen, Inmeta -
SQL Azure Database – No CDC, No Problem!
SQL SERVER 2014 Change Data Capture Dave Bland
Populating a Data Warehouse
Populating a Data Warehouse
Dynamic SQL: Writing Efficient Queries on the Fly
Implementing Row Level Security (RLS)
Microsoft SQL Server 2014 for Oracle DBAs Module 7
Please thank our sponsors!
Cloud Data Replication with SQL Data Sync
Please support our sponsors
11 Simplex or Multiplex?.
Contents Preface I Introduction Lesson Objectives I-2
TechEd /3/ :48 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Andrew Fryer Microsoft UK
Distributed Availability Groups
Lecuter-1.
David Gilmore & Richard Blevins Senior Consultants April 17th, 2012
T-SQL Tools: Simplicity for Synchronizing Changes Martin Perez.
Implementing ETL solution for Incremental Data Load in Microsoft SQL Server Ganesh Lohani SR. Data Analyst Lockheed Martin
Presentation transcript:

Change Tracking Live Data Warehouse Andrea Besozzi – Data Technical Manager Gibraltar @ Kindred Group Using Change Tracking to build a Live Data Warehouse © Kindred Group plc 2018

Andrea Besozzi Using Change Tracking to build a Live Data Warehouse Data Technical Manager Gibraltar @ Kindred Group plc 16+ years as SQL Professional MCSE: Data Management and Analytics Gibraltar SQL Server User Group leader © Kindred Group plc 2018

Agenda Benefits of live data Change Tracking in detail Live DW cycle Deal with deletions Live DW and performance considerations Tips and tricks Q & A © Kindred Group plc 2018

Benefits of live data Why we need live data? Live dashboards, alerts, monitoring Live marketing campaigns 24/7 systems and customer support Impact on releases is immediate. No more sleepless nights thinking the ETL might fail © Kindred Group plc 2018

Change Tracking – Overview What is Change Tracking? Lightweight and efficient mechanism to track changes Easy to set up and use Synchronous process It doesn’t require schema changes What does it track? Inserts, Updates, Deletes © Kindred Group plc 2018

Change Tracking – Overview What does it store? One row per Primary Key Version number Change operation Transaction datetime Ability to know what column was changed © Kindred Group plc 2018

Change Tracking – Alternatives Change Data Capture It keeps the history of every change Bigger overhead than CT Service Broker Asynchronous message queuing system Real nightmare to set up and maintain © Kindred Group plc 2018

Change Tracking – Alternatives Replication Heavy impact on performance Difficult to maintain and get rid of Triggers Dangerous if not aware of them Require custom objects and logic to be created © Kindred Group plc 2018

Change Tracking – Requirements and recommendations SQL Server 2008 or newer versions Primary Keys on source tables Permissions: ALTER permission on source database and tables SELECT and VIEW CHANGE TRACKING permission on source tables Recommendations: Primary Keys on staging and DW tables Log change versions in a table © Kindred Group plc 2018

Change Tracking – Setup and configuration Enable CT on database Enable CT on table © Kindred Group plc 2018

Change Tracking – Objects Functions: CHANGETABLE (CHANGES) CHANGETABLE (VERSION) CHANGE_TRACKING_MIN_VALID_VERSION() CHANGE_TRACKING_CURRENT_VERSION() CHANGE_TRACKING_IS_COLUMN_IN_MASK() Views: sys.change_tracking_databases sys.change_tracking_tables sys.dm_tran_commit_table sys.internal_tables Stored procedures: sp_flush_commit_table_on_demand (undocumented) © Kindred Group plc 2018

Change Tracking – Querying changes Get maximum version number for a database Get changes for a table © Kindred Group plc 2018

Live DW cycle © Kindred Group plc 2018

CT and Live DW – Demo © Kindred Group plc 2018

Deal with deletions Deletions are tracked, but only PK values are returned Understand actions to be taken on deletions: Never delete rows from staging tables Delete Live DW rows on main table deletions Update Live DW rows on left joined table deletions Consider when to read or ignore staging table deletions (Change Operation = D) © Kindred Group plc 2018

Live DW considerations Building a Live DW is generally more complex than a classic DW More objects to be developed Deletions may be tricky Extra indexes and columns needed Troubleshooting is generally more time consuming Keep it simple, it can become messy otherwise Remember to populate from scratch new tables © Kindred Group plc 2018

Performance considerations Performance impact on DML commands Impact on storage Internal tables Change operation and version columns Clean up process can cause blocking User queries and reports can affect ETL © Kindred Group plc 2018

Tips and tricks Process only required changes Enable CT only where needed Monitor and get alerted: ETL failures and performance Auto clean up process Choose the retention period wisely Performance is key © Kindred Group plc 2018

Resources Change Tracking https://docs.microsoft.com/en-us/sql/relational-databases/track-changes/about-change-tracking-sql- server CT Functions https://docs.microsoft.com/en-us/sql/relational-databases/system-functions/change-tracking-functions- transact-sql CT Views https://docs.microsoft.com/en-us/sql/relational-databases/system-catalog-views/change-tracking- catalog-views-sys-change-tracking-databases https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management- views/change-tracking-sys-dm-tran-commit-table https://docs.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-internal-tables- transact-sql Slides and demo scripts will be uploaded to the SQLBits website © Kindred Group plc 2018

FEEDBACK FORMS Please fill out and pass to your room helper before you leave the session © Kindred Group plc 2018

Q & A © Kindred Group plc 2018

Andrea Besozzi andreabesozzi@hotmail.com Thank you! Andrea Besozzi andreabesozzi@hotmail.com © Kindred Group plc 2018