Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2007
    Posts
    86

    Unanswered: Rename database SQL server 2005

    I have a db with many maintenance plans .. I have a request to rename the database .. How do I get the maintenance plans to reference the database after this is done. I assume they ahve to be exported somehow, but having never done this I'd appreciate someone pointing me to a doc or explaining how to do that. Thanks in advance.

  2. #2
    Join Date
    Jan 2004
    Location
    Montreal, Canada
    Posts
    151
    just reasign the Maintenance plan to the renamed database once your done renaming your DB, when you open up the Specific maintenance plan you can specify wich DB it will affect look into creating maintenace plan in BOL. You can also script out your maintenance plan and change the variable that are pointing to your old DB to the new one and then execute again your new DB.

  3. #3
    Join Date
    Mar 2007
    Posts
    86

    rename db with Maint Plans

    Thanks .. I read on some blogs, that there was an issue with maintenance plans, getting corrupted after a db rename .. I would think I s/b able to just open the MP and choose the db for the tran dumps, and backups etc ..

    I was thinkign I might have to change them to say msdb and then switch after the rename .. I exported them with integration services just to be sure.

    ANy chance I hit one of the bloggers warnings? That's all I was concerned about .. MS sware can be funky at times.

  4. #4
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    anytime people want to rename something in the back end I qoute Shakespere "a rose by an other name..."

    If something needs to be explained I am way into adding description extended properties at the table and column level.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  5. #5
    Join Date
    Jun 2004
    Location
    Long Island
    Posts
    696
    That's why I never use maint plans, always custom script and schedule via Agent or ActiveBatch or Task Scheduler.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •