Re: cut the size of the log

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Peter Yeoh (nospam_at_nospam.com)
Date: 06/28/04


Date: Mon, 28 Jun 2004 11:49:04 +0800

If you are using a FULL or BULK LOGGED recovery model (SELECT
SERVERPROPERTYEX ('<db name>', 'RECOVERY), you can't shrink the log file
unless you backup the transaction log or truncate it. If you are using the
SIMPLE recovery model, you can't shrink it much if there are open
transactions that happen to occupy the end of the file.

Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Try MiniSQLBackup

"izumi" <test@test.com> wrote in message
news:%23VPGv%23KXEHA.2408@tk2msftngp13.phx.gbl...
> I use this command but it doesnot work
>
> cannot cut the size of the log to 2MB
>
> DBCC SHRINKFILE(ABC_log,2)
>
> what is the correct command actually pls?
>
>



Relevant Pages

  • RE: Cannot shrink Transaction Log
    ... If you are using Full recovery model then you need to backup the transaction ... > the transaction logs have filled all available disk space. ...
    (microsoft.public.sqlserver.server)
  • Re: Shrink Transaction Log
    ... Switching to SIMPLE recovery model just because you ... up a schedule to back up the transaction log which will empty out the log ... overwrite itself and I won't ever have to "shrink" with either method? ... Ideally, you will be like Goldilocks, and size the log file in such a way ...
    (microsoft.public.sqlserver.server)
  • Re: Truncate and Shrink
    ... Before I did I BACKUP LOG ... ... The Recovery model is set to as "Full". ... Transaction Backup is set after ... >Did you run DBCC OPENTRAN? ...
    (microsoft.public.sqlserver.server)
  • Re: How do I shrink or drop a transaction log and still be able to do backup and recovery
    ... Deleting a Transaction Log is not the way to follow to shrink it. ... It seems that your database's Recovery Model is FULL In that case, you need to backup your log file to empty it. ... So the log files are 14.6 Mb ...
    (microsoft.public.sqlserver.tools)
  • Re: Log file is increeasing too much
    ... > turned the recovery mode to simple and I put the option auto shrink on. ... >> If you are using the FULL recovery model, you would need to backup the log ... >> transaction, hence all the data is either committed or rolled back. ... >>> i have a database and a proccess which delete everything from database and ...
    (microsoft.public.sqlserver.server)