title: How do I grow a database file?
body: <p>I am trying to grow a database using the following the code below. However I get the following error.  How do I check for size (3600MB) and grow it if necessary?</p>
  
  <pre><code>USING MyDatabase
  
  ALTER DATABASE MyDatabase
  MODIFY FILE (NAME =  MyDatabase_data, SIZE = 3600MB)
  </code></pre>
  
  <p>Error: MODIFY FILE failed. Specified size is less than or equal to current size.</p>
  
  <p>UPDATE:  I am not using Auto Grow due to the heavy traffic.  Due to the setup I have here (long unrelated story) I need to make the change using code.  However, if this code runs more than once I get the error described above.  I need to check the size first before attempting the change again.</p>