 Hello, welcome to SSUnitech, so see this site and this is continuation of SSIS tutorial. So today we gonna discuss about logging. If you haven't watched last video of this video series, so I would strongly recommend to watch that video before going forward. So let's start with logging. So logging is a method or way in which we can save the runtime information of the package in different formats and with logging we can capture the runtime information about a package that would help us to audit and troubleshoot a package on every execution. It writes log entries when runtime event occurs like on error event, on post execute event, on prep execute event, so such type of events occur then it will write log entries and we can also write custom message and create custom log providers. The integration service log provider can write log entries to text file, SQL server profiler, windows event log, XML and SQL server table. So there are five type of log providers or label in SSIS and we will discuss one by one. So let's start with our first log provider that is our SSIS log provider for text files. So it write log entries to text file in comma separated values in CSV format and default file name extension for this provider is .log. So go to SSDT to understand about this log provider. So here I would like to add one more package and call this package as login. This is part one. Now I need to use a execute SQL task then we can configure this execute SQL task. Here I would like to make a connection so click on new connection. As I have already made the connection so I want to use that one click on OK. In SQL statement I would like to write a query select 1 divide by 0. So it will reflect an error once our package will be executed. Click on OK. So on every execution this package will be failed and we want to capture the error message in our text file. So here right click on this package then go to our login. So inside this login as we can see we have package then we have task. So we can select on package in provider type we can see we are having five types as we have discussed. So first is text file now click on add. Once we add then we need to configure our connection manager for flat file. So new connection then I wish to create a file at runtime now we can browse. So in this folder I wish to create file with the name of log txt and format would be our txt. Now we can click on open again. So we have configured our flat file connection manager. Now go to details. In details as we can see we have multiple events so we want to capture the information if error will be occurred in our package and here we can see we are having on information on post execute on post welded and many more events. So we don't want to capture the information for all the events I am happy to use on irrelevant. Now go to on advance. So inside this advance as we can see we are having multiple options. So first it will store the information of computer name then we have operator name then source name source ID so I am not going to capture the source ID execution ID but I want to capture master text and data bytes. Now click on ok. Now we can save this package. So we have done our package. So once our package will be executed then this package will be failed. So it will generate a text file at the runtime and that would contain the information of error message and many more information which we have captured. Now we can click on start. So package failed as we can see this is our text file. Now we can open this file and here as we can see this is our computer name and this is our operator name and we are having error message so that should be available over here. So we can see executing this query failed with the following error and our error would be divided by 0 error encountered. So this is our error. So we can store the information in text file and in your second we can also store the information of SSIS log provider in sys. So it would write log entries to sys.log table in sys.database So go to our sys.database and stop this package. Then go to our login. So here we can also select from this SSIS then login. This time I would like to use SQL Server. Now we can click on add and we can select. Then it would ask for connection manager. So click on new connection. So as I have already made the connection. So click on OK. So it will store the information in this database. Now go to one details and here I would like to store the information of errors. That is fine. Advance. So here as we can see we want to capture the information as we have captured in text file. Now click on OK. Now we can save it and now I wish to execute our package. So before executing this package go to one ssms. So here as we can see inside this system table we are not having sys sys log table. So once our package will be executed then that table will be created. Now I can click on start. So package failed as we were expected stop this package and go to one ssms. And here we can refresh this and we are having sys sys log table. Now we can drag and drop and we can select and here we are having the information as we have captured in text file. So this is for SQL Server. If we want to store the information in our SQL Server table. So we can use this approach. In our next video we will discuss about sys log provider for SQL Server profiler. Then we will discuss about sys log provider for windows event log and sys log provider for XML files. So thank you so much for watching this video. If you like this video please subscribe our channel to get many more videos. Don't forget to press the bell icon to get the notification of our newly uploaded videos. Thank you so much.