<p>When I shrink a sql server database using the GUI (All Tasks->Shrink Database->Accept all defaults, click OK), it finishes quickly.</p>

<p>But if I run this command, it takes a very very long time.</p>

<pre><code>DBCC SHRINKDATABASE('my_database')
</code></pre>

<p>What am I missing?</p>

<p>This is in SQL Server 2000.</p>

If I recall correctly the interface will leave about 20% grown space, running DBCC SHRINKDATABASE without any parameters shrinks it to as small as possible.
I don't have Enterprise Manager handy to check the defaults.  But you should notice a smaller database file with the manual run than the GUI run, thus the time difference