Q:

Generate a file or a script that can be used to reconstruct a database on a different PC

I'm trying to copy a database that I created in SQL server 2008 on a new PC without having to do so manually by creating a database on the new computer and recreating all the tables from the scratch. The copy doesn't have to have any of the data stored just the tables and the diagram, Is this possible? I read about restoring  or exporting the database but neither got me anywhere.

A:

Using ssms, Right click the database .. tasks.. generate scripts and export the database as schema only. Schema only does not have data.
See reference : https://www.mssqltips.com/sqlservertip/2500/sql-server-2008-r2-generate-scripts-wizard-with-database-schema-and-data/

