Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 693
  • Last Modified:

Recreating MSDB Database

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
Viggee
Asked:
Viggee
1 Solution
 
arbertCommented:
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
 
Mehul ShahIT consultantCommented:
You can run the below sql file from Query Analyzer.. It will recreate the MSDB database.

\MSSQL\Install\instmsdb.sql
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now