Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 move a table from one database to another

Author  Topic 

deal11deal1
Starting Member

34 Posts

Posted - 2011-01-10 : 14:11:23
hello,
I have a situation in which
I am looking to move a couple of tables from database A from sql server A to database B on sql server B.
I need to move the tables with the (data, structure, indexes, keys, foreign keys, identities). I used the import export wizard of SSIS but only the data moved but none of the keys, indexes etc moved. what I am doing wrong?. Please help

dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2011-01-10 : 14:22:31

Based on your other posts...you might be better of just retoring a backup of Server A to Server B. You would need to do such a think anyway to enable mirroring at some point.

However, you can generate the table/index/keys/constraints using the wizard (RIGHT CLICK > Tasks > Generate Script). In that wizard you will have options to create everything you need to. Once the structures are there, you can use the wizard to import the data contents.

Some of this is relatively basic ..and based on your posts, I hope your employer doesn't know how over your head your current tasks are.



Poor planning on your part does not constitute an emergency on my part.

Go to Top of Page
   

- Advertisement -