views:

36

answers:

1

I noticed in a code review that one developer added PRINT statements throughout many SQL Server stored procedures.

These stored procedures are executed from a ASP.NET website, using SqlClient.

Is there any performance penalty to having these PRINT statement in the code? Or will they automatically be skipped when the procs are called from Sql Client via ASP.NET?

I'm running Sql Server 2005.

+1  A: 

As noted here, "when using the SqlClient provider...messages do not alter control flow and can be intercepted by application code by registering a callback for the InfoMessage event handler."

Do they cause significant overheard? Probably not. Would I allow them to remain in the procedure when they serve no purpose for the application? NO.

Joe Stefanelli