recompile

  • Hi,

    I want to check whether my sp is doing recompilation during execution.

    For that i have selected sp:recompile from profiler.

    I did not get any sp name.

    I got doubted, hence i changed my sp with recompile option.

    Even that time also profiler did not list my sp name

    then i use sp_recompile option, this time it did not.

    when i include sp:starting, it lists all the sp what ever i am running.

    can any one help me how to exactly find out whether the sp is recompilng or not.

  • From my observations the sp:recompile trace shows automatic recompiles only.  Thus if you were to add or remove indexes that would be used by a query, you will see the recompile in the trace.  You will not see it if you force a recompile by either changing the stored procedure's code or using the sp_recompile option. 


    Have Fun!
    Ronzo

  • Thanks for your response.

    Yes, i accepted this. And i found the same when i sp_recompile the table which associated with the sp.

    How do i force a sp to recopile without modifying data in a table?

  • sp_recompile automatically forces sql server to mark an sp for recompilation - regardless of whether any modifications have been done to the tables associated with it!

    Did I misunderstand your question ?







    **ASCII stupid question, get a stupid ANSI !!!**

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

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