?
SolvedPrivate

Outputting SSIS 2008 package results to Command Window

Posted on 2014-02-07
4
Medium Priority
?
41 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
A couple of weeks ago, my client requested me to implement a SSIS package that allows them to download their files from a FTP server and archives them. Microsoft SSIS is the powerful tool which allows us to proceed multiple files at same time even w…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

719 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