|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: 2 days ago @ 8:44 AM
Points: 1,322,
Visits: 4,399
|
|
There is a way to do this without downtime for SQL Server.
1. Backup the master database 2. Restore the backup file as a differently named database 3. Detach this database
You now have the mdf and ldf files for the master database that can be used in the same way the article suggests, but without any downtime.
This could even be done as a scheduled job, so you have an up to date master backup that can be easily restored any time.
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Today @ 5:32 PM
Points: 306,
Visits: 1,013
|
|
Hello everyone,
Thanks for all your comments. Looks like some people like and dislike the article but this is to be expected.
Apparently some are commenting that the article name is misleading. Actually it is not. The purpose of the article is to help get the master database back up and running. Replacing the master database with a working "copy" is the same as rebuilding it. Technically you are replacing the database but the end results are the same. So if you restore it, copy it or rebuild the master database who cares as long as the business can get to their data. Without the business DBAs would be out of work.
Others comment on the fact the this can not be done everyday. Well, you don't have to. It's all up to you how you want the run your environment. My "Real World Example" is how I use this process. It's for our disaster recovery site. I also run this process on our production servers when we do patching on the OS and/or SQL server. Since SQL server services will be interrupted during our maintenance window I execute a batch file that does the complete process in under 5 minutes.
If you can see the benefit of this process and can use it great.
If you don't like the article, maybe you can post your improved process other than reading off the BOL on how to rebuild your master database.
Hopefully you will get inspired and write your our process/tip and post it on this great website.
Rudy
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Today @ 5:32 PM
Points: 306,
Visits: 1,013
|
|
mohammed moinudheen (2/3/2011) Rudy, The title of this article is really catchy.
Regarding this section: It's All Proactive You are referring to a SQL Server instance which is running fine right? I am assuming you are not copying from the instance which has db corruption.
Yes Mohammed, only IF the instance (default or named) is running fine. Do not run this on a bad/corrupted master database as this will not help you.
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Today @ 5:32 PM
Points: 306,
Visits: 1,013
|
|
Markus (2/3/2011) I try and do this after a patch or when I know I have an outage window. It is always good to have an easy way to get SQL Server back to a somewhat stable state.
To all of those that are disappointed in this article.... All this article is pointing out is if master gets corrupted for any reason this is an easy way to get you back to a stable running SQL Server. That is all. It is not meant to be a daily occurance as no one can stop/start SQL Server on a daily basis in a production environment.
Markus, I see you got the point of my article.
Thanks 
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 12:21 PM
Points: 7,
Visits: 73
|
|
Two questions, if someone could help me please! 1. Does the Master DB contain the server Master encryption key data or should I add this separately?
2. I know the Master db contains the code for the scheduled agents, but if I follow the rebuild sequence outlined will they appear in the SQL Server Agent Jobs automatically, or do I need to dig the code out for each step and recreate it?
Thank you!
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 2:19 PM
Points: 242,
Visits: 656
|
|
nick.welham (2/3/2011) Two questions, if someone could help me please! 1. Does the Master DB contain the server Master encryption key data or should I add this separately?
2. I know the Master db contains the code for the scheduled agents, but if I follow the rebuild sequence outlined will they appear in the SQL Server Agent Jobs automatically, or do I need to dig the code out for each step and recreate it?
Thank you! job info is actually in the msdb database
-- Thiago Dantas @DantHimself
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Today @ 5:32 PM
Points: 306,
Visits: 1,013
|
|
nick.welham (2/3/2011) Two questions, if someone could help me please! 1. Does the Master DB contain the server Master encryption key data or should I add this separately?
2. I know the Master db contains the code for the scheduled agents, but if I follow the rebuild sequence outlined will they appear in the SQL Server Agent Jobs automatically, or do I need to dig the code out for each step and recreate it?
Thank you!
Welham,
Encryption key data should always be backed up on their own regardless of where it lives.
Also the jobs are contained in the MSDB database.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 12:21 PM
Points: 7,
Visits: 73
|
|
| Thanks! Will a replacement of the the MSDB database populate the SQL Server Agent jobs?
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: 2 days ago @ 8:37 AM
Points: 1,046,
Visits: 2,208
|
|
Yes. Restoring MSDB database will get you all of your SQLAgent jobs. Keep in mind if you attempt to restore MSDB the SQL ServerAgent service has to be stopped first.
If you are restoring a MSDB database from one server to another and both servers have different names there is some tweaking to change the servername in one of the tables you will have to do.
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 3:34 PM
Points: 2,170,
Visits: 3,582
|
|
Rudy Panigas (2/3/2011)
mohammed moinudheen (2/3/2011) Rudy, The title of this article is really catchy.
Regarding this section: It's All Proactive You are referring to a SQL Server instance which is running fine right? I am assuming you are not copying from the instance which has db corruption.Yes Mohammed, only IF the instance (default or named) is running fine. Do not run this on a bad/corrupted master database as this will not help you.
Rudy, Thanks for clarifying.
Mohammed Moinudheen
|
|
|
|