Ejemplo n.º 1
0
 protected void SafeExecute(DTS.Executable executable)
 {
     Vulcan.Common.ErrorEvents errorHandler = new Vulcan.Common.ErrorEvents();
     DTS.DTSExecResult         execResult   = executable.Execute(null, null, errorHandler, null, null);
     if (execResult == Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success && errorHandler.ValidationErrorCount == 0)
     {
         Message.Trace(
             Severity.Notification,
             "Success executing Task {0}",
             VulcanPackage.ExtractNameFromDTSExecutable(executable)
             );
     }
     else
     {
         Message.Trace(
             Severity.Error,
             "Error executing Task {0}: Result = {1} (BugBug: SSIS always returns success) but ErrorCount = {2}",
             VulcanPackage.ExtractNameFromDTSExecutable(executable),
             execResult, errorHandler.ValidationErrorCount
             );
     }
 }
Ejemplo n.º 2
0
        public void Execute()
        {
            if (_executable != null)
            {
                MessageEngine.Global.Trace(Severity.Alert, "Executing DTS Package {0}", Name);

                ErrorEvents       errorHandler = new ErrorEvents();
                DTS.DTSExecResult execResult   = _executable.Execute(null, null, errorHandler, null, null);
                if (execResult == Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success && errorHandler.ValidationErrorCount == 0)
                {
                    MessageEngine.Global.Trace(Severity.Notification, "Success executing Task {0}", Name);
                }
                else
                {
                    MessageEngine.Global.Trace(
                        Severity.Error,
                        "Error executing Task {0}: Result = {1} (BugBug: SSIS always returns success) but ErrorCount = {2}",
                        Name,
                        execResult,
                        errorHandler.ValidationErrorCount
                        );
                }
            }
        }