Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top