Re: Does DBCC SHRINKFILE on a data file cause the log to grow?

From: Uri Dimant (urid_at_iscar.co.il)
Date: 02/18/04


Date: Wed, 18 Feb 2004 17:08:19 +0200

Malcolm
Make a long story shortly
1)Perfom BACKUP LOG file ( it removes all inactive transaction )
2)Pefrom DBCC SHRINKFILE to reduce physical size of the log file.

"Malcolm Ferguson" <Malcolm_Ferguson@NO_SPAM_PLEASEyahoo.com> wrote in
message news:ekOInAj9DHA.2472@TK2MSFTNGP10.phx.gbl...
> We have 60GB free of a 140GB data file in one of our databases in SQL
> Server 2000 SP2. I've truncated the free space at the end, but it won't
> shrink any further now. I tried running DBCC SHRINKFILE, but had to
> cancel it and run a log backup when the transaction log grew to 40GB and
> started threatening the free disk space. Is this expected behaviour.
> If it is, can anybody recommend a way to shrink the data file without
> growing the log - e.g. do I have to temporarily change the database
> model to simple, or something like that?
>
> Cheers,
> Malc
>



Relevant Pages

  • Re: how can i delete transaction log
    ... If you dont 'care' about the data just set the database to SIMPLE RECOVERY ... The above setting will ensure that log file is truncated after ... > dbcc shrinkfile. ... > Please refer to help for dbcc shrinkfile command. ...
    (microsoft.public.sqlserver.programming)
  • Re: backup / trn file size.
    ... and it still had the exact same number after the synch. ... > Have you tried to BACKUP LOG file before you issued DBCC SHRINKFILE.? ...
    (microsoft.public.sqlserver.server)
  • Re: Changing database size
    ... DBCC SHRINKFILE will ... generate "dummy" log records so the beginning of the log will move to the ... be able to cot then end of the log file. ... "Nico De Greef" wrote in message ...
    (microsoft.public.sqlserver.server)
  • Re: Monsterlog file - short term solution?
    ... Sounds like you have your recovery plan set to FULL. ... You can then issue a DBCC SHRINKFILE command ... > The log file has grown to an enormous size. ... > and the db admin has fixed it. ...
    (microsoft.public.sqlserver.server)
  • Re: Windows Server 2008 Backup Logs
    ... Mark L. Ferguson MS-MVP ... I want to have the server attach the log file and email it to me when the ... where is the backup log file? ...
    (microsoft.public.windows.vista.general)