title: How do I shrink my SQL Server Database?
body: <p>I have a Database nearly 1.9Gb Database in size, and MSDE2000 does not allow DBs that exceed 2.0Gb</p>
  
  <p>I need to shrink this DB (and many others like this at various client locations).</p>
  
  <p>I have found and deleted many 100's of 1000's of records which are considered unneeded:
  these records account for a large percentage of some of the main (largest) tables in the Database. Therefore it's reasonable to assume much space should now be retrievable.</p>
  
  <p>So now I need to shrink the DB to account for the missing records.</p>
  
  <ul>
  <li>I execute <code>DBCC ShrinkDatabase('MyDB')</code>...... No effect.</li>
  <li>I have tried the various shrink facilities provided in MSSMS.... Still no effect.</li>
  <li>I have backed up the database and restored it... Still no effect.</li>
  </ul>
  
  <p>Still 1.9Gb</p>
  
  <p>Why?</p>
  
  <p>Whatever procedure I eventually find needs to be replayable on a client machine with access to nothing other than OSql or similar.</p>