I have copied a database but I did not take precautions and copied only data, not the schema.
I realize this when by doing some validations the new database was accepting duplicates, and some keys were ignored.
Now I know that the solution to copy the database is to script the database schema and data using SSMS
The procedure is:
Right click on the database. Choose tasks. Then choose generate sql
scripts.
Now I am asking for some advice in how to rollback the situation and this time copy the data and schema of database. Is there a way to copy just the schema and apply the changes to data?
What approach would you recommend?
Using
you can generate the schema of your database and same way with the data of your modified database. Then generate database and fill it using your generated SQL script.
Create SQL script that create database and tables