For a sample set of data, the Stack overflow public available dataset for SQL Server is used. The inserts are focused against the comments table within the dataset.
A T-SQL test harness is constructed for the workload scenario. The test harness, consisting of T-SQL tables and dynamic SQL procedures is added into the Stack overflow database.
A random load SQL Server table is constructed and populated by T-SQL storage procedures, to be the source for the insert statements. This random data load generator provides real-life randomized attribute results and the associated data types. A separate row count audit table is created with the following attributes:
This audit table is also added to the Stack overflow database. This SQL table allows us to confirm that the newly inserted records are properly committed at the source and target, before and after the failover.
The entire T-SQL test harness engine and associated logging failed over and failed back as shown in the following tests.