Recovery Model

  • I must be missing something that's right in front of my eyes! Which table contains the recovery model of the databases?


    Terry

  • sysdatabases

    and it all comes down to combinations of the 'status column' values of 4 and 8

    It is simple to come up with the logic to determine which is which

     


    * Noel

  • I figured that was the table but I expected a column called model or recovery or somthing that was a little more explainatory. Thanks for the quick response.


    Terry

  • you could instead use:

    DATABASEPROPERTYEX( database , 'Recovery' )

    it is simpler and you are not touching system tables


    * Noel

  • Any other cool commands like this that you can think of? I know they're in BOL but with everything in there...I can't tell you how many times I've seen this command but never really explored the uses! It made my life so much easier since 2 of my servers have 50+ databases and now I have a script that will show the recovery (or any other flag) of all of them in seconds as opposed to going to the properties of each of them through EM. Thanks for the tip!


    Terry

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

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