SSIS Custom Logging

Padmanabhan, Venkatesh 246 Reputation points
2020-11-11T17:12:11.737+00:00

HI.
I am using SSIS 2016 and in my solution I have 4 packages. In the first package, which is set as starup object , I have added a flat file connection and using that as a custom information logger.

How to invoke this flat file connection in script task of the subsequent child packages, so that there is only one custom logger file created ?

In the parent package - in the script task, i have like this:

ConnectionManager cmError = Dts.Connections["CustomLog"];
string strLogpath = cmError.ConnectionString;
string textToWrite = Environment.NewLine + "Completed Reading config files. Invoking Child Package" + Environment.NewLine;
System.IO.File.AppendAllText(strLogpath, textToWrite);

SQL Server Integration Services
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Yitzhak Khabinsky 27,091 Reputation points
    2020-11-11T18:45:41.243+00:00

    I have added a flat file connection and using that as a custom information logger.

    Just switch that connection to the project level. To do that, right mouse click on the package level connection, there is an option to do that.

    0 comments No comments

  2. Monalv-MSFT 5,926 Reputation points
    2020-11-12T07:08:35.023+00:00

    Hi @Padmanabhan, Venkatesh ,

    We can right click the package connection manager and then choose "Convert to Project Connection".

    Please refer to the following link and picture:

    Package level and project level connection managers

    39263-converttoprojectconnection.png

    Best Regards,
    Mona

    ----------

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    Hot issues in November--What can I do if my transaction log is full?
    Hot issues in November--How to convert Profiler trace into a SQL Server table?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.