views:

276

answers:

2

I'm using sql management studio 2005. When i copy all tables to remote database using Import tool, relation dont copy.
How to copy tables with relation.

+1  A: 

Copy Database, or Backup and Restore, or Tasks->Generate Scripts.

John Saunders
+2  A: 

You can use the 'Generate Scripts' when you right click the database and hit the 'Tasks' menu. You can choose in the following dialog to include the relationships between the tables. Only thing is that your data won't go over, just the structure.

If you want the whole shebang, a backup and restore is usually easiest.

Mitch Baker