SSIS Audit Transformation

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail
FacebooktwitterlinkedinrssyoutubeFacebooktwitterlinkedinrssyoutube

The Audit Transformation in SSIS Data Flow task purposed to fetch some of system variables besides data stream columns to create a log for data stream, 

You can audit transformation with source columns to have columns data besides audit information like guid of package, name of data flow task, time of execution and few other variables.

This post explains how to use Audit transformation in action.

First of all, we should set a source for our data flow scenario,

let’s choose Production.Product table  in AdventureWorks sample database,

so create a package, add a data flow task , and add an oledb source pointing to AdventureWorks db, and select Production.Product as source table,

then add an Audit transformation, connect data path from source to this transformation, and go to audit transformation editor,

choose every Audit types you want, you can see list of audit types and description of them as below :

For this sample select all audit types, when you choose an audit type an output column with same name will be create, you can change name of each column as you want.

 Now add an OLE DB Destination , pointing to another database, and click on New button. with clicking the new button, SSIS will generate the script for creation of destination table based on input columns,you can see audit columns there also, look at highlighted section in image

Now when you go to columns mappings tab of Destination you will see all columns mapped automatically,

That’s all, you can run the package now, and data will add into destination with audit information,

Run the package twice to see the result.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail
FacebooktwitterlinkedinrssyoutubeFacebooktwitterlinkedinrssyoutube
Reza Rad on FacebookReza Rad on LinkedinReza Rad on TwitterReza Rad on Youtube
Reza Rad
Trainer, Consultant, Mentor
Reza Rad is a Microsoft Regional Director, an Author, Trainer, Speaker and Consultant. He has a BSc in Computer engineering; he has more than 20 years’ experience in data analysis, BI, databases, programming, and development mostly on Microsoft technologies. He is a Microsoft Data Platform MVP for nine continuous years (from 2011 till now) for his dedication in Microsoft BI. Reza is an active blogger and co-founder of RADACAD. Reza is also co-founder and co-organizer of Difinity conference in New Zealand.
His articles on different aspects of technologies, especially on MS BI, can be found on his blog: https://radacad.com/blog.
He wrote some books on MS SQL BI and also is writing some others, He was also an active member on online technical forums such as MSDN and Experts-Exchange, and was a moderator of MSDN SQL Server forums, and is an MCP, MCSE, and MCITP of BI. He is the leader of the New Zealand Business Intelligence users group. He is also the author of very popular book Power BI from Rookie to Rock Star, which is free with more than 1700 pages of content and the Power BI Pro Architecture published by Apress.
He is an International Speaker in Microsoft Ignite, Microsoft Business Applications Summit, Data Insight Summit, PASS Summit, SQL Saturday and SQL user groups. And He is a Microsoft Certified Trainer.
Reza’s passion is to help you find the best data solution, he is Data enthusiast.

Leave a Reply