title: Can you query the maximum database size based on the SQL Server license?
body: <p>Depending on the licensing and configuration of your SQL Server database, you may have have very different size restrictions. For example:</p>
  
  <ul>
  <li>SQL Server 2012 Express       has a limit of 10GB</li>
  <li>SQL Server 2008 R2 Express    has a limit of 10GB</li>
  <li>SQL Server 2008 Express       has a limit of  4GB</li>
  </ul>
  
  <p>Is it possible to <strong>query the database server to find out what the maximum size is</strong>?</p>
  
  <p>I can query to find out the current size:</p>
  
  <pre><code>name      DataFileSizeMB LogFileSizeMB  
  --------- -------------- -------------  
  master          4.875000      1.750000  
  tempdb          8.000000      0.500000  
  model           4.062500      1.000000  
  msdb           16.687500      4.562500  
  Harrison       21.937500     18.187500  
  Lennon        122.750000    425.625000  
  McCartney      19.937500     49.687500  
  Starr          19.937500     18.187500  
  </code></pre>
  
  <p>What I'm now after, is a way to find out what the maximum is, based on the <strong>licensing</strong> not the available HDD space.</p>