1

I am always trying to keep a "tight clean ship", or whatever the original English saying is, even though it looks like a "monkey business" to manually format any word that I am typing. I am even using the square brackets ('[' and ']') in order to enclose any data type or variable, even when it does not contain any spaces.

However, doing this kind of work for hundreds of stored procedures looks like a titanic work. How to get things nicely formatted, without working unnecessarily?

From the available formatting tools, I have found SQL Pretty Printer that looks quite intelligent and that I might even install when I have enough rights to download more than two bytes of data from the outer, non-corporate cybernetic world. Security can be daunting these days.

Also, I am not using any source control and therefore I have to rely on my own insect-like prismatic brain in order to understand whatever I have modified, along the way. This way, I have to use comparing tools like WinMerge, or the one that is included inside Total Commander. Possibly, they might already have some facilities for T-SQL that I have not figured out yet.

  • Welcome to Software Recommendations! Why don't you use a source control system (like git?) to do the change tracking system for you? Manually remembering and checking any changes an automatic source formatted might do to your sql files sure sounds like a titanic work. – Angelo Fuchs Apr 16 '15 at 13:23
  • I have not used git so far. I do not know whether it is the preferred source control utility software application that might be used in conjunction with the Microsoft SQL Server Management Studio. I expected a recommendation like the Microsoft Visual SourceSafe that has died in October 2005. Also, I am attempting to improve a secondary database server where I do not know whether I can install anything I feel like. Even installing Notepad++ feels like quite a daunting task in a secure corporate world. – user13710 Apr 16 '15 at 13:38
  • You really need to be using some form of source control, as others have mentioned. For formatting, I'm a fan of SQL Complete. It has incredibly detailed source formatting settings (including your preference to always bracket identifiers), and can batch-format files. – David Apr 17 '15 at 17:51
  • Thank you for commenting, @David. In the meantime, I have already installed SSMSBoost. I have not yet checked all of the possible configuration options. I shall try SQL Complete soon, also. About git, that sounds like a more challenging endeavour. I could attempt to install it on a secondary server, but I do not dare yet to install it on the live server. What if I mess up everything that already goes live? – user13710 Apr 20 '15 at 6:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy