Auto Generate (Some particular)Change Scripts in SSMS

Hi All,
How are you doing?

We all know that Change is a rule of life …. And pretty much that applied to SQL Server as well 🙂

Yes, my point is to find out the changes we have done in current SQL Server so we can deliver into the next environment i.e. UAT/Test or Production etc. People follow lots of ways to find/generate change scripts for SQL objects for their creation and modifications.

But I would like to draw your attention to a facility/functionality which is provided by MS SQL Server Management Studio by default. But by default this is disabled and thanks to GOD for that.

Why I am saying that, because it does not catch all the changes we do in SSMS. Well, there are 2 sides of this matter. By providing this, Microsoft is saying that … OK, new modifications done in designers can be automatically scripted. But on the other side, just by enabling this option, we should not consider that it becomes like source control functionality.

But as in developer’s perspective, the name of this option should have changed to something else but definitely NOTAuto generate change scripts“. Because change could be anything and we expect it from SSMS if we enable this option.

I am sure you will do RnD on this to check it out. So just let me show you that functionality still works for new modifications in SSMS.

For this demo I am going to use SQL Server 2012 RC0.

Open SSMS. Go to Tools -> Options.

Select “Designers” -> Table and Database Designers on left side of the dialog box. On right side, enable the “Auto generate change scripts”. Click ok.

I have a dbo.TestTable which has only one column i.e. Test nChar(10) Nullable.

I am going to add one more column i.e. Column2 using the SSMS designer.

And click on save button. One dialog box will popup which shows the change script for this table.

I encourage you to post your innovative ideas, comments or suggestions on this point.

Thanks, Khilit

Rate this post

Leave a Reply