How to drop master database? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

How to drop master database?

I have run a database schema in QA which comprised of tables,foreign key constraints,insert statements with necessary data,in master database by mistake.This has created all the db objects in master. now I need to drop all the tables, dependencies and any other objects created after the execution of this schema,all at a time,with out dropping them indivdually one by one.Any one can pls tell me what to do in this case.
Beside this I m thinking of another plan ,why not drop the master database and then move the master database from another instance of sql server running on same machine, and then transfer the logins,and other necessary information to make the sql server behave completly correct.Is this is possible..Though i know that its not a good decision to try to drop master database..but want to know the method that no stones should be left unturned…
pls suggest
You cannot drop the master database. I recommend you restore master from a previous backup i expect you’ve diligently made in case of this kind of error. Tom Pullen
DBA, Oxfam GB
<img src=’/community/emoticons/emotion-6.gif’ alt=’:(‘ /> not satisfied
If you want to drop the master database then there is no work for you in SQL Server, master database is like a heart to the SQL Server, if its killed how can you work. The master database is special. When the master database becomes damaged in any way, chances are your SQL Server is not going to work. In this section, we’ll rebuild the master database and then restore it. Remember that once you rebuild master, you lose all information and data. You can use REBUILDM utility to rebuild the master database. Other alternative is to script the user database and apply that script on this server to affect the pre-defined constraints etc. for this user database. Satya SKJ
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by aaronsandy</i><br /><br /><img src=’/community/emoticons/emotion-6.gif’ alt=’:(‘ /> not satisfied<br /><hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote"><br /><br /><img src=’/community/emoticons/emotion-6.gif’ alt=’:(‘ /> not impressed by your lack of ability to read Books Online!!<br /><br />Tom Pullen<br />DBA, Oxfam GB
Without being offending. You should really read BOL carefully. As all of your threads recently here have shown, you need to build up a working knowledge of SQL Server. <br /><br />As for your question on the master db: That’s a quick and easy way to fubar SQL Server. Just stop the SQL Server service and delete the physical files of the master db. &lt; ENVY &gt;Gee, wish I had thought of this. &lt;/ ENVY &gt; [<img src=’/community/emoticons/emotion-4.gif’ alt=’:p‘ />]<br /><br />–<br />Frank<br /<a target="_blank" href=></a><br />
I suggest to rebuild master database, attach all databases and recreate all what you will lost. BTW: I too hard to drop all tables, etc in master?
Luis Martin
Moderator One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important
Bertrand Russell
All postings are provided “AS IS” with no warranties for accuracy.