PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.db.ms-sqlserver > Log File (LDF) ???? ()
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Log File (LDF) ???? ()

Réponse
 
LinkBack Outils de la discussion
Vieux 06/09/2007, 13h29   #1
Michael Kintner
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Log File (LDF) ???? ()

Is there any way to clear out the LDF file or reduce in size?

thank you in advance fro any ,
Michael Kintner


  Réponse avec citation
Vieux 06/09/2007, 13h35   #2
Uri Dimant
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Log File (LDF) ???? ()

Hi
DBCC SHRINKFILE. For more details please see BOL
http://www.karaszi.com/sqlserver/info_dont_shrink.asp



"Michael Kintner" <nospam@nospam.com> wrote in message
news:13dvsktmk6afhb3@corp.supernews.com...
> Is there any way to clear out the LDF file or reduce in size?
>
> thank you in advance fro any ,
> Michael Kintner
>



  Réponse avec citation
Vieux 06/09/2007, 16h13   #3
Roy Harvey
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Log File (LDF) ???? ()

On Thu, 6 Sep 2007 08:29:16 -0400, "Michael Kintner"
<nospam@nospam.com> wrote:

>Is there any way to clear out the LDF file or reduce in size?
>
>thank you in advance fro any ,
>Michael Kintner


First, what recovery model (Simple, Full, Bulk-Logged) is the database
using? If Simple, it will clear out by itself. For the others it
will only be cleared with the log is backed up. If no log backups are
running then it simply grows, and grows, and grows....

As for reducing the size, DBCC SHRINKFILE will do the job. However
shrinking the log file should be a VERY rare event. Shrinking the
file, only to have it grow again, is bad for performance. Allocating
more space is a significant delay for the transaction that causes it,
and physical file fragmentation is a common side effect. To over
simplify things a bit, set the log size large enough and backup the
log regularly to keep it from getting full.

Roy Harvey
Beacon Falls, CT
  Réponse avec citation
Vieux 06/09/2007, 16h52   #4
Pete Berry
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Log File (LDF) ???? ()

In article <hn50e39j2sjnksnka0m5jem0qq12483ep0@4ax.com>,
roy_harvey@snet.net says...
> On Thu, 6 Sep 2007 08:29:16 -0400, "Michael Kintner"
> <nospam@nospam.com> wrote:
>
> >Is there any way to clear out the LDF file or reduce in size?
> >
> >thank you in advance fro any ,
> >Michael Kintner

>
> First, what recovery model (Simple, Full, Bulk-Logged) is the database
> using? If Simple, it will clear out by itself. For the others it
> will only be cleared with the log is backed up. If no log backups are
> running then it simply grows, and grows, and grows....
>
> As for reducing the size, DBCC SHRINKFILE will do the job. However
> shrinking the log file should be a VERY rare event. Shrinking the
> file, only to have it grow again, is bad for performance. Allocating
> more space is a significant delay for the transaction that causes it,
> and physical file fragmentation is a common side effect. To over
> simplify things a bit, set the log size large enough and backup the
> log regularly to keep it from getting full.
>
> Roy Harvey
> Beacon Falls, CT
>

Just to add a bit -- SHRINKFILE can also be thwarted by open long-
running transactions since the shrink is done in units of VLF's and
won't occur if there is an open active transaction within the virtual
log. In order to get back space recently -- a 5G database had an 8G
logfile -- I had to backup the log, truncate the logfile and then shrink
to a more reasonable target. I figured 25% was a good guesstimate and of
that only 14M was actually used. Why so out of whack? -- try running an
app w/ no BACKUP LOG for over 2 years. The vendor never bothered to tell
my predecessor the basics of configuring sql and it just grew unbounded.
--
Graham (Pete) Berry
PeteBerry@Caltech.edu
--
Graham (Pete) Berry
PeteBerry@Caltech.edu
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 12h11.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11801 seconds with 12 queries