sp_MSforeachdb

  • Hi All,

    How i can change my all user databases recovery model to SIMPLE by excluding the system databases and using SP_MSFOREACHDB sp.

    Thanks in advance

  • Have you ever used sp_MSForeachDB? It is an undocumented procedure otherwise I would provide a link to BOL for you.

    What you want to do is call sp_MSForeachDB and provide an ALTER DATABASE command. Here is the link:

    http://msdn.microsoft.com/en-us/library/ms174269(v=SQL.90).aspx

    Feel free to use Google too. There are many examples of people using sp_MSForeachDB on the net. Good luck!

    Edit: noticed it was a 2005 forum, swapped in link to 2005 BOL article

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • Why did you post this in corruption forum?

    In that context it just doesn't make sens to switch to simple.

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

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