MS SQL 2008 – Create a copy of the database without the data

Right click the Database and select Tasks -> Generate Scripts.

You can you then select all the objects you require or only certain objects.

There are some Script Options that you should look at:

  • Script USE DATABASE – You should set this to false if you are creating a new database with a different name.
  • Indexes & Triggers are not scripted as default
  • Logins & Object Level Permissions are not scripted as default
  • Generate Script for Dependent objects – this is set to false as default but you may want to change it to true to ensure that all objects are scripted.

You can either create these to a new Query Window or save them to SQL Files.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)