I posted my script to create or drop all primary keys on the TechNet Wiki. You can find it at http://social.technet.microsoft.com/wiki/contents/articles/script-to-create-or-drop-all-primary-keys.aspx
. I first published the script here in 2009 and I've always wanted a way for the community to enhance it or correct it. The TechNet Wiki makes that possible. Visit the Wiki and see if you like this approach to publishing scripts.
If you would like to receive an email when updates are made to this post, please register here
Subscribe to this post's comments using
About John Paul Cook
John Paul Cook is a Technology Solutions Professional for Microsoft's data platform and works out of Microsoft's Houston office. Prior to joining Microsoft, he was a Microsoft SQL Server MVP. He is experienced in Microsoft SQL Server and Oracle database application design, development, and implementation. He has spoken at many conferences including Microsoft TechEd and the SQL PASS Summit. He has worked in oil and gas, financial, manufacturing, and healthcare industries. John is also a Registered Nurse who graduated from Vanderbilt University with a Master of Science in Nursing Informatics and is an active member of the Sigma Theta Tau nursing honor society. He volunteers as a nurse at safety net clinics. Contributing author to SQL Server MVP Deep Dives
and SQL Server MVP Deep Dives Volume 2
. Opinions expressed in John's blog are strictly his own and do not represent Microsoft in any way.