How do I log Custom Messages to the Execution Report in SSIS 2012 - ssis-2012

When an exception occurs in the execution of a task, for instance a lookup task fails to find a match, I want to report that exception and the value it was looking for in the Execution Report. How do I do that? Is there a more appropriate way to do that in SSIS?

Without actually doing the work, I think you should use the No Match output, What´s the difference between Error output and "No match Output" in Lookup transformation SSIS , to pass the rows to a Script Task to log a warning, http://msdn.microsoft.com/en-us/library/ms136054.aspx , and you should be able to see the list of warnings in the Execution Report, http://www.rad.pasfu.com/index.php?/archives/78-SSIS-Catalog-Part-5-Logging-and-Execution-Reports.html .

Related

How can I suppress Extraction rule error in load test and make the test marked as pass?

In my web test, I have used a loop to redirect it to the previous request if it fails to get the expected response which includes a context parameter param01.
So, when I run a load test sometimes the loop 1 fails because it cannot find the Context parameter param01 and throws an extraction rule error, but loop2 becomes success because it found the context parameter and extraction rule is passed.
Now, I want to suppress the Extraction rule error which occurs in the failed loop (loop 1) and pass the test. Please help me on this.
Many extraction rules have a Required property, of boolean type. Set it to False so that the rule (and hence the test) will not fail when the expected data is not available.
Be aware that the extraction rule for Extract regular expression has a Required property but it appears to be handled wrongly in some Visual Studio versions . See this fault report. See also this discussion of the issue plus a work-around that calls the real extraction rule then writes true to the Success field.

Error: An error occurred while skipping data rows

I am getting these errors in flat file connection manager.
Error: [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Flat File Source returned error code 0xC0202091. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
I am reletively new to ssis and I am finding it quite hard to figure out the issue. Please let me know your views.
On your flat file connection properties - Look for the property "AlwaysCheckForRowDelimeters" - SET it to FALSE.
Hope that helps.
"An error occurred while skipping data rows" - I had this error in a package and found the problem was reading files inside a for loop. More files matched the criteria than intended, so a file with an invalid schema was also matched.
More generally I think this is related to either the file not matching the connection definition, I have also seen people online saying it is related to the flat file using a text qualifier (i.e. " in a csv) but having no closing quote.
I had this error today, and my package was looking for more files than existed based on the conditions of the for each loop. The text qualifier wasn't the issue causing this particular error.
near the Start button press drop-down menu arrow
choose package_name Debug Properties
than under Configuration Properties open Debugging
than under Debug Options choose Run64BitRuntime and turn it to False

Get error information if luaL_loadfile fails

If luaL_load function fails, then, according to the documentation (Lua5.1), the error message is pushed on the stack and can be retrieved with lua_tostring(L, -1), but if I want to print a customized error message, I don't think I can use lua_Debug (because that is for active function). Is there any other way (other than parsing the string) to get the file, line number and what error occured ?
--
Thanks.
The error code returned by luaL_loadfile tells you what kind of error happened. You're mostly likely only interested in LUA_ERRSYNTAX, in which case there is a detailed error message left on the stack. This is the only record of the error. If you need to reformat it, you need to parse it.
During a luaL_load(), there is nothing techinally on the stack that is relavant to the loading of the script. No functions are performed or executed in the script. Its just a compilation step, returning a function that encapsulates the whole file or the error found during compilation.
If you get a function back, you execute this to actually run the script, which sounds like what you are really interested in. In which case you can use a lua_pcall() and provide an error handler. In your handler you would then have your expected stack trace available via lua_Debug.

How to get the return code from cccheckout task in ant

Im trying to write a logic that depends on the success or failure of cccheckout command. Is there something similar to returnProperty attribute as in exec task?
Thanks,
Aarthi
Looking at the CCCheckout documentation, I would rather use the exception mechanism to process any failure.
failonerr
Throw an exception if the command fails. Default is true.
Since ant 1.6.1
In ant, that means you can separate your ant process in two (one if no failure, one one exception), using the ant trycatch task.
It's possible you're asking that question because of cleartool.exe behaves strangly
sometimes, means it returns RC -1 even if no real error occured.
Means using cccheckout with failonerr="true" would sometimes cause an unneccessary Build failed
as any RC != 0 is handled as error by exec task.
But you might use the <exec> task directly with executable cleartool.exe and set attribute
resultproperty to make the RC available as property
outputproperty to make stdout available as property
errorproperty to make stderr available as property
for further processing, i.e. use condition task to check those properties..
Some try/catch/finally feature provided by Ant addons like :
AntContrib
Flaka
might come in handy, as VonC already mentioned.
If it gets more complicated afterwards use Groovy ant task or script task.

How to skip selected error reported by fortify source code analyzer?

While getting scource code analyzed by fortify source code analyzer if I want to skip selected catagory say "Poor Error Handling : Empty Catch Block" - is there any way to do that? In case of checkstyle report generator there is a way to skip selected error being reported. I would like to have that flexibility in case of fortify source code analyzer.
First, open results containing "Poor Error Handling: Empty Catch Block" in Fortify Audit Workbench. Then, find an Empty Catch Block finding, right click it and select "Create Filter..."
In the filter dialog, select the condition "Category matches Poor Error Handling: Empty Catch Block", and then in the Action section below, select "Hide". Save the filter.
The first thing you'll find is all the Empty Catch Block findings have disappeared. The filter is simply stored in the FPR at this stage.
To publish this filter as a matter of policy, choose Tools->Project Configuration and export your project template. Save the file in the installation directory in Core/config/filters/ as specified in the readme file there. If you do this on all your computers that produce scans, all your FPRs will share the same filter.
If you have a central Fortify 360 Server, you can import this project template into the server instead. It will automatically be applied to any upload to a project of that template.

Resources