Just used this last night. Fixed 4,500 naming violations. Wow. I had no idea people here were so bad at keeping up with our internal naming conventions. Stuff like default constraints get ignored every time!
I have to say, thank you very much for providing this script.
Overall, this was one of the easiest scripts I ever used and I was in and out in 5 minutes. Beautiful.
My only "missing feature" complaint would be that it doesn't let me deploy this to a "dbacode" database and provide a @Database parameter to say which database to run it in.
My only "bug report" complaint is that the script can't handle situations where it is renaming a default constraint to one already in the database. Usually this happens when people rename columns. I personally don't mind hunting down the offending problem, though, and fixing it manually.
Since I didn't want to keep this code in the general production databases, I added this afterward:
drop table dbautils.aliasrules
drop synonym dbautils.aliasrulessynonym
drop function dbautils.fnGetFilteredObjects
drop function dbautils.fnGetFilteredTables
drop function dbautils.fnGetObjectAliases
drop function dbautils.fnStringList2Table
drop procedure dbautils.spFixColumnDefaultNaming
drop schema dbautils