locked
Error trapping in SSSIS RRS feed

  • Question

  • HI,

    How do I generate an error output file for my package, while executing it from Query window.

    I use /Vlog "C:\Error.txt, but its not generating the error file.

      SELECT @cmd =  'dtexec /F "C:\XXXSync\XXX_XUsers1\Package\Sync_XUsers.dtsx" /CHECKPOINTING OFF /REPORTING E ' +               
     ' /set \package.variables[User::XXXPersonList].Value;' +'"' +  @person_output +'"' +               
     ' /set \package.variables[User::XXXAddressList].Value;' +'"' + @address_output +'"' +               
     ' /set \package.variables[User::XXXAddressUsageList].Value;' +'"' + @addressusage_output +'"' +               
     ' /set \package.variables[User::XXXPreferences].Value;' +'"' + @preferences_output +'"' +               
     ' /set \package.variables[User::XXXPerContNumber].Value;' +'"' + @phonenumber_output +'"' +               
     ' /set \package.variables[User::XXXAirlineCards].Value;' +'"' + @airlinecard_output +'"' +               
     ' /set \package.variables[User::SPID].Value;' +'"' + @m_SPID +'"' +               
     ' /set \package.variables[User::XXXPassports].Value;' +'"' + @passport_output +'"'  +

    '/Vlog "C:\Error.txt'

    Tuesday, August 5, 2014 9:49 AM

Answers

All replies

  • I think you should wrap C:\Error.txt within double quotes as: 

    SELECT @cmd =  'dtexec /F "C:\XXXSync\XXX_XUsers1\Package\Sync_XUsers.dtsx" /CHECKPOINTING OFF /REPORTING E ' +                
     ' /set \package.variables[User::XXXPersonList].Value;' +'"' +  @person_output +'"' +                
     ' /set \package.variables[User::XXXAddressList].Value;' +'"' + @address_output +'"' +                
     ' /set \package.variables[User::XXXAddressUsageList].Value;' +'"' + @addressusage_output +'"' +                
     ' /set \package.variables[User::XXXPreferences].Value;' +'"' + @preferences_output +'"' +                
     ' /set \package.variables[User::XXXPerContNumber].Value;' +'"' + @phonenumber_output +'"' +                
     ' /set \package.variables[User::XXXAirlineCards].Value;' +'"' + @airlinecard_output +'"' +                
     ' /set \package.variables[User::SPID].Value;' +'"' + @m_SPID +'"' +                
     ' /set \package.variables[User::XXXPassports].Value;' +'"' + @passport_output +'"'  +

    '/Vlog "C:\Error.txt"'


    Nitesh Rai- Please mark the post as answered if it answers your question

    Tuesday, August 5, 2014 10:16 AM
  • Hi Sudhakar,

    If I understanding correctly, you are going to output the error message to a file error occur in the SSIS package, right?

    In this case, here is a blog which describe how to do it step by step, please refer to the link below to see the details.
    http://www.c-sharpcorner.com/UploadFile/muralidharan.d/demo-2-error-handling-in-ssis-packages/

    If I have anything misunderstood, please point it out.

    Regards,


    Charlie Liao
    TechNet Community Support

    • Proposed as answer by Charlie Liao Wednesday, August 13, 2014 8:08 AM
    • Marked as answer by Charlie Liao Monday, August 18, 2014 9:50 AM
    Thursday, August 7, 2014 2:08 AM