Solved

backup a table and restore

Posted on 2006-11-01
6
1,094 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 143

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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 143

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 143

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

762 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