Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Data Corruption Issues
 corrupted ndf

Author  Topic 

boksantos
Starting Member

6 Posts

Posted - 2007-06-27 : 22:12:54
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

899 Posts

Posted - 2007-06-28 : 18:45:20
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

6 Posts

Posted - 2007-06-28 : 21:29:07
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

6 Posts

Posted - 2007-06-28 : 22:14:20
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

899 Posts

Posted - 2007-06-28 : 22:37:36
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

6 Posts

Posted - 2007-06-28 : 23:22:34
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
   

- Advertisement -