January 18, 2010 at 8:08 am
Mady data is 32,084MB and Log is 42,084 MB. I know log should be smaller, how can I clean it or do I need to?
Thank you
January 18, 2010 at 8:11 am
Are you doing transaction log backups? Does your database need point in time recovery, or do you depend on full backups? If you're in FULL recovery mode your database log will continue to grow unless you backup the transaction log. If you don't need point in time recovery, you may want to switch to SIMPLE.
This article explains the recovery models in SQL Server: http://msdn.microsoft.com/en-us/library/aa173531%28SQL.80%29.aspx
January 18, 2010 at 8:13 am
I have transaction job occurs every 4 hours
January 18, 2010 at 8:18 am
Can you post the T-SQL for your full backup & t-log backups ?
January 18, 2010 at 8:22 am
It's entirely possible that your log needs to be bigger. If you are changing lots of data (as opposed to adding it), the transaction load could be high.
My guess is your log grew too large at some point before log backups were running. how large are the log backups?
January 18, 2010 at 8:26 am
this is for transaction jobs:EXECUTE master.dbo.xp_sqlmaint N'-PlanID D3176901-93DB-4538-8A12-35D337C7C70D -WriteHistory -VrfyBackup -BkUpMedia DISK -BkUpLog "F:\MSSQL\BACKUP" -DelBkUps 1DAYS -CrBkSubDir -BkExt "TRN"'
this is for full backup:
EXECUTE master.dbo.xp_sqlmaint N'-PlanID D3176901-93DB-4538-8A12-35D337C7C70D -WriteHistory -VrfyBackup -BkUpMedia DISK -BkUpDB "F:\MSSQL\BACKUP" -DelBkUps 1DAYS -CrBkSubDir -BkExt "BAK"'
January 18, 2010 at 8:31 am
You need to look in the maintenance plan and be sure this database log is being backed up.
January 18, 2010 at 8:34 am
My .bak is 20.1 GB, my last for today morning .trn 655 KB
January 18, 2010 at 8:44 am
Yes,trans log backed up
January 18, 2010 at 9:01 am
Maybe try to do a manual transaction log backup and see if it shrinks down. If it does, you might have an issue with your plan.
January 18, 2010 at 9:03 am
Hi there,
The transaction log backup doesn't reducers the phisical size of the transaction log file, it just removes entries from the log already commited to the database. In order to reduce the size of the file you should shrink the file.
José Cruz
January 18, 2010 at 1:34 pm
is it dbcc shrink
January 18, 2010 at 5:58 pm
Hi there,
It's DBCC SHRINKFILE, or you can use SSMS to do it. Make sure taht you back up your transaction log before shrink the file, otherwise it may not shrink.
http://msdn.microsoft.com/en-us/library/aa258824(SQL.80).aspx
José Cruz
January 19, 2010 at 1:12 am
Hi Krasavita,
If you are using sql 2005 or higher, you wil be able to see the space used by the transaction log. You can check it by using the disk usage standard report. In the report you can see how much space of the total space its been used by the transaction log.
January 19, 2010 at 11:42 pm
CAn you do a dbcc sqlperf ('logspace') and check log space used & occupied & then try shrinking like
USE [YourDB]
DBCC SHRINKFILE ('YouDBlogFIle' , 0, TRUNCATEONLY)
If this fails to do much (may be there is a virtual log blocking your shrink) take a Tlog backup & do it again.
Viewing 15 posts - 1 through 15 (of 33 total)
You must be logged in to reply to this topic. Login to reply