Backup one table and restore to other db (1 Viewer)

davidg47

Registered User.
Local time
Yesterday, 19:11
Joined
Jan 6, 2003
Messages
59
Hey Guys,

I have a db that has about 100 tables in it. I need to backup only one of the tables and then restore it to a different db.

I looked through the Online Books but didn't find anything that told me how to do it.

Any help will be greatly appreciated...

Dave
 

FoFa

Registered User.
Local time
Yesterday, 18:11
Joined
Jan 29, 2003
Messages
3,672
Unless that table is on a different file than the others, SQL won't do it (at least that I am aware of).
But what you can do is use a DTS job to copy the table to the other server or DB. OR you can dump the sql to create the table, create it and use an insert/select query to populate it from your current table. If they are on the same server you only have to speciy the full DBname.dbo.table to reference the other table in the other DB. If on different servers you have to link that server, hence a DTS job is better in that case.
 

SQL_Hell

SQL Server DBA
Local time
Today, 00:11
Joined
Dec 4, 2003
Messages
1,360
Hi,

Some of the third party SQL Server backup tools can perform a restore of one table from a *.bak file, one of these is SQL litespeed.
But these tools are very expensive in terms of licensing, so probably in this case I would go with what Fofa has said.
 

Users who are viewing this thread

Top Bottom