神刀安全网

What is a Master Database in SQL Server? – Interview Question of the Week #076

The other day, I received an email from a user, who had dropped master database in their system. I told him directly that he should have not dropped master database as that is a very important system database. It is really strange that after so many years quite a few of the people do not know what is a master database in SQL Server.

Question:What is a Master Database in SQL Server?

What is a Master Database in SQL Server? – Interview Question of the Week #076

Answer:Master database is system database and it contains information about running server’s configuration. When SQL Server is installed, it usually creates master, model, msdb, tempdb resource and distribution (last two depends on version of SQL Server) system database by default. This is the one which is absolutely must have a database. Without this database SQL Server cannot be started.

If any database is corrupted it should be restored from the latest backup, considering SQL Server was able to start with a damaged database. Sometimes when this database is corrupted so much it cannot start SQL Server at all and it cannot be restored. SQL Server should rebuild using command prompt and restored from the latest backup once again.

If you ever lose your master database or got it corrupted you can easily fix it as well. I have documented in this link about how to fix master database .

Additionally, if your master database size ever goes big, here is interesting blog post about that subject. Additionally, you should always backup master database just like any other database.

Backup of the this database should be made for:

  • Changing server-level configuration settings;
  • Changing database-level configuration settings; and
  • Changing any logon accounts details.

When someone talks about master database, I always think of Yoda. Here are a few interesting quotes from Yoda.

  • “A Jedi uses the Force for knowledge and defense, never for attack.” The Empire Strikes Back
  • “Adventure. Excitement. A Jedi craves not these things.” The Empire Strikes Back
  • “Judge me by my size, do you?” The Empire Strikes Back
  • “Fear is the path to the dark side…fear leads to anger…anger leads to hate…hate leads to suffering.” The Phantom Menace
  • “Do. Or do not. There is no try.” The Empire Strikes Back

The last one is the most popular and my favorite quote from Yoda. Yoda also said “Always pass on what you have learned.”, well, I request you to share this blog post with your friends and you will make Yoda happy.

Reference: Pinal Dave ( http://blog.SQLAuthority.com )

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » What is a Master Database in SQL Server? – Interview Question of the Week #076

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址