SolvedPrivate

Outputting SSIS 2008 package results to Command Window

Posted on 2014-02-07
4
40 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

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

623 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