Truncating / Shrinking Logs and DB's

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Timmeah (timoth_at_optushome.com.au)
Date: 01/06/05


Date: Thu, 6 Jan 2005 21:08:08 +1100

Ok i am trying to get my skills down with SQL server and am stumped with the
size of my log files.

I have read to:
backup your transaction log
backup your DB
truncate the logfile, sp_dboption [dbname], 'trunc. log on chkpt.', 'true'
shrink the log file, dbcc shrinkfile ([db_log_name])

seems straight forward enough.

Ok i have tried this a few times on different db's and it hasn't done
anything to the file size.
I have noticed sometimes the log size actually increases usage with no
physical size drop.

Am i not doing something right or overlooking something?

Please help.

Tim
'F@#$ing windows 98! Get Bill Gates in here! You told us Windows 98 would be
faster, and more efficient, with better access to the internet!'
'It is faster, over five million' (Gunshot)



Relevant Pages

  • Re: SBS W2k Losing Disk Space For No Apparent Reason
    ... backup against the Exchange First Storage Group then ... checked the log files - success, ... Obviously the media issue is my main concern at present, ... >first step is to get your backup file correct. ...
    (microsoft.public.backoffice.smallbiz2000)
  • Log Files
    ... The backup Server is being replaced tommorow mornign with a new ... I have tried to move the log files to a bigger drive so then I can run ... move-StorageGroupPath -Identity ?exchsrvr\Second Storage Group? ... On the Active node or the Passive node, ...
    (microsoft.public.exchange.admin)
  • Re: copy log files to the RSG
    ... Susan Conkey [MVP] ... full online backup on the production DB, after the backup completed, i ... noticed that all the log files i copied to the RSG (to roll the RSG ...
    (microsoft.public.exchange.admin)
  • Re: Exchange 2007 Log
    ... should prevent truncation of the log files after a backup. ... also be scheduled to not overlap with your backup activity. ... "there is an online maintenance overlap for database - First Storage ...
    (microsoft.public.exchange.admin)
  • Re: server filling up
    ... displays the Exchange server. ... To perform an 'Exchange aware backup' only, ... tell) yesterday after i moved the 2008 log files (i didn't move the ... Outlook should never be installed on the SBS. ...
    (microsoft.public.windows.server.sbs)