I want to compare two stored procedures, and I need to find out which lines were added, modified or deleted in the new stored procedure.
You should be using source control on the scripts that you use to create/alter the stored procedures. You can use SVN or git for this. Then diffing the versions of the file becomes trivial, as the source control client will come with a diffing tool.
If you just want to diff two files, you can use WinMerge (free), which is great, or even FC.EXE (the file comparison tool that comes with Windows) to compare two files.
If you want a better (but more difficult solution to implement), I'd suggest using Red Gate Source Control on top of SVN or git. Red Gate Source Control integrates with SSMS, so you can commit changes and view differences within the tool.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With