title: Alter Database in Stored Procedure
body: <p>I'm trying to create a new stored procedure to execute an <code>Alter Database</code> command to modify the database Service Tiers. </p>
  
  <p>So, I've tried to create the stored procedure but It doesn't work and it returns an error </p>
  
  <blockquote>
    <p>Incorrect syntax near '('.</p>
  </blockquote>
  
  <p>Could someone tell me how can I do this? Or where is the syntax error?
  I've run this one out of any stored procedure and it worked.</p>
  
  <p>Thanks in advance.</p>
  
  <pre><code>create procedure spChangeTiersDB 
      @MaxSize varchar(8), 
      @Edition varchar(20), 
      @Service varchar(5)
  as
  begin
       ALTER DATABASE DB_Name 
       MODIFY (
       MAXSIZE = @MaxSize,  
       EDITION = @Edition,
       SERVICE_OBJECTIVE = @Service)
  end
  </code></pre>