Copying only the structure of a DB

  • I have a populated SQL 2000 database...and I'd like to make 2 empty copies of it....Basically, we want to populate 2 new db's with different data....but with the same structure as the original populated db.

    What would be the best way to do this?

     

    Thanks!

  • SQL Enterprise Manager, Select database, on Action menu, select All tasks, Generate SQL Script.

  • Make sure you choose to script out contraints, indexes etc when you generate the SQL Scripts.

  • Yes, thanks. I ended up scripting everything to do twith that particular db and it worked fine.

    Thanks!

  • Enterprise Manager, click on new (shell) database, On menu select Tools -> Data Transformation Services -> Import Data..., In DTS Import/Export wizard Click <Next>, choose a data source and Click <Next>, Chose a destination and Click <Next>, select <Copy objects and data between SQL servers databases> option and Click <Next>, for 'select objects to copy' screen uncheck <Copy data> (you may want to change additional options in this screen) and Click <Next>, Click <Next>, Click <Finish>.

    After you do it wants you will see that it is realy simple.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply