Logging is not working while running SSIS package from Batch file

ajay rawat 116 Reputation points
2021-04-14T21:18:02.883+00:00

Hi Everyone,

I created an SSIS package and in that, I used SSIS Logging (SSIS Log Provider for SQl Server) created a log table in the SQL database.
When I am running the package from BIDS everything is getting logged properly in the Logging table.
Problem is coming when I am running the package from batch file nothing is getting logged in Table.
Can anyone help me out why this is happening?

Thanks

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
1,857 questions
No comments
{count} votes

Accepted answer
  1. Monalv-MSFT 5,686 Reputation points
    2021-04-15T08:26:42.887+00:00

    Hi @ajay rawat ,

    1.Could you please share the screenshots about your setting the SSIS logging in package?

    2.Please check if you write the batch file successfully.

    @ECHO OFF  
    CLS  
    ECHO You are about to execute the TestPackage SSIS package  
    PAUSE  
    "C:\Program Files\Microsoft SQL Server\140\DTS\Binn\DTEXEC.exe" /File "C:\Mona\SSIS\2021\4Apr\Pro\Integration Services Project3\Package.dtsx"  
    PAUSE  
    

    3.Hope the following link and pictures will be helpful:
    How to execute an SSIS package from the command line or a batch file

    88018-editssislog1.png
    88105-editssislog2.png
    88106-batchfile.png
    88164-executepacakgewithbatch.png
    88157-ssisloginssms.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.

    No comments

2 additional answers

Sort by: Most helpful
  1. ajay rawat 116 Reputation points
    2021-04-15T15:15:34.513+00:00

    Hi Mona,

    Thanks for explaining so briefly.
    I am also doing the same steps.
    Logging is running fine when i am running it from BIDS.
    When i am running it from below batch script nothing is getting logged.

    This is my batch script content

    @Echo OFF
    CLS
    ECHO You are about to execute the TestPackage SSIS package
    PAUSE
    "C:\Program Files\Microsoft SQL Server\150\DTS\Binn\DTExec.exe" /File "C:\Workspace\DataMigration\SSISDataMigration\DataMigration.dtsx" /CONFIGFILE "C:\Workspace\PackageDeployment\Config.dtsConfig"
    PAUSE

    No comments

  2. ajay rawat 116 Reputation points
    2021-04-16T00:27:12.14+00:00

    Thanks for help, Issue got resolved by installing SSIS services.
    Below is the Link that helped me .
    https://www.mssqltips.com/sqlservertip/6635/install-ssis/