Author |
Topic |
Saphalin
Starting Member
6 Posts |
Posted - 2010-03-01 : 03:13:54
|
Help guys we accidently deleted file MSDBLog instead of moving it, now obviously we cannot connect to our database, help please! What should we do? We tried replacing it with ther MSDBLog file from other computer but it did not work. Is our data still safe? It is in the MSDBData file right?Please answer ASAP, if you can. |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2010-03-01 : 03:32:58
|
can try sp_attach_single_file_db http://msdn.microsoft.com/en-us/library/ms174385.aspx |
 |
|
Saphalin
Starting Member
6 Posts |
Posted - 2010-03-01 : 04:24:44
|
Unfortunatly did not work, as system databases cannot be detached. (System databases master, model, msdb, and tempdb cannot be detached.) |
 |
|
Saphalin
Starting Member
6 Posts |
Posted - 2010-03-01 : 05:51:58
|
Anyone? |
 |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2010-03-01 : 06:26:17
|
Restore from backup. Check Books Online, there are ways to restore the system databases, they're not the same as for user databases.You can't simply bring in another server's log file. The log's not an error log, it's a critical portion of the database and tied to the mdf file. If you don't have a backup of MSDB, check this out http://sqlinthewild.co.za/index.php/2009/06/09/deleting-the-transaction-log/ You'll have to bring the server up in restricted mode I think, to get SQL to start without MSDB. There's info in Books Online for doing that.p.s. This is a volunteer forum, we're providing advice free of charge and in our spare time. Bumping your post after not even 2 hours is unnecessary. If it's urgent, call Microsoft's customer support and pay for immediate assistance.--Gail ShawSQL Server MVP |
 |
|
Saphalin
Starting Member
6 Posts |
Posted - 2010-03-01 : 13:23:44
|
First of all i greatly appreciate, all your time and knowledge, as you may understand things are pretty desperate when something like this happens. I got to the point that all i need to do is detach msdb from server (which is not allowed as it is system database) people are saying to run sql server with -T3608 flag, that would allow such a detachment, but i cannot make it work! My sql server (express 2008) does not run with this flag giving an empty alert box on startup. Does anyone know how to detach msdb? |
 |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2010-03-01 : 14:44:35
|
You do not need to detach it. You need to restore from a backup.If you don't have a backup, (which you should have), you may need to rebuild the system databases. I know it's documented somewhere in Books Online (the SQL help file)--Gail ShawSQL Server MVP |
 |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2010-03-01 : 14:52:00
|
whoops i wasn't paying enough attention. you're right, can not attach msdb... as Gail said, you'll really want to restore from backup |
 |
|
Saphalin
Starting Member
6 Posts |
Posted - 2010-03-01 : 14:57:52
|
Guys if only i had backup, i would not spend anyones time =) the whole reason file got erased is because of the insufficient hard drive space. The online books you are referring to Gila are, not really books but part of SQL help? Like MSDN? I am not really following where to go to get them, googled everything meanwhile... |
 |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2010-03-01 : 15:03:40
|
http://blogs.msdn.com/psssql/archive/2008/08/29/how-to-rebuild-system-databases-in-sql-server-2008.aspxhttp://msdn.microsoft.com/en-us/library/dd207003.aspx |
 |
|
Saphalin
Starting Member
6 Posts |
Posted - 2010-03-01 : 15:37:14
|
Thx |
 |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2010-03-02 : 03:13:24
|
quote: Originally posted by SaphalinI am not really following where to go to get them, googled everything meanwhile...
From Management studio, press F1--Gail ShawSQL Server MVP |
 |
|
jet1337
Starting Member
11 Posts |
Posted - 2010-03-16 : 03:10:58
|
thanks russellASPnix.com |
 |
|
|