Logging in SSIS (XML File Log Provider)

12
41168
ssis logging xml

Friends,

SQL Server Integration Services includes log providers that you can use to implement logging in packages, containers, and tasks. With logging, you can capture run-time information about a package, helping you audit and troubleshoot a package every time it is run. For example, a log can capture the name of the operator who ran the package and the time the package began and finished.

Let’s start with how to open Logging wizard. There are two places from where you can launch the logging wizard. Firstly, right click on anywhere in the package there will be an option called Logging click on that. Secondly, You can go to the top bar and from where you can select SSIS and inside that you find an option for Logging.

 

Now select Logging option, it will open the Logging Wizard

Here you can see Containers on the left hand side which the packages ,task and containers that are available and for that you can create a log. Logs are associated with packages and are configured at the package level. Each task or container in a package can log information to any package log. The tasks and containers in a package can be enabled for logging even if the package itself is not. For example, you can enable logging on an Execute SQL task without enabling logging on the parent package. A package, container, or task can write to multiple logs. You can enable logging on the package only, or you can choose to enable logging on any individual task or container that the package includes.

On right hand side you see Provider and Logs means where you want to log and another one is Details means what you want to log. Will see both the tab one by  one .Let’s start with Provider and Logs tab and in that Provider Type. It has Five provider type, Here will discuss SSIS log provider for XML Files.

Now Select SSIS log provider for Xml files and select Add.

Create a connection to your Xml file where you want to log. I am creating a new Xml file to save the logs into it by clicking on “New Connection”. I am creating a LogXml.xml file on the desktop. Now select OK

Now, As explained above you can create logs at any level I mean at package level , container level, as well as at task host level. Here is my package.

It has one package and into that it has three task Execute SQL Task ,For Each loop Container and File System Task. I want to create logging at File system Task level. So I select the file system task from the container list and then check the SSIS Log provider for XML Files which I just added.

Now I Select the Details tab on the top at right hand side. It shows that what are the information you want to know and want to store in your log provider. You select all the option or the only those which you want to show. In my case I will check all of them. There is one more option at the bottom called Advanced. In advanced u can see more details.

Now press ok. Now we are good to go. Execute the package and if my package failed it will log all the information in the SQL server database what I provided. So lets Execute.

As you see my Package got failed so there must be a Xml file created at Desktop called LogXml.xml.

So, here your XML file that contains all the log information you needed. That is it guys !! Happie Coding !!

Regards,
Roopesh Babu V

12 COMMENTS

  1. Бетон от надежного производителя в Нижнем Новгороде, Бетонные смеси в Нижнем Новгороде: лучшие предложения, Бетон в Нижнем Новгороде: актуальные предложения, с профессиональным обслуживанием, Купить бетон на заводе в Нижнем Новгороде, Купить бетон оптом в Нижнем Новгороде: лучшие предложения, Бетонные решения на заказ в Нижнем Новгороде, с гарантией качества, с высоким уровнем сервиса
    купить бордюры в нижнем новгороде https://1beton-52.ru/ .

  2. The only difference between the two would be, as anxiety and its persistence increases, so will the number, type, intensity, frequency, and duration of anxiety symptoms increase.
    Does the vardenafil covered anthem . Purchase orders now!
    People at the highest risk for flu should still receive the injected vaccine.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

nineteen − = eleven