SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 Data Corruption Issues
 corrupted ndf
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

boksantos
Starting Member

Philippines
6 Posts

Posted - 06/27/2007 :  22:12:54  Show Profile  Send boksantos a Yahoo! Message  Reply with Quote
how can i attach my database without the ndf file, i still have the mdf and ldf. my ndf file contains only 2 tables which are not that very impt. unfortunately my ndf was corrupted and my backup files was deleted when the network admin formatted the harddisk where the backups were stored.. is it possible? kindly help..

paulrandal
Yak with Vast SQL Skills

USA
899 Posts

Posted - 06/28/2007 :  18:45:20  Show Profile  Visit paulrandal's Homepage  Reply with Quote
Is the ndf part of a seperate filegroup? I'm guessing it must be if you've placed tables wholly within it?

If its not or you're not on SQL 2005 Enterprise Edition, you're hosed.

If it is and you're on 2005 Enterprise Edition, you can try doing the dummy database trick, set the second dummy filegroup offline, and then swapping in the real files. This will only work if the transaction log doesn't contain any active transactions that reference the offline filegroup.

It's beyond the scope of this forum to explain how to do this - if you don't know, then you should call Product Support to help you.

Oh - and either get a different backup strategy, or a new network admin :-)

Paul Randal
Principal Lead Program Manager, Microsoft SQL Server Core Storage Engine
(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)
http://blogs.msdn.com/sqlserverstorageengine/default.aspx
Go to Top of Page

boksantos
Starting Member

Philippines
6 Posts

Posted - 06/28/2007 :  21:29:07  Show Profile  Send boksantos a Yahoo! Message  Reply with Quote
tnx, yes it is a part of a separate filegroup. we're using SQL 2K Enterprise. so do you think that Product Support can help me or will offer solution to this problem or am i really doomed? tnx again
Go to Top of Page

boksantos
Starting Member

Philippines
6 Posts

Posted - 06/28/2007 :  22:14:20  Show Profile  Send boksantos a Yahoo! Message  Reply with Quote
i forgot, if i'll install SQL 2005 and attach my mdf and ldf file, will it work?
Go to Top of Page

paulrandal
Yak with Vast SQL Skills

USA
899 Posts

Posted - 06/28/2007 :  22:37:36  Show Profile  Visit paulrandal's Homepage  Reply with Quote
No - you need SQL 2005 Enterprise Edition. It won't work on the free versions. There's no way to do it on 2000.

Slight alteration to what I told you above - create the dummy database but don't put the secondary filegroup offline. Shut it down and swap in the old files, plus delete the NDF. Then startup SQL and it will mark the database as suspect. Then you can take the file offline and use the rest of the database. Again - only works on 2005 Enterprise, and only if the log doesn't reference anything in the missing file.

Product Support can't do anything for you unless you're on 2005 Enterprise Edition - and the only thing they can do is as I describe above.

Thanks

Paul Randal
Principal Lead Program Manager, Microsoft SQL Server Core Storage Engine
(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)
http://blogs.msdn.com/sqlserverstorageengine/default.aspx
Go to Top of Page

boksantos
Starting Member

Philippines
6 Posts

Posted - 06/28/2007 :  23:22:34  Show Profile  Send boksantos a Yahoo! Message  Reply with Quote
ok, thanks a lot. i think i have to create a much better back-up strategy and upgrade to SQL 2005. more power on you people.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000