Skip to main content

Microsoft SQL Server and the Change Data Capture Capabilities

 

In 2005, Microsoft was the first database platform to introduce Change Data Capture with “after date”, “after delete”, and “after insert” features. However, it had certain flaws and it was only in 2008 that an updated CDC was launched. It was very effective with several optimized functionalities. Till 2016, SQL Server Change Data Capture was available only in the high-end Enterprise Edition after which it was offered as standard for all versions.


SQL Server Change Data Capture tracks and captures changes that occur in the SQL Server database tables without any additional applications or programs. After all insert, update, and delete activities applied to SQL Server tables are captured and recorded by SQL Server Change Data Capture, the details are available in a user-friendly relational format. Metadata and column information required for entering changes to the target database are captured in modified rows and stored in changed tables that replicate the structure of the columns in tracked source tables.

The data that is present after SQL Server Change Data Capture in additional columns are in the following structure.

·        __$start_lsn and __$end_lsn that show the commit log sequence number (LSN) assigned by the SQL Server Engine to the recorded change

·        __$seqval that shows the order of that change related to other changes in the same transaction, __$operation that shows the operation type of the change, where 1 = delete, 2 = insert, 3 = update (before change), and 4 = update (after change)

·        __$update_mask that is a bitmask defined for each captured column, identifying updating columns

These are some features of the SQL Server Change Data Capture.


Comments

Popular posts from this blog

Migrating Databases from Microsoft SQL Server to Snowflake

In today’s business environment that is mostly data-driven, organizations are continually looking for ways that optimize their data storage and computing capabilities. Those on Microsoft-based databases can do so too, one reason why the preference is migrating databases from Microsoft SQLServer to Snowflake. Snowflake is a data warehousing solution with all the benefits of the cloud. It offers unlimited storage capabilities and users can scale up and down paying only for the resources used. Snowflake also provides unmatched computing powers and does not have any drop in performance or speed lag even when multiple users are simultaneously executing intricate queries. It is for all these factors and more that database migration from SQL Server to Snowflake   is such an attractive proposition today. Database migration from SQL Server to Snowflake There are four steps in database migration from SQL Server to Snowflake. In the first, data is extracted from the SQL Server using queries f...

What Can You Do with the SAP ETL Tool

  ETL (Extract, Transform, Load) is an optimized tool that extracts, transforms, and loads data from multiple sources into a centralized data repository or a data warehouse. Its advantage is that it can extract data in native form like unstructured or structured and transform into the desired format before loading it into the target destination. The SAP ETL Tool   also integrates various systems and transforms different data formats into each other. The SAP ETL Tool   moves data to and from the SAP ecosystem and runs checks to verify if the value of a name has been defined and also to clean the data. The unique benefit of this tool is that data can be extracted and transformed even outside the application. Migrating data from SAP or non-SAP sources to target the HANA database is also done through the SAP Data Services using the SAP ETL Tool, thereby enabling businesses to run data analytics in the application layer only. However, it is essential to first define the flow...