Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

backup a table and restore

Posted on 2006-11-01
6
Medium Priority
?
1,107 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 750 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 600 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 150 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
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

 
LVL 143

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 750 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
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.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

670 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