Discussion:
Table transfer
(too old to reply)
Pingx
2008-09-16 17:23:02 UTC
Permalink
Hi SQL Server experts:

I'd like to transfer a table from one db to another. The export only
transfer data, not index, constrain or triggers. Is there another tool I can
use besides backup/restore the whole DB?

Thanks in adbance.

Ping
Russell Fields
2008-09-16 21:28:02 UTC
Permalink
Ping,

Using Management Studio (2005) or Enterprise Manager (2000), right click on
the database you want and choose Tasks ... (or All Task... ) script. The
choose the generate scripts task and answer the dialogs to get the things
you want generated. Run the resulting script on the other server to create
tables, indexes, triggers, etc.

Or, if you just want one, rather simple table:

Using Management Studio (2005) or Query Analyzer (2000), expand the
database, Tables noe, right click on the table you want and choose a CREATE
script. Then expand the indexes node, right click on each index and choose
a CREATE script. Ditto for trigger, etc.

Put these all together and run it on the other server.

RLF
Post by Pingx
I'd like to transfer a table from one db to another. The export only
transfer data, not index, constrain or triggers. Is there another tool I can
use besides backup/restore the whole DB?
Thanks in adbance.
Ping
Pingx
2008-09-16 22:02:01 UTC
Permalink
So there is no way to transfer a table (data/index/constraint/triggers) in
one step?
Russell Fields
2008-09-16 23:35:18 UTC
Permalink
Ping,

Not really. As you noted, the transfer wizard will create the table, but it
does not go further. That is what scripts are for.

RLF
Post by Pingx
So there is no way to transfer a table (data/index/constraint/triggers) in
one step?
Pingx
2008-09-16 23:48:03 UTC
Permalink
Thanks for your help.
Pingx
Post by Russell Fields
Ping,
Not really. As you noted, the transfer wizard will create the table, but it
does not go further. That is what scripts are for.
RLF
Post by Pingx
So there is no way to transfer a table (data/index/constraint/triggers) in
one step?
Thomas
2009-07-25 13:16:01 UTC
Permalink
Try http://www.sqlscripter.com to transfer your data.
Post by Pingx
I'd like to transfer a table from one db to another. The export only
transfer data, not index, constrain or triggers. Is there another tool I can
use besides backup/restore the whole DB?
Thanks in adbance.
Ping
Bill_Orova
2009-07-29 17:53:48 UTC
Permalink
Try to use "select into" with a fully qualified destination. But
remember that the destination table has to be empty or truncated in
order for "select into" to work also make sure the servers have no
firewall in between that will stop this process.

Wisord

*** Sent via Developersdex http://www.developersdex.com ***

Continue reading on narkive:
Loading...