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
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 How to restore one table from detached data file?

Author  Topic 

konoff
Starting Member

3 Posts

Posted - 2002-08-14 : 06:12:13
The situation is:
The database consists of 5 filegroups (5 data files).
All data in tables were overwritten but before overwriting DB was detached
and all data files were copied to another machine.
All copied files were lost exept one big .NDF file (>6Gb) containing data from
only one table and .LDF file.

I want to restore old data from that file into existing DB.
How can I do that? (if it is possible at all...)


Win 2000 Server + MS SQL 2000 (SP-2)

Thanks in advance.
George.


robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-08-14 : 08:20:04
Probably sp_attach_single_file_db would be your best bet. See Books Online for more info.

Go to Top of Page

konoff
Starting Member

3 Posts

Posted - 2002-08-14 : 09:12:57
I already try sp_attach_single_file_db...
It doesn't help because I havn't original .MDF file (PRIMARY filegroup)

When I detached DB with new data, copy all files to another server,
replace one file with my "old" .NDF and then try to attach
I see an error message.

Seems like I tried all "correct" ways to restore data :(
Is there some tools for extracting data from NDF file?
(this file contains only 1 table)


Go to Top of Page

jasper_smith
SQL Server MVP & SQLTeam MVY

846 Posts

Posted - 2002-08-14 : 10:59:22
I don't believe you will be able to do this because the PRIMARY filegroup contains sysobjects so even if you hacked about enough to attach the NDF to another database and reset the status you won't be able to acces the table in the secondary filegroup because there's no meta data for the table. Microsoft PSS might have some tools to get the data out [url]http://support.microsoft.com[/url] and click on Request Support.

HTH
Jasper Smith
Go to Top of Page

konoff
Starting Member

3 Posts

Posted - 2002-08-14 : 11:05:09
well...
looks like the MS PSS is my last chance.

thank you people for your advices.

Regargs,
George

PS: if somebody have tools for extracting data from data file please let me know :)

Go to Top of Page
   

- Advertisement -