SolvedPrivate

Outputting SSIS 2008 package results to Command Window

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL - format decimal in a string 5 40
sql 2016 Integration Service connecting to 2012 3 33
TSQL Challenge... 7 37
shrink table after huge delete 2 18
My client sends a request to me that they want me to load data, which will be returned by Web Service APIs, and do some transformation before importing to database. In this article, I will provide an approach to load data with Web Service Task and X…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

808 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