Truncate Sharepoint database logfiles on dev environment

Running my sharepoint developer environment on a virtual machine on my laptop sometimes result in having my drives fill up.

Very often, since I’m not in a production environment I don’t really care about my transaction log files in the sharepoint content databases, and they can grow very large in a short while.

Using SQL Server Management Studio you can easely truncate your logs firing this SQL query, BUT DO SO WITH CARE!

DBCC SHRINKFILE("WSS_ContentDB_log", 1)
BACKUP LOG WSS_ContentDB WITH TRUNCATE_ONLY 
DBCC SHRINKFILE("WSS_ContentDB_log", 1)

DONT EVER DO THIS IN YOUR PRODUCTIONSERVERS!! LEAVE SQL SERVER MANAGEMENT TO DATABASE ADMINISTRATORS

Advertisements

, , ,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: