Twitter

Follow SQLQuill on Twitter

Subscribe

MN Pass

How To: Set the Default Scripting Options in SQL Server Management Studio

I just spent 10 minutes looking for this, it’s very simple and fairly obvious.  I’m posting it so I don’t forget it and hopefully it may help others.

I’ve got to script out all tables, indexes, primary keys, foreign keys, defaults and the collation of all tables in all of our databases.  They all have to be the same style and the options I have to choose are slightly different than the defaults.  To make fast work of this, I’ll change the defaults to be exactly what I want then from my Central Management Server, I script each and every database I need.

Here’s how to set the defaults:

In SQL Server Management Studio, go to Tools –> Options.  Expand the SQL Server Object Explorer list and select Scripting.  Change what you want, close this window and Ta-Da the next time you generate scripts, the defaults are set.

 Tools --> Options