0

Are there any free tools/ plug ins for simple refactoring/ code formatting in SQL Server Management Studio?

Really the only things I'm looking for are indentation, and variable renaming.

For example, in Visual Studio, I can do CTRL+R, CTRL+R and it will pop up a window allowing me to rename the variable the cursor is on.

Similarly, I can do CTRL+K, CTRL+D and VS will auto indent my code to the appropriate levels.

If there was a way I could perform those two functions in SSMS, that would be great.

Either SQL Server 2008 or 2012 would be fine.

rageit
  • 3,513
  • 1
  • 26
  • 38
imdandman
  • 393
  • 2
  • 6
  • 15
  • RedGate SQL Tools are not free. You can get a free trail though. – rageit Jul 03 '14 at 20:38
  • For formatting refer to - http://stackoverflow.com/questions/401928/sql-formatter-for-sql-management-studio – rageit Jul 03 '14 at 20:43
  • I'd say that because variables are really only used within the scope of a single procedure find and replace is your friend here. Can't speak to the indentation. See also [sp_helpText](http://msdn.microsoft.com/en-us/library/ms176112.aspx) – Brad Jul 03 '14 at 22:10
  • Doesn't SSDT have a pretty smart refactor? – Aaron Bertrand Jul 04 '14 at 17:32

0 Answers0