title: Not able to shrink database
body: <p>I have installed SQL Server 2017. I have created a test_db of size 512 mb and am trying to shrink the database using SQL query:</p>
  
  <pre><code>dbcc shrinkfile(N'test_db', truncateonly)
  </code></pre>
  
  <p>But i do not see the the database being shrinked. In case i use the following SQL query:</p>
  
  <pre><code>dbcc shrinkfile(N'test_db', 1)
  </code></pre>
  
  <p>the file gets shrinked to 3mb.</p>
  
  <p>Could you please explain the difference in the behavior?
  Since TRUNCATEONLY releases empty spaces at the end of the file, why is it not able to shrink the file when the data file is empty.</p>