views:

16

answers:

1

I have 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.

A: 

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.

pinkfloydx33
thanks, it worked
vicmp3