Quantcast
Channel: CodeSection,代码区,SQL Server(mssql)数据库 技术分享 - CodeSec
Viewing all articles
Browse latest Browse all 3160

What are transaction in SSIS?

$
0
0

Here we are using Transactions to make sure that if one component fails then the whole logical unit should fail.

On the second day of MSBI training in Mumbai here shown are the demonstration steps of Transaction practical in SSIS done by one of the candidate.

Here we want that when our State master component fails the whole logical unit should fail and no records should be updated in the database.


What are transaction in SSIS?

Following the error snapshot which is shown under Progress tab.


What are transaction in SSIS?

But here as we see in the above below image snapshot“ Country Master” data is getting loaded in the database even though the “State Master” failed.


What are transaction in SSIS?

Now what we want is that if one component loading gets failed then other component should not get executed in other words they should also fail and do not load any table values if any into the database.

So how we can achieve this?This can be done with the use of Transaction.

Transactions are logical grouping of components. So if one component is successful then the whole transaction is successful or if one component fails then whole transaction fails.

Following are the steps to enable Transaction on SSIS package.

On Control Flow pane go and do right click on the Sequence container and select “Edit” option.


What are transaction in SSIS?

On the Properties, select the “Transaction Option” as “Required” .


What are transaction in SSIS?

Now run the package and check execution result of it. You will see that whole “Sequence Container” fails to execute and red color cross mark is seen on the container as shown in the image down below.


What are transaction in SSIS?

Now execute a general query on the SQL Server Management Studio and check whether values of Country table is loading or not.

The Country data is not loaded since the State component failed and the whole Transaction failed.

Under below figure “Results” values of the Country table is not getting loaded so great after enabling Transaction in SSIS if one component fails then other component will also fails and whole package will stop.


What are transaction in SSIS?

Candidate practicing at MSBI training and submitting essential steps write-up required to complete practical not only help himself but also other readers in understanding steps.


Viewing all articles
Browse latest Browse all 3160

Trending Articles