Solved

SQL LOG Size

Posted on 2014-02-05
9
365 Views
Last Modified: 2014-02-05
Hi Experts,

several days ago I have shrinked my logfile for SQL.
Now it is again 50GB. But inside the file 1% is used.

My backup is set with BE 2012.
I have a Full Backup each week.
I have two incremental jobs for DIFFERENTIAL and LOGS.

So why the grows and just 1% is filled ?
0
Comment
Question by:Eprs_Admin
  • 4
  • 4
9 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 100 total points
ID: 39835179
Probably because it will have had 50GB worth of data in it at some point. The log will grow as it needs to, but it won't automatically shrink back down again.

You need to be monitoring your log size and make sure it is sized appropriately. Generally your log will need to be at least the size of your largest index.
0
 
LVL 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 400 total points
ID: 39835197
to clarify: shrinking the file regularly is not a good practice.
better make sure you are running regularly transaction log backups (if your db is in full recovery mode), and for "big jobs" (doing a lot of data modifications) ensure they are optimized.
for example, if this is a datawarehouse like db, you should consider that this kind of databases typically has nightly jobs which DO require large log files, and shrinking the file (regularly) will require to re-enlarge the file again... just a waste of I/O
0
 

Author Comment

by:Eprs_Admin
ID: 39835287
ok, I have seen in the report nearly 30% of the DB are indexes.
But how to find out how big are the indexes ?
0
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.

 
LVL 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 400 total points
ID: 39835292
30% of the DB being indexes is likely just normal, nothing to worry about.
0
 

Author Comment

by:Eprs_Admin
ID: 39835318
There is another DB on the server .
The MDF file has 20GB and the LDF file has 85GB.
The report cannot find any extensions about the logfile.
The LDF file is used with 0.5%.
But the LDF file has 50% of indexes.
Can I shrink the file with the gui and reorganize the logfile ?
0
 
LVL 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 400 total points
ID: 39835340
>But the LDF file has 50% of indexes.
unless the file has been incorrectly named with .ldf as extension, but actually being a data file, this is not possible.
does the file show up as log file or as data file?
if it's log file, I wonder about that report.
if it's a data file, you might consider to rename the file (but that's another question), and leave otherwise the file alone.

it might be a filegroup implementation, so you can "locate" tables or indexes on dedicated filegroups (and hence files), this to improve I/O performance .
0
 

Author Comment

by:Eprs_Admin
ID: 39835355
The DB has two files.
db.mdf and db.ldf

Strange is , the db.mdf has just 20GB
The db.ldf file has 80GB

And the report of the db shows no growing activity of the db.ldf
0
 
LVL 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 400 total points
ID: 39835359
again: the log file may be indeed MUCH larger than the data of the db.
it really depends on the activity on your database.
if you have a HUGE job running, using lots of data transformations / extractions etc, this is perfectly NORMAL.

so, unless you check on those jobs, you cannot "know" if it's normal or not.
0
 

Author Comment

by:Eprs_Admin
ID: 39835384
ok thanks for the infos.
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
create an aggregate function 9 31
convert null in sql server 12 31
Update a text value in another table 10 36
Cleaning up a desktop after leaving a domain 3 23
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
A safe way to clean winsxs folder from your windows server 2008 R2 editions
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

813 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

14 Experts available now in Live!

Get 1:1 Help Now