My SQL Server is Out Of Disk Space

As the DBA, you get a call from the IT Team who monitors disk space and they tell you the following:

“One of our server that has SQL Server running on it is running low on disk space. It has gone from around 60% disk utilization to 95% disk utilization just overnight. Whats the problem?”

In this case it happens that this is a server that you have never seen before. Someone installed a SQL Server to test out something product along the way, they never told the DBA about it, and suddenly this sever has become an important part of the company internal tools.

Sound familiar?  I know I have been hit with this before.

 

Right off, you have never seen this server before, you have no established baseline to compare it to, and you need to find out why it is running out of disk space rapidly. For me, some of the first things that would cross my mind would be:

  • Has anyone installed a new database or product new on this server recently?
  • Are any of the databases growing rapidly?
  • Are backup files being saved locally?
  • Are backups being run at all?
  • How big are each databases data files and log files?
  • Is there something outside of SQL Server taking up space?

Before I start troubleshooting I am going to just remote desktop to the server and double check the disk space myself to be sure that someone hasn’t misinterpreted the disk utilization.

DiskSpace1

 

At first glance the free disk space is 4.39GB out of 63GB.

DiskSpace2

 

 

As I am thinking about where to look first, the disk space drops to 2.28GB free.  Now I am very concerned.  I know that the C: Drive is filling up, this sever only has a C: drive, and if the Windows operating system runs out of disk space on the boot drive C:, then the server will crash, and often times will no longer boot.  Now things are serious, and must be dealt with quickly.

Now to start hunting, I could dig out several dozen of my favorite trouble shooting queries, or I could just run Database Health Monitor to start troubleshooting the issue. Database Health Monitor is my quick choice to track down problems like this.

I start up Database Health Monitor and connect to the SQL Server that is running out of space, to start looking around.

Initial View

 

Not immediately jumps out.  I see 12 databases on this SQL Server, and I see that the PerformanceTrouble database is using more CPU than any other database on the system.  Now to start looking at individual databases. The first database listed is called BadDB.  For this demo I am using a SQL Server that I use to test the Database Health Monitor Application, and I tend to use names that are descriptive of what the database is intended to do.

FirstDatabase

 

From this database I can see a few red flags. Well, we learn that the Database and Log files all exists on the C: Drive, and that this could cause the database to run out of disk space if the database grows, but this database isn’t very big, its only a few Megabytes, so I am not worried here.

Next I take a look at the Real Time Reports for Backup Sizes:

BackupSizes

 

For this database I can see that it has grow over the last year from around 2 megabytes to around 10 megabytes. All really small.  I also notice from the File names that the backups are being saved on the C: drive too.

As I click through the rest of the databases I see very similar results, its not great, but none of them are very big until I get to the database called PerformanceTrouble. Database Health Monitor shows this overview.

ProblemDatabase

 

Now this page points out a few things.  In bright red, there is a notice that shows the amount of log space allocated and being used by this database is around 24GB, for a database that is only 341MB in size.  This is an indication that backups are not being run, or that backups are not being run often enough, for instance log backups.  On this same page, I can see that the last full backup was run today at 5:00am.  I then click through the rest of the databases and nothing jumps out anywhere near this problem.

At this point I have spent about 3 minutes running Database Health Monitor, and I have found one problem that is using up about 33% of our entire hard drive.

 

How do we fix this issue?

First if I just doubleclick the Large Log File warning at the bottom of the application, my browser will open with one solution. There is a solution presented that looks a lot like this:

First we run this query to get the names of the log files.


-- check the size of the files.
SELECT size / 128.0 as sizeMB, name
FROM sys.database_files;

LogFileSizing

From that query we see that the name of the log file is PerformanceTrouble_log, the script below would get updated that your actual database name and log file name. The following script will shrink the log file for this database to around 1mb.

WARNING: Running this script will disconnect all other users from the database. Only run this on a production database if you have no other option.

-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE PerformanceTrouble SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (PerformanceTrouble_log, 1);
GO
-- Reset the database recovery model.
ALTER DATABASE PerformanceTrouble SET RECOVERY FULL;
GO
-- Be sure to do a full backup, then kick off transaction log backups

-- check the size of the files.
SELECT size / 128.0 as sizeMB, name
FROM sys.database_files;

Once the script is run we can see that the log file has been shrunk from the 24GB to be around 1MB.

When we check the drive space on the server it now looks like this:
CDriveAfterScript
Now we are no longer at the the critical point where we think the server is going to run out of space, but there are two things that should be done next.

1. Run a full backup of this database.  If your SQL Server were to crash before the full backup is run you would have no way to recover back to the current point in time.

2. Monitor and confirm if the database log is continuing to grow, or if this was maybe a one time event that caused it to grow this large. If you determine that it is still growing then research and find out what is causing the transaction log to fill up.  You can use many of the features of Database Health Monitor to do this research.

 

The overall troubleshooting process took about 3 minutes, and the time to fix this issue only took around 2 minutes.

Setting Time Zones in Uzility

Uzility supports distributed teams in multiple time zones by allowing each user to set their own time zone for their login.

Here is a short YouTube video showing how to change the time zone on your account in Uzility.

 

Visit Uzility.com for more details.

Uzility Board Background Images

Uzility is introducing the new board background images. Anyone using Uzility can set a custom background image on any of their boards. This is a new per user setting, allowing for the personalization of the agile board that everyone should have access to.

Some competitors offer the ability to set the background image only in their premium package. This new feature is available to everyone using Uzility regardless of the package they are using. Backgrounds are even available on the free single user product.

Over the last year we have added many features to Uzility, this one however is one of the more fun features that I have worked on.
Here is an example of a personal board that I have configured with a custom background, this board is being used to plan a family trip to Vancouver Canada.

BackgroundBlog1

Another example is my “development” board, for this board I have specified a blue gradient background that I found using the Google image search feature.

BackgroundBlog2

Here is how it works. First if you don’t already have a background, go to Google or your favorite search engine, and search on large background images. Once you find one you like, download it to your computer. Now you are ready to set that image as your board background.

Right click on the empty space on the background of one of your boards. Choose Backgrounds … Set Board Background.

BackgroundBlog3

You will be prompted with the Add Background dialog. Click the “Choose File” button and browse your computer to find the image you downloaded earlier.

BackgroundBlog4

Once you have selected the file, just click the “upload” button and your page will refresh with that image as your board background.

BackgroundBlog5

 

 

Your board is now transformed from a plain white background to any possibility of amazing images.

This background will only be available to you, other users will need to set their own background.

You can set a different background on each of our boards in the Uzility system.

 

Visit http://Uzility.com to find out more.

New Uzility Card Designs. Which do you prefer?

As we have been building the Uzility agile product, we have been following agile development principles, following the release early, release often and get customer feedback.

There have been things that we have tried, and things that we have learned from, and updated or changed. Its interesting when you have a design for part of the system that you think looks good, then the graphics designers and UI/UX team takes a look at it and they provide new designs. It goes to show how valuable it is to have great designers on the team.

Here is an example, the card design prior to last week:

SimpleKanban
And the new look of cards in the Uzility system based on the designs from our graphics design team:

New Style 1:

newCards1

 

New Style 2:

newCards2

 

With both styles, the color of the card represents who the card is assigned to. Each user can choose their own color. Also with both, there are 4 icons that can be shown that represent Comments, Acceptance Criteria, Point Estimates, and File Attachments. If the icon is shown it means that those items have been entered on a card.

For instance, the following card which shown first with style 1, and style 2 has three icons. One that represents that there are 3 comments on this card / user story, the second shows that there is one acceptance criteria, and that the card has been estimated at 8 points.singleCard1

singleCard2

 

I hope that everyone agrees that both of these designs are better than the original, but that I am trying to decide on is which one to use as the default.  Both styles are available to the Uzility user, but which one should I set as the default for new customers.

 

New Style 1:

singleCard1

 

New Style 2:

singleCard2

Please cast your vote by posting a response to this posting, and let me know which style (1 or 2) should be the default.

This is part of what I love about agile so much is getting customer feedback.

 

thanks!

-Steve Stedman

Founder Uzility

Agile Terminology – Sunday Fun Crossword – Answer Key

Please click the read more link to get the answers to the Sunday fun Agile crossword puzzle.

Read more of this post

Agile Terminology – Sunday Fun Crossword

AgileCrossword1

Across

1. These are specific criteria identified by the customer for each functional requirement.

2. Work in Progress.

Down

1. A timeboxed task to go research a specific item with the deliverable being the results of the research.

2. Sequence of numbers used in Planning Poker.

3. A relative number describing how much work the team can get done over a period of time.

 

Check back at 7:00pm pacific for the puzzle answers. http://SteveStedman.com