Home » Designing Audit table for Data Warehouse

Designing Audit table for Data Warehouse

Designing Audit table for Data Warehouse.

Step1: Create a table with no refential integrity or identity first using script below.(Alter as needed)
Create Audit Table

Step2:Insert Default rows before adding any referential integrity or identity to avoid errors(It is Initial seeding of the Audit Table.

Insert_Default_Values

Step 3: Add the identity and referential integrity to the table.

Adding_Referencial_Integrity

Step4: Add Identity property to Auditkey column by going into Design Table by right clicking table.
And then making identiy yes as shown below:

Leave a Reply

Your email address will not be published. Required fields are marked *