title: Estimate SQL Server CE Database size
body: <p>I have written a program to estimate the size of a SQL Server CE 2008 database based on the stops outlined in the article</p>
  
  <p><a href="http://support.microsoft.com/kb/827968" rel="nofollow">http://support.microsoft.com/kb/827968</a></p>
  
  <p>I do have the following queries.</p>
  
  <ol>
  <li><p>The database is used for desktop applications and hence I use the connection string to set the max database size to 4091. now when i run my estimation program, I get an output which is close to 8GB of used space. Why am I not getting any space related exceptions? </p></li>
  <li><p>The <code>.sdf</code> file size is just 156 MB. So how does this compare to the 8GB of used space? </p></li>
  </ol>
  
  <p>Thanks in advance</p>