title: Why is SSMS altering my stored procedures (re-formatting, changing exec to EXECUTE, etc.)
body: <p>SSMS is suddenly re-formatting my stored procedure - it has never done this before. Here's an example of what I'm talking about. Here's the start of the stored procedure I created last week:</p>
  
  <pre><code>CREATE PROCEDURE [dbo].[usp_LoanDataNames]
  (  
  @LoanID varchar(max) = null,
  @Columns varchar(max) = null,
  @DataNames NVARCHAR(MAX) = '',
  @SQL NVARCHAR(MAX) = ''
  )
  AS
  </code></pre>
  
  <p>All the stored procedures I created before today still have that format. But when I create a new stored procedure today, with the same exact format as above, and then pull up the stored procedure script, it looks like this:</p>
  
  <pre><code>CREATE PROCEDURE [dbo].[usp_LoanDataNames2]
  @LoanID VARCHAR (MAX)=NULL, @Columns VARCHAR (MAX)=NULL, @DataNames NVARCHAR (MAX)='', @SQL NVARCHAR (MAX)=''
  AS
  </code></pre>
  
  <p>This is a different format than before. It moved all the parameters up to immediately follow the stored procedure name, and put them all on the same line.  Also (and I didn't bother posting the entire stored procedure so I didn't post this part), it changes <code>Exec</code> to <code>Execute</code>. And it changes the indenting on various lines, and changes many lowercase words to uppercase.</p>
  
  <p>It even will change the formatting if I do it this way:</p>
  
  <pre><code>CREATE PROCEDURE  [dbo].[usp_LoanDataNames] 
  AS
  
  DECLARE 
  @LoanID varchar(max) = null,
  @Columns varchar(max) = null,
  @DataNames NVARCHAR(MAX) = '',
  @SQL NVARCHAR(MAX) = ''
   )
  </code></pre>
  
  <p>It will change that to:</p>
  
  <pre><code>CREATE PROCEDURE [dbo].[usp_LoanDataNames2]
  @LoanID VARCHAR (MAX)=NULL, @Columns VARCHAR (MAX)=NULL, @DataNames NVARCHAR (MAX)='', @SQL NVARCHAR (MAX)=''
  AS
  </code></pre>
  
  <p>Any idea why this is happening?  We have certain standards we use here, and the original stored procedure is formatting my company prefers. The problem is I CAN'T use that formatting anymore, because every single stored procedure I create or alter automatically re-formats now. Any ideas?</p>
  
  <p>Thank you.</p>