Enhanced “Generate Scripts” dialog box in SQL Server 2012 RC0

Hi All,
I have been monitoring the “Generate Scripts…” functionality of SQL Server Database.

One thing bothers me for last few years or since SQL Server 2005 is that once I right-click on any database -> Tasks -> Generate Scripts, I would expect to generate scripts only for that database which I have selected. But rather Generate Scripts dialog box list down all the available databases using SMO queries and allows me to choose any other databases at that time.

I understand their concerned about the facility to choose other database and go ahead with the operation. But the problem is when you have lots of database on SQL Server, it takes time for this listing. And as a developer it’s a pain in head πŸ™‚

Time by time Microsoft enhanced this feature. E.g. in SQL Server 2005 edition, you cannot script the data, but in SQL Server 2008 onwards, you can scripts data as well so it will create insert scripts for you which is very handy for any fresh machine deployment. Thanks for that.

In SQL Server 2012 RC0, they have changed “Generate Scripts…” dialog-box and you know what, they have removed the functionality of listing all the databases in this dialog box.

Think about it, you are selecting only one database for generating scripts, so the generate scripts dialog box takes that selected database as parameter and work only for that database. e.g. checks for my credentials are enough for performing this operation for all objects in this database etc. so the scope for any validations are limited to only one database. And what it gives us -> faster interactivity with dialog box. I like it really πŸ™‚

Check out the following new version of “Generate Scripts”:
Launch “Generate Scripts” dialog box.

You will see following.

You will notice totally new dialog box with new layout. Click on Next.

By default entire database will be scripted but you can choose your required objects. And click next.

Set Scripting Options has 2 modes: Either Save scripts to a specific location or Publish to Web Service. I will post a separate demo for second option i.e. “Publish to Web Service”.

So far for “Save scripts to a specific location” mode, you will see “Advanced” button where you can find all accumulated options for scripting πŸ™‚

Review the summary of operation. Click on next.

Click on Finish.

Enjoy the new feature.
Thanks, Khilit

Rate this post

One Comment

Leave a Reply