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

x
?
Solved

Managing SQL log files, SQL Server 2014

Posted on 2016-11-14
6
Medium Priority
?
115 Views
Last Modified: 2016-11-15
Hello, I have a SQL server that is running two databases. The log files for the two databases are quite large. Both are between 15-20GB. The recovery mode is full. They are eating up a large portion of my disk space. The autogrowth/maxsize appears to have been set incorrectly by the person I took over for (it's set to 2TB). I believe this was a mistake.

Can I change the autogrowth/maxsize while it is in production?
Can I set it smaller than what the initial size is?
I keep reading about the best practices on what to actually set the max size to and I'm confused.

Disk Usage report on one first database:
Total Space: 30.51 GB
Data Files Space Reserved: 12,944.38 MB
Transaction Log Space Reserved 18,293.19 MB

Disk Usage report on the second database:
Total Space: 30.31 GB
Data Files Space Reserved: 10,682.81 MB
Transaction Log Space Reserved: 20.358.06 MB

I need to free up space if this is set all wrong, I want to make sure this follows best practices at the same time, I appreciate everyone's time!

My experience with managing SQL is quite low at this point, so I apologize in advance if this question is put together poorly, or lacking necessary info, I'll add anything missing on request.
0
Comment
Question by:Kyle Power
[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
6 Comments
 
LVL 34

Expert Comment

by:Brian Crowe
ID: 41887055
First question to answer...How often are you performing a transaction log backup?
1
 
LVL 23

Expert Comment

by:yo_bee
ID: 41887144
Do you need Recovery Mode Full for your databases?  If not you can save space.
the only need to have Recovery Mode Full is if you need to restore to a very granular level.

If you set it to Simple Mode and enable Auto Shrink to True you can truncate all the space in your logs to about 1 MB.
1
 
LVL 30

Expert Comment

by:Pawan Kumar
ID: 41887300
Excellent question by Brain.

Actually user sets recovery model to full & forgets to do transaction log backups. You have to switch to the simple recovery model or start backing up your logs. :)
0
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 
LVL 71

Accepted Solution

by:
Qlemo earned 1000 total points
ID: 41887522
Background info: in Full Recovery Mode the transaction log has to keep all changes between two transaction log backups. If there is no such backup, all changes are contained. Of course the log file gets very big that way.
In Simple Recovery Mode only active (open) transactions are kept, until all changes are reliably written back into the data file(s).
As said, your choices are to either switch the recovery mode or perform transaction log backups.
If you want to keep Full Recovery Mode, you'll nevertheless need to switch to Simple, truncate the log, switch back to Full Recovery, perform a full backup, and then set up the transaction log backup.
0
 
LVL 13

Assisted Solution

by:Máté Farkas
Máté Farkas earned 1000 total points
ID: 41887724
You don't need FULL Recovery model if you don't use one of the following technologies:
 - Transaction Log backups
 - Mirroring or AlwaysOn HA solution
 - Logshipping
 - Transactional replication
 - Change data capture

You can switch between recovery models, autogrowth setting or shrink log also in production. Server will not stop or restart.
0
 

Author Closing Comment

by:Kyle Power
ID: 41888863
Thanks guys! Brian, sorry I was slow to reply. I have set the recovery to simple and shrunk the log files, set back to full and set the limit to something much more reasonable. Logs will be truncated by Veeam.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

721 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