January 19, 2017 at 8:17 am
Dear all,
I have a stored procedure that is returning messages other then the only one I want ( the value 1)
As per below, this messages are result from SP_recompile that I have Inside the SP and from some warnings.
How can I request the SP to not send those messages (specially the ones related with the sp_recompile option)
Below the messages:
Object 'bmb_ms.usp_BMBBI_audit_procedure_result_update' was successfully marked for recompilation.
Object 'bmb_ms.usp_BMBBI_poc_update' was successfully marked for recompilation.
Object 'bmb_ms.usp_BMBBI_machine_counter_estim_insert' was successfully marked for recompilation.
Object 'bmb_ms.usp_BMBBI_machine_counter_estim_control_insert' was successfully marked for recompilation.
Object 'bmb_ms.usp_BMBBI_last_ingredient_sale_insertupdate' was successfully marked for recompilation.
Object 'bmb_ms.usp_BMBBI_last_ingredient_sale_oper_insertupdate' was successfully marked for recompilation.
Object 'bmb_ms.usp_BMBBI_prl_estimated_monthly_cup_sales' was successfully marked for recompilation.
Warning: Null value is eliminated by an aggregate or other SET operation.
Warning: Null value is eliminated by an aggregate or other SET operation.
Warning: Null value is eliminated by an aggregate or other SET operation.
Warning: Null value is eliminated by an aggregate or other SET operation.
Warning: Null value is eliminated by an aggregate or other SET operation.
Warning: Null value is eliminated by an aggregate or other SET operation.
Warning: Null value is eliminated by an aggregate or other SET operation.
Warning: Null value is eliminated by an aggregate or other SET operation.
Warning: Null value is eliminated by an aggregate or other SET operation.
Warning: Null value is eliminated by an aggregate or other SET operation.
Warning: Null value is eliminated by an aggregate or other SET operation.
Warning: Null value is eliminated by an aggregate or other SET operation.
Warning: Null value is eliminated by an aggregate or other SET operation.
Warning: Null value is eliminated by an aggregate or other SET operation.
Warning: Null value is eliminated by an aggregate or other SET operation.
1
Thank you,
Pedro
January 19, 2017 at 9:24 am
I do not recommend this, but you can use the SET ANSI_WARNINGS command to turn them off. By default they are on. Please carefully read the documentation to ensure you're not going to hit issues if you decide to turn these off. However, that's how you would do it.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 19, 2017 at 5:53 pm
I agree with Grant. Suppressing these messages isn't the way to go. Fixing the code that causes them is. There's almost never a need to mark stored procs for recompile and fixing your aggregations or related criteria will fix the Null Aggregation errors. In fact, you might want to dig into the Null Aggregation errors because they might actually be telling you that something is wrong.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply