How to backup SQL Server tables by using SQL DMO

How to backup SQL Server tables by using SQL DMO

Post by kobetin » Thu, 04 Dec 2003 09:26:07



Hello every,
  I would like to ask that if I only want to backup part
of tables in a SQL Server database, i.e. if there are 10
tables in a SQL Server database, I may need to backup five
of them only.

  I hope everyone can tell me how I can do that step by
step.

Thank you for your help

 
 
 

How to backup SQL Server tables by using SQL DMO

Post by Uri Diman » Thu, 04 Dec 2003 09:44:04


Hi
There is not T-SQL command to backup  tables,SQL Server does not support
that.

Consider using FILEGROUPS. For more details please refer to BOL
Also If you are using SQL Server 2000 look at PARTIAL clause in RESTORE
command operation.


Quote:> Hello every,
>   I would like to ask that if I only want to backup part
> of tables in a SQL Server database, i.e. if there are 10
> tables in a SQL Server database, I may need to backup five
> of them only.

>   I hope everyone can tell me how I can do that step by
> step.

> Thank you for your help


 
 
 

How to backup SQL Server tables by using SQL DMO

Post by oj » Thu, 04 Dec 2003 11:19:00


No. There is no option to selectively backup tables (i.e. there is no
'backup table') in sqlserver. The best you can do is to use filegroup as
suggested by Uri. Another is to bcp the tables out.

You could use free tool, QALite from site to extract the data out as Insert
statements which you can later use.

--
-oj
Rac v2.2 & QALite!
http://www.rac4sql.net


Quote:> Hello every,
>   I would like to ask that if I only want to backup part
> of tables in a SQL Server database, i.e. if there are 10
> tables in a SQL Server database, I may need to backup five
> of them only.

>   I hope everyone can tell me how I can do that step by
> step.

> Thank you for your help