print inside stored procedures that are called from application

  • I was wondering if print instructions inside a stored procedure that is not called from sql server, but from any application or program has some effect...

    maybe on performance? or it's pretty irrelevant?

     

  • They do post to the data buffer so they do impact network and memory but it depends on how often, how many and how big they are as to whether or not it is significant. They can be read as well by your application. I usually will comment them out for production and use them more for debugging. 

  • This will appear only when you run an SP from QA:

    IF APP_NAME() = 'SQL Query Analyzer'

    PRINT 'whatever'

     

    _____________
    Code for TallyGenerator

  • do not use 'print' in Stored procedures, if the SP is called from frontends. Specifically ASP pages do break, if they call SPs that contain Print statements. More problemsome when using XML output in ASP (i mean classic ASP)

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply