Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Log file size growing rapidly.. increased by 1 GB every week
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  12 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Venkat  
View profile  
 More options Feb 3 2008, 3:22 am
Newsgroups: microsoft.public.sqlserver.server
From: "Venkat" <venkatara...@gmail.com>
Date: Sun, 3 Feb 2008 13:52:49 +0530
Local: Sun, Feb 3 2008 3:22 am
Subject: Log file size growing rapidly.. increased by 1 GB every week
Hi,
My sql server database log file size growing rapidly, 1 GB by every week. I
have a service running every 2 hours which deletes and inserts some data,
say around 5000 records for every two hours.

I know the source of the problem is deleting and inserting records for every
2 hours. I want to go for a densive mechansim for this, that is: i don't
want to change the service code (for example using TRUNCATE statement
instead of DELETE statement) for any reason.

So I am thinking to write sql job whose job is:
Backup transaction log and shrink log file.

This job runs every day at 4:00 AM.

I alreday have a full backup job which runs at 3:00 AM daily. Probably I
will add the above commnads (backup transaction log and then shrink log
file) to the full backup job schedule as another step.

Does any one experainced this? is it write thing to shrink file every day?

Thanks,
Venkat


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Uri Dimant  
View profile  
 More options Feb 3 2008, 3:54 am
Newsgroups: microsoft.public.sqlserver.server
From: "Uri Dimant" <u...@iscar.co.il>
Date: Sun, 3 Feb 2008 10:54:26 +0200
Local: Sun, Feb 3 2008 3:54 am
Subject: Re: Log file size growing rapidly.. increased by 1 GB every week
Venkat
What is recovery model of your db? Its possible it has FULL recovery mode.
If so, please start performing BACKUP LOG  to move an inactive transactions
to be moved on the disk. I'd suggest  you read about recovery models in the
BOL  to understand their impact on the database....

"Venkat" <venkatara...@gmail.com> wrote in message

news:uWnh13jZIHA.4712@TK2MSFTNGP05.phx.gbl...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tibor Karaszi  
View profile  
 More options Feb 3 2008, 6:43 am
Newsgroups: microsoft.public.sqlserver.server
From: "Tibor Karaszi" <tibor_please.no.email_kara...@hotmail.nomail.com>
Date: Sun, 3 Feb 2008 12:43:37 +0100
Local: Sun, Feb 3 2008 6:43 am
Subject: Re: Log file size growing rapidly.. increased by 1 GB every week
... and to understand the implications of doing a regular shrink, check out:
http://sqlblog.com/blogs/tibor_karaszi/archive/2007/02/25/leaking-roo...
http://www.karaszi.com/SQLServer/info_dont_shrink.asp

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tibor Karaszi  
View profile  
 More options Feb 3 2008, 1:47 pm
Newsgroups: microsoft.public.sqlserver.server
From: "Tibor Karaszi" <tibor_please.no.email_kara...@hotmail.nomail.com>
Date: Sun, 3 Feb 2008 19:47:20 +0100
Local: Sun, Feb 3 2008 1:47 pm
Subject: Re: Log file size growing rapidly.. increased by 1 GB every week
Thanks :-)

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi

"anxcomp" <anxc...@discussions.microsoft.com> wrote in message

news:1663555F-8A8E-4772-9C74-D4DA6F5FB6A6@microsoft.com...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Venkat  
View profile  
 More options Feb 5 2008, 1:04 am
Newsgroups: microsoft.public.sqlserver.server
From: "Venkat" <venkatara...@gmail.com>
Date: Tue, 5 Feb 2008 11:34:33 +0530
Local: Tues, Feb 5 2008 1:04 am
Subject: Re: Log file size growing rapidly.. increased by 1 GB every week
Hi Uri Dimant, Thsnaks for the reply.

Yes the recovery model is FULL

As I mentioned in my post, i have maintennace plan, which will backup the
database every day at 3:00 AM
So now if I include the BACKUP LOG  in maintenance plan (and NO Shrinking
log file) then this will address the log file size issue?

Or
I should include DBCC SHRINKFILE(N'MyDb_log' , 0) also along with the BACKUP
LOG?

Thanks,
Venkat

"Uri Dimant" <u...@iscar.co.il> wrote in message

news:eVZW1IkZIHA.4332@TK2MSFTNGP04.phx.gbl...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Nevarez  
View profile  
 More options Feb 5 2008, 1:28 am
Newsgroups: microsoft.public.sqlserver.server
From: Ben Nevarez <bneva...@no.spam.please.sunamerica.com>
Date: Mon, 4 Feb 2008 22:28:01 -0800
Local: Tues, Feb 5 2008 1:28 am
Subject: Re: Log file size growing rapidly.. increased by 1 GB every week

Venkat,

Just schedule the transaction log backup job. Do not schedule any shrinkfile
operation.

Once you have performed a transaction log backup you can do a shrink file
operation manually, but only once.

Hope this helps,

Ben Nevarez


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Venkat  
View profile  
 More options Feb 5 2008, 1:29 am
Newsgroups: microsoft.public.sqlserver.server
From: "Venkat" <venkatara...@gmail.com>
Date: Tue, 5 Feb 2008 11:59:45 +0530
Local: Tues, Feb 5 2008 1:29 am
Subject: Re: Log file size growing rapidly.. increased by 1 GB every week
Hi Tibor,
Thanks for the reply. Yes I read your post before posting the request here.
Your explanation is good on this topic. But I have one question:

Even if you allocate enough space to log file, say 20 GB to log file, after
some time some one has to go and clean it up before it overshoots the
allocated size.

So is the reason for the automated job to freeup the log file space.
From customers angle: Instead of realying upon DBA or some one to moitor
this log file and clean it up, they would like the system to take care this
automatically. So this is the reason why people want to go for regular
shrink of the log file to freeup the space

Please reply with your comments.

Thanks,
Venkat

"Tibor Karaszi" <tibor_please.no.email_kara...@hotmail.nomail.com> wrote in
message news:5281B2E6-A3DC-43E6-BF11-EAF3F24BD2DC@microsoft.com...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Nevarez  
View profile  
 More options Feb 5 2008, 1:30 am
Newsgroups: microsoft.public.sqlserver.server
From: Ben Nevarez <bneva...@no.spam.please.sunamerica.com>
Date: Mon, 4 Feb 2008 22:30:01 -0800
Local: Tues, Feb 5 2008 1:30 am
Subject: Re: Log file size growing rapidly.. increased by 1 GB every week

Venkat,

Just schedule the transaction log backup job. Do not schedule any shrinkfile
operation.

Once you have performed a transaction log backup you can do a shrink file
operation manually, but only once.

Hope this helps,

Ben Nevarez


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Venkat  
View profile  
 More options Feb 5 2008, 1:35 am
Newsgroups: microsoft.public.sqlserver.server
From: "Venkat" <venkatara...@gmail.com>
Date: Tue, 5 Feb 2008 12:05:03 +0530
Local: Tues, Feb 5 2008 1:35 am
Subject: Re: Log file size growing rapidly.. increased by 1 GB every week
Hi Ben Nevarez,
So backup database command does not automatically backup log file?

What is the difference between shrinking log file manually and automatically
(when I say automatically, I might shrink log file once in a Week by
scheduling a monthly job)

Thanks,
venkat

"Ben Nevarez" <bneva...@no.spam.please.sunamerica.com> wrote in message

news:8A0140FD-A4D4-47F1-AA53-329A6F57BE3A@microsoft.com...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Nevarez  
View profile  
 More options Feb 5 2008, 2:14 am
Newsgroups: microsoft.public.sqlserver.server
From: Ben Nevarez <bneva...@no.spam.please.sunamerica.com>
Date: Mon, 4 Feb 2008 23:14:01 -0800
Local: Tues, Feb 5 2008 2:14 am
Subject: Re: Log file size growing rapidly.. increased by 1 GB every week

If you have a Full Backup that does not backup the transaction log. You need
to specify a Transaction Log Backup.

What I meant by manually is that you will need to shrink the file only once.
Do not schedule any job.

Hope this helps,

Ben Nevarez


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tibor Karaszi  
View profile  
 More options Feb 5 2008, 2:33 am
Newsgroups: microsoft.public.sqlserver.server
From: "Tibor Karaszi" <tibor_please.no.email_kara...@hotmail.nomail.com>
Date: Tue, 5 Feb 2008 08:33:04 +0100
Local: Tues, Feb 5 2008 2:33 am
Subject: Re: Log file size growing rapidly.. increased by 1 GB every week

> Even if you allocate enough space to log file, say 20 GB to log file, after some time some one has
> to go and clean it up before it overshoots the allocated size.

Yes, this is what the BACKUP LOG command does, it empties the log. And, of course, this is something
we schedule.

If you don't want to do backup log, then set the database in simple recovery model. Then SQL Server
will truncate/empty the log every time a checkpoint occurs (something that happens pretty regularly
in the database).

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tibor Karaszi  
View profile  
 More options Feb 5 2008, 2:35 am
Newsgroups: microsoft.public.sqlserver.server
From: "Tibor Karaszi" <tibor_please.no.email_kara...@hotmail.nomail.com>
Date: Tue, 5 Feb 2008 08:35:05 +0100
Local: Tues, Feb 5 2008 2:35 am
Subject: Re: Log file size growing rapidly.. increased by 1 GB every week

> So backup database command does not automatically backup log file?

Backup database do include some log records. That that isn't the important question. The important
question is whether backup database empties the log. And the answer is: "It doesn't".

> What is the difference between shrinking log file manually and automatically (when I say
> automatically, I might shrink log file once in a Week by scheduling a monthly job)

That is what I tried to explain in my "leaking roof" analogy. :-)

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google