65.9K
CodeProject is changing. Read more.
Home

Generate script from Microsoft SQL Server Management Studio

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.80/5 (2 votes)

Oct 25, 2013

CPOL

1 min read

viewsIcon

10133

Generate script from Microsoft SQL Server Management Studio.

From Microsoft SQL Server Management Studio right click on database,  a pop up menu will appear.  From popup menu select tasks > Generate Scripts. A new dialog box called Generate and Publish Scripts window will appear. This window will look like below picture.

GenerateScript_1

From this window click on next button. Choose Objects option will appear like below picture.

GenerateScript_2

Now you can either generate script for all database objects or specific object. To do this just select one option.  If you select “Select specific database objects” then you have to select the objects from list.

Now click on next button. Set scripting options will appear like below picture.

GenerateScript_3

We will save the script to a specific location, that’s way select first option. choose the file name. Now click on Advanced button. A new window will appear like below picture.

GenerateScript_4

select “schema and data” option of Types of data to script. This will generate the schema as well data. Click on OK button. Click on next button and review your selection. Then once again click on next button and it will start to generate the script. After generate script just click on Finish button.

Job done.

The post Generate script from Microsoft SQL Server Management Studio appeared first on crea8ivecode.