title: can a shrink be performed on the current database without specifying the database name
body: <p>We are connecting to a database in C# and then running a few sql scripts on it.</p>
  
  <p>I need to be able to shrink the current database without specifying the name. </p>
  
  <p>We do not have the database name in the program we are just given the connection and running the scripts.</p>
  
  <p>This is what I started with:</p>
  
  <pre><code>ALTER DATABASE SSSIndexes SET RECOVERY SIMPLE WITH NO_WAIT
  GO
  DBCC SHRINKFILE(N'SSSIndexes_Log', 1)   &lt;-- my issue is here
  GO
  </code></pre>
  
  <p>But I won't know the database name or the log file name.</p>
  
  <p>Can it be done?</p>