SolvedPrivate

Outputting SSIS 2008 package results to Command Window

Posted on 2014-02-07
4
39 Views
Last Modified: 2016-02-10
I have a package that I run from BIDs
dte-test1.jpgand it outputs messages to the execution results tab…
dte-test2.jpgusing the C# Script
  public void Main()
        {
            // TODO: Add your code here
        
            String[] DEPOSFiles = Directory.GetFiles(Dts.Variables["User::DirectoryPath"].Value.ToString());
            if (

                 (DEPOSFiles.Length != 0))
            {
                Dts.Variables["User::FileExistsFlg"].Value = 1;
            }
            else
            {
                Dts.Variables["User::FileExistsFlg"].Value = 0;
            }
            bool fireAgain = false;
            Dts.Events.FireInformation(1, "TEST!!!!!!!!!!!!!!!!!!", "Put a message here", "", 0, ref fireAgain);
            Dts.TaskResult = (int)ScriptResults.Failure;
        }
    }

Open in new window


When I run this package using DTEXEC.EXE, I can see some of the error messages outputted in the execution results tab of BIDS, outputted in the command prompt window, but not the ones I want…
C:\Program Files\Microsoft SQL Server\100\DTS\Binn> dtexec.exe /File "C:\Users\Documents\Visual Studio 2008\projects\DTEXE_TEST\DTEXE_TEST\dtexe_test.dt
sx"
Microsoft (R) SQL Server Execute Package Utility
Version 10.50.1600.1 for 32-bit
Copyright (C) Microsoft Corporation 2010. All rights reserved.

Started:  10:41:33
Error: 2014-02-07 10:41:33.96
   Code: 0x00000008
   Source: Script Task
   Description: The script returned a failure result.
End Error
Warning: 2014-02-07 10:41:33.96
   Code: 0x80019002
   Source: dtexe_test
   Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution
 method succeeded, but the number of errors raised (1) reached the maximum allow
ed (1); resulting in failure. This occurs when the number of errors reaches the
number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the e
rrors.
End Warning
DTExec: The package execution returned DTSER_FAILURE (1).
Started:  10:41:33
Finished: 10:41:33
Elapsed:  0.125 seconds

C:\Program Files\Microsoft SQL Server\100\DTS\Binn> dtexec.exe /File "C:\Users\L
IDC666\Documents\Visual Studio 2008\projects\DTEXE_TEST\DTEXE_TEST\dtexe_test.dt
sx"
Microsoft (R) SQL Server Execute Package Utility
Version 10.50.1600.1 for 32-bit
Copyright (C) Microsoft Corporation 2010. All rights reserved.

Started:  10:46:32
DTExec: The package execution returned DTSER_SUCCESS (0).
Started:  10:46:32
Finished: 10:46:32
Elapsed:  0.11 seconds

C:\Program Files\Microsoft SQL Server\100\DTS\Binn>

Open in new window


How can I get custom messages displayed
for example
"TEST!!!!!!!!!!!!!!!!!!",
in the command prompt window when a package  run from DTEXEC.EXE fails?
0
Comment
Question by:blossompark
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 

Author Comment

by:blossompark
ID: 39841610
currently looking at this dtexec  option
/CONSOLELOG
0
 

Accepted Solution

by:
blossompark earned 0 total points
ID: 39841619
ok using this option displays the messages
/REP V
0
 

Author Comment

by:blossompark
ID: 39841621
I've answered this question myself, can I close it and keep it in my history?
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My client has a dictionary table. They're defining a list of standard naming convention. Now, they are requiring my team to provide us a mechanism how to match new incoming data with existing data in their system.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question