?
Solved

SQL Logfiles over 80GB

Posted on 2013-12-06
4
Medium Priority
?
402 Views
Last Modified: 2013-12-06
Hi Experts,

I have some SQL logfiles which are very big. over 80GB.
With a command I checked the log and just 1% is used.
Under options of this DB I found the feature autoshrink file.

When I use autoshrink, is this a problem ?
Or do I have some disadvantages ?
0
Comment
Question by:Eprs_Admin
[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
  • 2
  • 2
4 Comments
 
LVL 1

Expert Comment

by:mike706
ID: 39700376
From SSMS run Task -> Shrink -> Files and shrink the Log file.
Mark the option "Reorganize pages Before releasing unused space" and set "Shrink file to".

Make sure that the Log file is not shrink to 0% available space after shrink.
This file size is depending on the amount of transactions made to the database.

Then setup a backup job with option FULL to make a backup of the database. If the Recovery Model is set to FULL on the database also make a log backup between the FULL backups.
Typically a log backup is set to every hour during the day when the transactions is made to the database. This will help to have the transaction log in shape.
0
 

Author Comment

by:Eprs_Admin
ID: 39700416
I cannot find this option :
 "Reorganize pages Before releasing unused space"
0
 
LVL 1

Accepted Solution

by:
mike706 earned 2000 total points
ID: 39700469
You will find it under the Shrink files window.

What version of SQL server are you using?

You can also try to do it with a Query.

USE [Database]
GO
DBCC SHRINKFILE (N'Filename of logfile' , 2)
GO

Change the Database to the corresponding database and "Filename of logfile" to the logical name of the logfile. The number is the value in MB how big the log file should be after the shrink.

Don't forget to make backup Before Shrinking the database.
pic.PNG
0
 

Author Closing Comment

by:Eprs_Admin
ID: 39700694
Thanks my friend
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
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…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

765 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