Solved

Large Log size

Posted on 2014-11-06
4
110 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
4 Comments
 
LVL 33

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
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…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

815 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now