Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MS SQL DBLog file huge

Posted on 2016-07-18
7
Medium Priority
?
49 Views
Last Modified: 2016-07-19
Greetings, the *.ldf file has suddenly grown large. Should I force a commit or rollback? Not sure how to determine next step. The volume hosing the DB is nearing 0 bytes.

Thanks,
johnD
0
Comment
Question by:johndarby
[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
7 Comments
 
LVL 13

Expert Comment

by:Dustin Saunders
ID: 41717845
Is your DB bulk logged, and if so, does it need to be?
0
 
LVL 1

Author Comment

by:johndarby
ID: 41717852
I don't believe so
0
 
LVL 1

Author Comment

by:johndarby
ID: 41717899
How do I set to minimal logging and reduce the size of the DBlog.ldf file?
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 13

Accepted Solution

by:
Dustin Saunders earned 1000 total points
ID: 41717916
To shrink the log, you can right click on the database and go to Tasks>Shrink>File.  Be sure to change to the log file (attached 1&2).

You can set the recovery model to simple to reduce the overall size of the log file.  In most cases Simple should be fine, but if you have a requirement for bulk logs please consider that.

More info on shrinking the log file.
ee_shrink1.png
ee_shrink2.png
ee_shrink3.png
0
 
LVL 69

Assisted Solution

by:Scott Pletcher
Scott Pletcher earned 500 total points
ID: 41717921
"Large" is nebulous.  But first, you need to check if there is an open transaction in the db.

USE your_db_name
DBCC OPENTRAN

If you get a response along the lines of:
No active open transactions.

You can proceed with a log shrink, being aware that the log may grown again if another large trans comes thru.
CHECKPOINT:
DBCC SHRINKFILE(2, <preferred_max_log_size_in_mb> )

DO NOT USE THE GUI TO DO A LOG SHRINK!  The gui can be flaky, and for log shrink especially, you can't risk any flakiness.  Without a working log, the db cannot be used,.

But if there is an open tran(s), you need to resolve those first.
0
 
LVL 10

Assisted Solution

by:Jason clark
Jason clark earned 500 total points
ID: 41718211
You need to back up your log file and free up space and check If you set the recovery to simple from full, then shrink the log file then you can set it back to full recovery if you need to. read here for more options: https://support.microsoft.com/en-in/kb/317375
0
 
LVL 1

Author Closing Comment

by:johndarby
ID: 41719702
Thank you for your help!
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
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…

718 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