SSIS Audit Transformation

Posted by on Jul 11, 2011 in SQL Server, SSIS | No Comments

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.

Reza Rad
Reza Rad is an Author, Trainer, Speaker and DW/BI Consultant. He has a BSc in Computer engineering; he has more than 15 years’ experience in databases, programming and development mostly on Microsoft technologies. He is a Microsoft MVP in Data Platform for seven continues years (from 2011 till now) for his dedication in Microsoft BI. He is author of some SQL Server and BI books, and also Power BI online book; from Rookie to Rock Star.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">