how to generate database script with data in sql server 2008 R2

Please follow the below steps

1) Login in your sql server 2008 R2.

2) Right Click on your database and select Generate Script inside Task.

3) Now one window has open. In this window select Choose Objects in left hand side.

4) In this Choose Objects select radio button script entire database and all database objects.

5) Now Click on Next Button.

6) Now Select your path where you want save the database script

7) Now click on Advance Button .Please see below image.

8) Now one another window has open . Now go to Types of data to script inside General.

9) Now select schema and data from drop down in Types of data to script . Please see below image

10) Now Click on OK Button.

11) Than Next step is click on finish button.


About the Author