Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You should not delete any of the database files since it can severely damage your database!</p> <p>If you run out of disk space you might want to split your database in multiple parts. This can be done in the database's properties. So you are able to put each part of the database to a different storage volume.</p> <p>You also can shrink the transaction log file if you change the recovery mode from full to simple, using following commands:</p> <pre><code>ALTER DATABASE myDatabase SET RECOVERY SIMPLE DBCC SHRINKDATABASE (myDatabase , 5) </code></pre> <p>Switching back to full recovery is possible as well:</p> <pre><code>ALTER DATABASE myDatabase SET RECOVERY FULL </code></pre> <p><strong>Update about SHRINKDATABASE</strong> - or what I did not know when answering this question:</p> <p>Although the method above gets rid off some unused space it has some severe disadvantages on database files (MDF) - it will harm your indexes by fragmenting them worsening the performance of your database. So you need to rebuild the indexes afterwards to get rid off the fragmentation the shrink command caused.</p> <p>If you want to shrink just the log file only might want to use <a href="http://technet.microsoft.com/en-us/library/ms189493.aspx" rel="noreferrer">SHRINKFILE</a> instead. I copied this example from MSDN:</p> <pre><code>USE AdventureWorks2012; GO -- Truncate the log by changing the database recovery model to SIMPLE. ALTER DATABASE AdventureWorks2012 SET RECOVERY SIMPLE; GO -- Shrink the truncated log file to 1 MB. DBCC SHRINKFILE (AdventureWorks2012_Log, 1); GO -- Reset the database recovery model. ALTER DATABASE AdventureWorks2012 SET RECOVERY FULL; GO </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload