Scripting "Alter table" commands

  • Hi,

    I'm hoping this is the right category for this question...it arose from a situation where i was moving existing databases to different drives...

    In short, when we did our "Detach...move...Attach", when the DB came back up, it came up without the service broken option enabled. This, in hindsight, makes perfect sense, but lead to the question:

    Is there a way to script out (maybe a nightly job...) all the "Alter Database..." statement so that, in the future, if we go thru a similar move, we will have ALL the code needed to bring the DB's back to the their correct state.

    thanks for any insights...

    Ken

  • This issue was covered in an article by Jonathan Kehayias just last week. Have a look at

    http://www.sqlservercentral.com/articles/Administration/65896/

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

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