sp_recomplie - recompile all stored procedures and fuctions

  • Hi All,

    Can someone please provide the script for " sp_recomplie - recompile all stored procedures and fuctions" in all databases in SQLServer2005.

    Thanks and Regards,

    Ravi.

  • This sounds like an interview question.

    You can achieve what you want through a DBCC command, take a look at books on line.



    Clear Sky SQL
    My Blog[/url]

  • How to execute the storedprocedure in all databases? as I want to schedulre it in sqlserver job

    EX: if we want to execute SP in specific db

    USE DATABASENAME

    EXEC SP_STOREDPORCEDURE

    I want it to execute in all dbs.

    Please advice.

    Thanks and Regards,

    Ravichandra.

  • You can use sp_MsForEachDB or any other replacement[/url] for that.

    -- Gianluca Sartori

  • How about simply running DBCC FREEPROCCAHCE

    http://msdn.microsoft.com/en-us/library/ms174283.aspx

    Jayanth Kurup[/url]

  • ravisamigo (3/4/2012)


    Hi All,

    Can someone please provide the script for " sp_recomplie - recompile all stored procedures and fuctions" in all databases in SQLServer2005.

    Thanks and Regards,

    Ravi.

    Anytime I see a question like this on a forum the first thing that pops into my head is "WHY do you want to do this"? Lets address that before we talk about HOW you do it. 😎

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

Viewing 6 posts - 1 through 5 (of 5 total)

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