SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How do I delete excess transaction logs.


How do I delete excess transaction logs.

Author
Message
mjafar
mjafar
Old Hand
Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)

Group: General Forum Members
Points: 369 Visits: 131
I have 2 live database.
One of the database mdf size is 8 GB but its ldf size 76 GB.
As ldf is acquiring as much as space of hard disk.
My disk size 100 GB.
How do I remove this. How I can remove this excess logs.

Can any one suggest me..


Regards
Jafar
GilaMonster
GilaMonster
SSC Guru
SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)

Group: General Forum Members
Points: 235014 Visits: 46376
Is your database in full recovery mode?
Do you have transaction log backups occuring regularly?
Do you need to be able to resore this database to the moment of failure if something happens to it?

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


mjafar
mjafar
Old Hand
Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)

Group: General Forum Members
Points: 369 Visits: 131
Yes My database is in full recovery mode.
Transaction log backup is going on.
Yes I want to recover it from the point of failure..
GilaMonster
GilaMonster
SSC Guru
SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)

Group: General Forum Members
Points: 235014 Visits: 46376
Check that the tran log backups are running. How often do they run?

Run this query for the DB with the problem. Please post what it returns.

select name, recovery_model_desc, log_reuse_wait_desc from sys.databases where name = ...

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


mjafar
mjafar
Old Hand
Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)

Group: General Forum Members
Points: 369 Visits: 131
Query u have given is not working...

and backup of transaction log is going on twice in a day..
anything else u want.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)

Group: General Forum Members
Points: 235014 Visits: 46376
mjafar (1/3/2008)
Query u have given is not working...


In what way is it not working?
select name, recovery_model_desc, log_reuse_wait_desc from sys.databases where name = 'myDBName'
(replace mydbname with the real name of that DB)

You are using SQL 2005? (I assume so, since this is posted in the SQL 2005 forum)


and backup of transaction log is going on twice in a day..
anything else u want.


You might consider making the log backups more frequent. If you're doing a lot of transactions, twice a day is not much.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


mjafar
mjafar
Old Hand
Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)

Group: General Forum Members
Points: 369 Visits: 131
Yes sir,
I m not using SQL server 2005.

And about transaction log backup, No not huge transaction is going on it.
So i think it's not necessary to take frequent tranx backup.

Current mdf size is 8 GB & ldf is 61 GB.
How I can optimize my space.?
ChiragNS
ChiragNS
SSCertifiable
SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)

Group: General Forum Members
Points: 6935 Visits: 1865
How old is your db and from when are you taking log backups.

Are you sure that no huge transactions are going on.
Have any triggers or jobs that modify data ? Since these 2 happen automatically you may missed these (just a guess).

"Keep Trying"
GilaMonster
GilaMonster
SSC Guru
SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)

Group: General Forum Members
Points: 235014 Visits: 46376
mjafar (1/3/2008)
Yes sir,
I m not using SQL server 2005.


The please post in the SQL 2000 forum so people don't waste their time and yours giving suggestions that don't work on the version you're using.



And about transaction log backup, No not huge transaction is going on it.
So i think it's not necessary to take frequent tranx backup.

Current mdf size is 8 GB & ldf is 61 GB.
How I can optimize my space.?



The log must have grown to that size because it needed that much space for transactions. You can shrink it, but the chances are it will grow again.

Check just before one of your log backups and see how much of the log is in use (taskpad in Enterprise manager)

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


mjafar
mjafar
Old Hand
Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)

Group: General Forum Members
Points: 369 Visits: 131
Ok Sir sorry for posting data in other forum.

My database is 2 years old.
But still no one has taken any type of backup of that database.
So its size became huge.

Now I have started taking backup.
But log size has become very huge...

Regards
Majid Jafar
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search