none
Can I belatedly restore MSDB and MODEL DBs? RRS feed

  • Question

  • Late last Sunday I had to do an emergency rebuild of our SQL Server (v2012).  In my haste, I neglected to restore the MSDB and MODEL DBs, and am instead using those which came with the fresh SQL install -- which obviously don't contain my jobs and maintenance plans.  Would there be any problem/conflicts with me restoring those DBs this weekend?  I would really love to not have to manually rebuild jobs and maintenance plans :-)
    Thursday, December 3, 2015 7:45 PM

Answers

All replies

  • Hi,

    Of course you can as long as you have backups for these databases and there should not be any conflicts restoring these.

    See the link below on how to

    https://www.mssqltips.com/sqlservertip/2571/restoring-sql-server-system-databases-msdb-and-model/

    Cheers

    Bhanu


    • Edited by bhanu_nz Thursday, December 3, 2015 7:50 PM
    • Marked as answer by tommydogs Thursday, December 3, 2015 9:40 PM
    Thursday, December 3, 2015 7:49 PM
  • Hi,

    Of course you can as long as you have backups for these databases and there should not be any conflicts restoring these.

    See the link below on how to

    https://www.mssqltips.com/sqlservertip/2571/restoring-sql-server-system-databases-msdb-and-model/

    Cheers

    Bhanu


    Bhanu_nz, I wouldn't say there should not be "any" conflicts.

    Tommydogs, The one thing I would look out for is if any new jobs have been created. Since jobs are stored in MSDB you'd overwrite the new ones if you restore the older copy. Check to see if any jobs exist using object explorer or the following query:

    select * from msdb.dbo.sysjobs

    I hope that helps!


    I hope you found this helpful! If you did, please vote it as helpful on the left. If it answered your question, please mark it as the answer below. :)

    • Marked as answer by tommydogs Thursday, December 3, 2015 9:40 PM
    Thursday, December 3, 2015 7:56 PM
  • Hi Daniel,

    I thought of that, Might have forgotten to mention that. Thanks for the correction.

    Tommy-  I addition to what Daniel mentioned, you may have to script any new jobs that have been created in this week and re-apply them back one the database is restored.

    Thanks

    Bhanu

    Thursday, December 3, 2015 8:40 PM
  • Thanks guys!

    No new jobs or plans created this last week.  Our jobs and plans are just DB backup and maintenance-related, so they change very infrequently.

    Our SQL data-driven processes are all updated via Task Runner, otherwise I definitely would have noticed the lack of "jobs" running earlier in the week if they were all needing to run off of the SQL product.

    Thursday, December 3, 2015 9:46 PM