Backup a single table using SQL-DMO

Backup a single table using SQL-DMO

Post by Sherry H » Sun, 01 Sep 2002 13:29:33



Can I backup and restore a single table using SQL-DMO? I have looked through
the SQL Server Books Online, but still not clear how to program backing up a
single table using SQL-DMO.

Anyone can give me a help?

Thank you very much!

Sherry He

 
 
 

Backup a single table using SQL-DMO

Post by Stride » Sun, 01 Sep 2002 14:28:19



Quote:> Can I backup and restore a single table using SQL-DMO? I have looked
through
> the SQL Server Books Online, but still not clear how to program backing up
a
> single table using SQL-DMO.

I don't believe there's support for that in SQL Server 7.0 or 2000.

However, you can backup individual filegroups.  Therefore if you put the
table in its own filegroup, you can back that up.

Quote:

> Anyone can give me a help?

> Thank you very much!

> Sherry He


 
 
 

Backup a single table using SQL-DMO

Post by Sherry H » Mon, 02 Sep 2002 02:02:51


Thank you!

I feel it's not a good idea to create every table in different filegroup in
order to back up a single table. So, I guess it will be easier to implement
backing up a single table without SQL-DMO, like I can use ADO to read from a
table and save the data in a txt file in certain format. But the problem is
if I need to implement incremental backup, it seems not easy to program
without the help of SQL-DMO. Is there any good way to do it?

Sherry He





> > Can I backup and restore a single table using SQL-DMO? I have looked
> through
> > the SQL Server Books Online, but still not clear how to program backing
up
> a
> > single table using SQL-DMO.

> I don't believe there's support for that in SQL Server 7.0 or 2000.

> However, you can backup individual filegroups.  Therefore if you put the
> table in its own filegroup, you can back that up.

> > Anyone can give me a help?

> > Thank you very much!

> > Sherry He

 
 
 

Backup a single table using SQL-DMO

Post by Stride » Mon, 02 Sep 2002 06:08:11



Quote:> Thank you!

> I feel it's not a good idea to create every table in different filegroup
in
> order to back up a single table.

Generally backing up individual tables is frowned upon as you have to be
real careful about the constistency of your data when doing a restore.  But,
you wanted a howto, so I gave one.

Quote:>So, I guess it will be easier to implement
> backing up a single table without SQL-DMO, like I can use ADO to read from
a
> table and save the data in a txt file in certain format. But the problem
is
> if I need to implement incremental backup, it seems not easy to program
> without the help of SQL-DMO. Is there any good way to do it?

    I guess if I knew why you wanted to backup individual tables rather than
the entire database, it might help me or others suggest better ideas.
 
 
 

Backup a single table using SQL-DMO

Post by Sherry H » Mon, 02 Sep 2002 09:10:33


Quote:> Generally backing up individual tables is frowned upon as you have to be
> real careful about the constistency of your data when doing a restore.
But,
> you wanted a howto, so I gave one.

Yes, I have been aware that the issue of  dependence of tables, so normally
the application could let the user choose a subset of database. But still,
sometimes maybe a single table backing up is required.

Quote:>     I guess if I knew why you wanted to backup individual tables rather
than
> the entire database, it might help me or others suggest better ideas.

The reason we need a single table backing up is that sometimes the user only
want to restore part of the database, and they also want to the backup
tables can be put in a floppy disk.

By the way, I haven't used SQL-DMO before, is it very popular to develop
this kind of application using SQL-DMO. If the backup/restore utility in my
application is required to written in a COM object, is it a good way to
contain SQL-DMO as a COM object?

Thanks!