Solved

backup a table and restore

Posted on 2006-11-01
6
1,055 Views
Last Modified: 2008-03-28
Dear experts,

Can a single table be restored in Sql Server.

What is the best way to take a backup of a single table?

can the above be done without using Enterprise Manager, say using Querry Analyzer.

many thanks
0
Comment
Question by:crishna1
6 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 17851928
>Can a single table be restored in Sql Server.
by default: no.

however, if that table is the only table in a filegroup, you can restore the filegroup which hence restores only that table.
0
 
LVL 11

Assisted Solution

by:rw3admin
rw3admin earned 200 total points
ID: 17852008
I think you mean how to save table outside the DB for migration or archive purpose.

you can export table along with data to a txt,csv,xl files ..... (using DTS) , you can use bcp, you can maybe also use openrowset ( I am not too sure about it)

but yes as angel pointed out you cannot do a "backup" as in DB backup of a single table
0
 
LVL 35

Assisted Solution

by:David Todd
David Todd earned 50 total points
ID: 17852464
Hi Folks,

Isn't SQL 2005 supposed to be able to backup and restore a single table? Or is that only the filegroup as Angel mentioned.

Regards
  David
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 250 total points
ID: 17852542
>Isn't SQL 2005 supposed to be able to backup and restore a single table? Or is that only the filegroup as Angel mentioned.
that's exactly the method: backup restore granularity is limited to filegroups...
0
 

Author Comment

by:crishna1
ID: 17853096
Thanks for your feed back.

How do i restore a single table from the file group, command please.
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 17853761
you cannot restore a single table.
you CAN restore a single filegroup.

so IF and ONLY if your table is the ONLY one in a filegroup you can restore that filegroup and hence restore that table...
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/sqlbackuprest.mspx#E3GAG
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Performance is the key factor for any successful data integration project, knowing the type of transformation that you’re using is the first step on optimizing the SSIS flow performance, by utilizing the correct transformation or the design alternat…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now