Microsoft SQL 2008 Generate script for the whole database

Today I come across a task that require me to backup all the scripts in ms sql server 2008 R2. I take a look at all possibilities then come into this solution:

1. Right Click the database that we wish to generate script from, then select -> tasks -> generate scripts…

2. Then it will open up the wizard to create the script

3. We also can specify the script for whole database or even to specific tables/stored procedures

4. Other than that we also can specify our preferred output type

Leave a comment