Thursday, 24 November 2011

SBS 2008 C drive runs out of space - shrink SharePoint database log file

I have seen serveral cases recently where a server running Small Business Server 2008 has run out of space on the C Drive. Using Tree Size, I identified a folder which contained a large amount of data:


The area of this folder which contained all the data was


This folder contained many SQL databases and log files, and after some research I discovered that my largest files were Transactional Log files for Sharepoint.

The biggest of these files was


 and was up to 16Gb in size, but other culprits were


Large SharePoint log files

All these files are log files which can easily be shrunk down to a manageable size. SQL Server Management Studio is required for this.

To run SQL Management Studio, select

Start > All Programs > Microsoft SQL Server 2005 > SQL Server Management Studio Express


Server name is

Then select Connect

Expand Databases and locate the datebase with the large log file

Right click on the database and select New query

The query window will appear on the right. Enter the following text:


Then click the Execute! button

If the database name contains a ' - ', you will get an error message (below).

In this case, the database name must be surrounded by " ", eg:

ALTER DATABASE "SharePoint_Config_29c26fca-17b8-48c1-9704-b869932abcb6" SET RECOVERY SIMPLE;

Then select Execute!

You should see a message which reads Commad(s) completed successfully

Next, Select the database

Right click > Tasks > Shrink > Files

Change File type to Log

Click OK

Once this process has completed, right click the database again and select New query
Enter the following command (use " " around database_name if it contains ' - ')



Browse to the folder location


and you should see a big difference in the size of the log file.

Tuesday, 2 August 2011

Backup Exec job status switches between Queued and Loading Media

I needed to restore two files today, which were backed up to external hard disk using Backup Exec (v12.5). I connected the drive which contained the backup data, then ran an inventory. I then created a restore job, selected my files to restore, then started the job running.

The Job Status changed to Queued, then to Loading Media, then back to Queued again.
This cycle continued, and the job would not start, it just remained cycling between Queued and Loading Media.

I resolved this bythe following process:

Select Devices, then in the Devices panel, right click the server name, then select Pause

Right click the server name again, then select Backup Exec services, then select Restart all services.
Wait for all the services to restart, then click OK to the messages that are displayed.

Right click on the server name in Devices again, and remove the tick from Paused

Restart all the services again.

Once I had done this, I ran the backup job again (Right click, Retry Job Now), and the job completed without any problem.


Sunday, 31 July 2011

SBS 2008 - Move Exchange Database

Today I have been addressing a problem with a Small Business Server 2008; the C drive has run out of space. The first indication of a problem was when the users reported that external email had stopped being delivered. After some basic troubleshooting I noticed that space on the C drive was the problem. An SBS 2008 feature called "Back Pressure" was preventing any more mail being delivered, I will cover how I made a temporary fix to this problem in a separate post.

To help with the problem of low disk space on C:, I decided to move the Exchange database files and logs to the D: drive, which had plenty of free space. Having done this with Exchange 2003 I was pleasantly surprised to find that SBS 2008 included a wizard to automate the process. 

Before starting this process, I have made sure that all users have closed down Outlook, and advised them that email will be unavailable until I let them know otherwise. First, I opened the SBS Console, then selected Backup and Server Storage, then the Server Storage tab. I can see my available drives, along with a warning that C: is low on space.

This clearly showed the problem. Storage Tasks on the right hand side included the option Move Exchange Server Data - the first on the list. After selecting this, the Move Exchange Server Data wizard starts, and I get a message saying Checking you server... This may take several minutes. And it does, but not too long.

When it is ready, I get the option to back up my data before proceeding. 

I've not done this process before, so decide a current backup would be a good idea, so I select Yes, and the backup begins. This server is configured to use SBS 2008 backup feature, and already has an external drive attached for backup. I presume my current backup settings are used. If the server backup was not in use, I expect I would have to enter some additional information at this point.

The backup takes a while, about 30 minutes. Once it is done, I am now ready to choose the new location for my Exchange data.

There is no option to choose the location or path for the new data location. I am only presented with a list of available drives. In my case, the D: drive. I leave this highlighted, then select Move.

The data move does not take long.

Once I see the message telling me the data move was successful, I select Finish, then test email by asking on of the users to open Outlook. Everything appears fine.

I check the D: drive and can see the new data location is D:\Program Files\Microsoft\Exchange Server

I am slightly surprised that I have not reclaimed more space by moving the Exchange files. After using TreeSize to scan the C: drive, I discover that two folders are taking up most of my space:

C:\Windows\SYSMSI - 11.5 Gb
C:\Windows\winsxs - 12.5 Gb

I will write how I solved the problem of these two folders taking up so much space in a separate post.