We have databases with large numbers of tables. We have a separate database for each year. For various reasons, we need to export about 100 of the tables (Structure only, not their data) from last years database into this year's database. What is the best method for doing this? The import/export wizard creates the tables but does not bring in important things like keys.
Regards Shirley A
hi Shirley,
if you are using sql server 2000.
you can use the enterprise manager.
you can right click the database click on "all task" and then
click on "generate Sql scripts" then clcik on options.
click on the objects you need such as PKs, triggers and foreign keys"
for Sql server 2005 you can use the Management studio
right click the database. clcik on task. clcik on generate scripts
and check the options that you need.
after you generate the scripts run it on the new server
regards,
joey
|||
Thanks very much, that worked a treat. I used Enterprise Manager as our databases are SQL Server 2000. Regards
Shirley
No comments:
Post a Comment