How To Genrate DB Schema
How To Genrate DB Schema
Now you will see, a set scripting options dialog box. You can see various options regarding
where to save the script, you can chose location where you want to save you script, or can
select save to clipboard or save to new query window.
In Advance option, you can do the required changes for generating a script for the selected
objects.
That you can select based on your requirement.
Let’s see the option Types of data to scripts that allows you to choose a type of data to
script that can be either Data only, schema only or Shema and Data, by default it is set
to Schema only.
If you want script including both schema and data then select schema and data and click
on OK button.
After that click on Next button.
Once you click on Next button, you will see a summary dialog box, here you can review your
selections.
If you want to make some changes then you can click on previous button otherwise you
can click on Next button.
After clicking on Next button, you will see a dialog box Save Scripts, which let you know
the current status while scripting is being generated, currently it is in in progress.
Once it is completed, you will see a summary of all the completed script with status as
shown below.
If you want to save this report for your reference, you can click on Save Report button also.
Finally, click on Finish button to close the wizard.
Now you see the generated scripts in the specified location that you provided.
As you can see, the scripts is taken for Prod_Db, therefore when you execute this script a database
will be created with same name Prod_Db, including all the schema and data.