开发者

Exporting tables and indexes from one SQL Server 2000 database to another

I hav开发者_如何学编程e a SQL Server 2000 database and some tables in a database.

I want to export them (the structure, definition and indexes) to another database.

I don't want to copy the entire database, only some tables. And it doesn't matter the data that I have in the tables. Is there a form to do it??

I know the export data option but I've tried it and indexes are not created in the tables.


In Enterprise Manager right click on the database name and pick All Tasks->Export Data. Select the source databse, hit next. Pick the destination, hit next. Now pick Copy Objects and data between SQL Server databases and hit next.

  1. Check Create destination objects (tables, views, stored procedures, constraints, etc.)
  2. Check Drop Destination Objects First
  3. Check Include all dependent objects
  4. Check Copy Data (if you want the data)
  5. Uncheck Copy All Objects
  6. Uncheck Use default options
  7. Press the Select Objects button
  8. Pick the objects you want to copy and hit ok
  9. Click the options button
  10. Select all options except for Generate Scripts in Unicode (unless you want that), hit ok.
  11. Next, Next, Finish

You should be all set.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜