Solved

Large Log size

Posted on 2014-11-06
4
114 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

739 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