Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MS SQL Rebuild Master Database

Posted on 2009-03-30
4
Medium Priority
?
712 Views
Last Modified: 2012-08-13
So here is the situation. we created a database for backup on our development server. when we went to run the table create the tables from the creation script we had the master database selected and created the tables in the master database instead of the database we created.

my question is: how to we recreate the master database without loosing the data in the other databases that resides on the server?

We don't have any backups of this server, as this is part of the project that started this whole issue.
0
Comment
Question by:pironic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 27

Expert Comment

by:Chris Luttrell
ID: 24024223
If the only thing you did was create new tables in master, then can you reverse the logic and just drop them.  If you did not drop or alter any of the system table in master then the rest of the databases should be ok.  The only other way I know of to restore the master database would be to restore from backups/transactions to the point in time before the script was run, but that could affect other databases.
0
 
LVL 2

Author Comment

by:pironic
ID: 24028840
The script (which was created by SQL management studio) droped the existing tables and then created the new ones. the old tables are not in the database anymore.
0
 
LVL 2

Accepted Solution

by:
pironic earned 0 total points
ID: 24030498
did some digging and found this link... helped a lot.

http://geekswithblogs.net/mskoolaid/archive/2005/12/17/63413.aspx
0
 
LVL 27

Expert Comment

by:Chris Luttrell
ID: 24030831
Thanks for sharing what you found. This is good information to know.  Glad you found a fix.
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question