?
Solved

Recreating MSDB Database

Posted on 2005-03-10
2
Medium Priority
?
689 Views
Last Modified: 2008-02-01
I have accidentally deleted the sysobjects table in the MSDB Database..
Now the entire database is not accessible..

when i executed sp_databases, i get the error

Invalid object name :  MSDB.dbo.Sysfiles

is there any way to create the MSDB again without re-installing the SQL Server instance??

Viggee
0
Comment
Question by:Viggee
[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 Comments
 
LVL 34

Expert Comment

by:arbert
ID: 13514060
Do you have a backup?

If so, restore it (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_bkprst_2w1f.asp).  If not, you can use the REBUILDM utility to do it.  Rebuildm rebuilds the master database, so make sure you back it up first, cause you'll have to restore it after you run the utility.

Brett
0
 
LVL 7

Accepted Solution

by:
Mehul Shah earned 1500 total points
ID: 13514125
You can run the below sql file from Query Analyzer.. It will recreate the MSDB database.

\MSSQL\Install\instmsdb.sql
0

Featured Post

What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to shrink a transaction log file down to a reasonable size.

771 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