Automatic Scripting feature in SSMS

  • I've look at the option menu in SSMS to prevent automatic scripting to add [] brackets around each object name and I've found nothing interesting. I am aware that some objects name could not run properly if no brackets are added but this is ok, I want to go on still.

    There's a good article on option and scripting effects at but again nothing to satisfy my need.

    Is there a way or is someone succeeded this little twist (or a similar one that I could adapt?)

    Thks

  • Quite frankly I just find/replace..

    CEWII

  • Yeah It does the job but I would like to have that process automatic to avoid someone forgetting doing it.

    If it can be automated it will be less prone to forgetting it.

  • But if you remove the [] from around the column named [Column Name], the code is unusable. What's the point?

  • No object should have a space in them as well as being a SQL keywords. In others words, if brackets are needed, the object name is not valid.

    The main purpose of banning brackets [] it to be able to more efficiently search Schema.Object dependencies with third parties tools and custom ones. Dynamic SQL (even if highly restricted) still occurs and SSMS object dependencies can't detect them properly.

    Therefore when modifying something and tracking impacts, it will result in a more reliable way to make sure we've got a more precise overview of the job to do.

  • Plus it is slightly more efficient not using brackets than it's exact counterpart. So two birds one stone.

  • Did anyone ever find an option for this? I, too, am irritated by the brackets that get added to the scripts when they are generated. I don't need Microsoft to prevent me from creating field names with spaces. I've been doing this long enough to know it's a bad idea.

    I wish they would stop trying to protect users from themselves and stop adding such annoying "features"!

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply