Solved

Large Log size

Posted on 2014-11-06
4
115 Views
Last Modified: 2014-11-23
Hi,

I have a database with the following statistics:

Database Name      Log Size (MB)      Log Space Used (%)       Status
CM_XXX                       71582.24                       0.2899746                        0

So the log size is quite large nearly filling up the disk. So does this indicate an issue why the log is so large,
yet % full is so small.

Is the recommendation to shrink the database or shrink the files.

Also can this be done while the database is being used. Do need to have this amount of space free on the same size as the log drive or does it use windows\temp?

Thanks,

Ward
0
Comment
Question by:whorsfall
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 34

Expert Comment

by:ste5an
ID: 40425769
7GB is not really that much space. The size of the log tells you that you had operations which reqired that much log space. When you haven't done anything which broke ranks, shrinking makes imho not much sense.

Yes, you can shrink it while the database is online. Just use the SSMS task Shrink > Files.
0
 

Author Comment

by:whorsfall
ID: 40425817
Hi,

Thanks for your answer. Sorry I might not of been clear in my explanation the size of the file on the disk is:

69.9 GB (75,059,429,376 bytes) - This is what was concerning me.

So does that change things at all?

Thanks,

Ward
0
 
LVL 88

Expert Comment

by:rindi
ID: 40425848
Make sure your backup utility is SQL aware, and that it does full backups, and that it is successful with the backups. That will cleanup the logs.
0
 
LVL 69

Accepted Solution

by:
Scott Pletcher earned 500 total points
ID: 40426430
You need to check the recovery model for the db (SIMPLE, BULK-LOGGED, or FULL) and what, if anything, is preventing the current log space from being re-used.

SELECT log_reuse_wait_desc, recovery_model_desc, *
FROM sys.databases
WHERE name = '<your_db_name>'

At this point, I'd suggest initially clearing the log rather than backing it up.  You wouldn't ever want to take the time to use a log that big for a forward recovery anyway.
0

Featured Post

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question