473,415 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,415 software developers and data experts.

HDD still full after shrinking transaction log

Hi All,
My SQL server transaction log is getting bigger every day and my HDD if
running out of space.

So i follow the MS KB about how to Shrinking the Transaction Log.
After doing so the log is much much smaller as i can see the size of it
under enterprise manager.

The problem is that the HDD still shows the same size.
If i shrink the DB why the and reduce its size why the HDD does not
shows it?

Is there a way to clear the size from the HDD?

Thanks All

Nov 23 '06 #1
3 2671
sifrah (si****@walla.com) writes:
My SQL server transaction log is getting bigger every day and my HDD if
running out of space.
So that is the first question: why does the log keep growing?

That leads us to the next question: if the database crashes, do you need
up-to-the-point recovery? Or would you be content with restoring the latest
backup, and lose some data?

In the first case, you should run with full recovery, and backup your
database and transaction log regularly. If you never backup the log, it
will just grow and grow.

If you don't care about up-to-the-point recovery, set the recovery mode
to simple. SQL Server will then truncate the transaction log regularly.
It can still grow if you run a huge transaction, as the log is never
truncated past any active transaction. Note that truncate and shrink is
not the same thing.

If you have a log that just keeps growing, I suspect that you run with
full recovery, but never back up the transaction log.
So i follow the MS KB about how to Shrinking the Transaction Log.
After doing so the log is much much smaller as i can see the size of it
under enterprise manager.

The problem is that the HDD still shows the same size.
If i shrink the DB why the and reduce its size why the HDD does not
shows it?
What do you mean with the HDD shows the same size? Has the size of the
file changed, but Explorer still shows the same amount of used space?


--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Nov 24 '06 #2
Dear Erland,
Thanks for the informative response.
The old administrator didn't back up the DB and log on a regular basic
and that why I got all this mass.

To resolve the issue, i did a backup for the DB and log a few times
until the space cleared from the HDD.

To prevent the issue from happening again i set a maintenance plan to
do a backup every night on top of my backup exec backups.

Do you think it's ok?

Thanks

Erland Sommarskog wrote:
sifrah (si****@walla.com) writes:
My SQL server transaction log is getting bigger every day and my HDD if
running out of space.

So that is the first question: why does the log keep growing?

That leads us to the next question: if the database crashes, do you need
up-to-the-point recovery? Or would you be content with restoring the latest
backup, and lose some data?

In the first case, you should run with full recovery, and backup your
database and transaction log regularly. If you never backup the log, it
will just grow and grow.

If you don't care about up-to-the-point recovery, set the recovery mode
to simple. SQL Server will then truncate the transaction log regularly.
It can still grow if you run a huge transaction, as the log is never
truncated past any active transaction. Note that truncate and shrink is
not the same thing.

If you have a log that just keeps growing, I suspect that you run with
full recovery, but never back up the transaction log.
So i follow the MS KB about how to Shrinking the Transaction Log.
After doing so the log is much much smaller as i can see the size of it
under enterprise manager.

The problem is that the HDD still shows the same size.
If i shrink the DB why the and reduce its size why the HDD does not
shows it?

What do you mean with the HDD shows the same size? Has the size of the
file changed, but Explorer still shows the same amount of used space?


--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Nov 24 '06 #3
sifrah (si****@walla.com) writes:
Thanks for the informative response.
The old administrator didn't back up the DB and log on a regular basic
and that why I got all this mass.

To resolve the issue, i did a backup for the DB and log a few times
until the space cleared from the HDD.

To prevent the issue from happening again i set a maintenance plan to
do a backup every night on top of my backup exec backups.

Do you think it's ok?
You did include a backup of the transaction log in the maintenance plan,
I hope?
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Nov 24 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Marcus | last post by:
Hi I have a very complex sql query and a explain plan. I found there is a full table scan in ID=9 9 8 TABLE ACCESS (FULL) OF 'F_LOTTXNHIST' (Cost=84573 Card=185892...
2
by: Saiyou Anh | last post by:
Hi! Please help with the following: Our disk space is limited. I set the database recovery model to "FULL", and backup transaction log every hour between business hours. But the disk is always...
1
by: John Mosey | last post by:
A huge (and never used) database log was taking up about 4 GB of HD space. We want the data for historical capacity, however, don't care about the transactions log. After a bit of research I ran...
3
by: Daniel Xiao | last post by:
I have set the initial size of the log file for a database to 1M, the maximum size is unrestricted, and the increase rate is 10%. However, when I attempt to delete thousands of rows, the error is...
1
by: jeffreyv | last post by:
Hi! I'm studying to have my MCSE 70-228 certification and I'm trying some things with backing up transaction logs and shrinking it. Here's what I do: There is no activity in the database by...
1
by: Bernd Hohmann | last post by:
I have a table with CHAR(8), CHAR(5), DOUBLE, DOUBLE, VARCHAR(40), DOUBLE, CHAR(1). This should be roundabout less than 100 bytes per row. The primary key is the CHAR(8)+CHAR(5). The table...
2
by: francois1 | last post by:
I am running a website with a SQL Server database attached. My transaction logs are full and my hosting co. won't allocate more disk space for me. I need to delete my database transaction logs...
7
khickyphutz
by: khickyphutz | last post by:
Good day! I would like to ask for a technical advice regarding transaction logs. Right now, our server only have 2.8GB due to the transaction log of our database which is 65GB now. Its database...
3
by: danceli | last post by:
"The log file for database is full. Back up the transaction log for the database to free up some log space." Now I only know this way to deal with that manually, Step1. in option , chance...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.