Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Large Log size

Posted on 2014-11-06
4
Medium Priority
?
116 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 35

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 70

Accepted Solution

by:
Scott Pletcher earned 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

704 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