« Getting Ready to do Something you Might Regret? | Main | Scripting Anomalies, SSMS 2008, sprocs, and sp_executesql »

April 07, 2009

Another SSMS 2008 Improvement: DROP and CREATE

In a recent video on improvements added by SQL Server Management Studio 2008, I covered a number of bigger, and even smaller, changes to SSMS introduced in SQL Server 2008.

One very cool (and very subtle) feature I didn't explicitly call out though deserves some mention: the new addition to generate DROP and CREATE scripts in a single action.

DropAndCreate

Granted, all this option really does is combine the ability to independently generate DROP and CREATE scripts so it's not that big of a deal.

But it can help out in a number of scenarios, and I've found it actually quite useful in a number of recent DBA-related activities where I was cleaning up objects and wanted to ensure that I also had rollback scripts and so on…


Bookmark and Share


Comments

Be very careful once you use this option to create the script (to a SQL File) & then run that SQL file. If you generate the script & run it, it will first DROP the Current Table & Create a Brand NEW table, that means all Data Gone.

I'm pretty sure people know this, but alerting :)


 

Post a comment

(Not displayed - [privacy policy])

Remember personal info?

 

spacer