SolvedPrivate

Outputting SSIS 2008 package results to Command Window

Posted on 2014-02-07
4
37 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
  • 3
4 Comments
 

Author Comment

by:blossompark
Comment Utility
currently looking at this dtexec  option
/CONSOLELOG
0
 

Accepted Solution

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

Author Comment

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

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now