First off all...
what kind of recovery do you have?
Full or Simple?
if you have simple, just Backup de Log and shrink it (normally only backup
or only shrink should work), like this:
in Query Analyzer:
DBCC SHRINKFILE(pubs_log, 2)
if you have FULL (like it seems to me)
first Backup Log, then:
DBCC SHRINKFILE(pubs_log, 2)
GO
BACKUP LOG pubs WITH TRUNCATE_ONLY
GO
DBCC SHRINKFILE(pubs_log,2)
GO
Normally when we have Full Recovery Mode the Log Files gets to big... what I
advise you to do it's to configure your Backups to something like this:
- Maintenance Plan that makes Full Backup at 0:00 hrs. each day
- Maintenance Plan that Backups Log at 4:00, 8:00, 12:00, 16:00,
20:00, 0:00 each day (then you can make PITR)
- Job that runs:
DBCC SHRINKFILE(pubs_log, 2)
GO
BACKUP LOG pubs WITH TRUNCATE_ONLY
GO
DBCC SHRINKFILE(pubs_log,2)
GO
at Wednesdays and Sundays at 23:55
- Maintenance Plane that Backups the Log at Wed and Sun at 23:50
Hope this helps,
Luís Manuel Martins Ganhão
Novabase, Desenvolvimento à Medida
Serviços de Valor Acrescentado
DBA Oracle Certified Professional 8i
Av. Engº Duarte Pacheco, Torre 1 - 9º
1099-078 Lisboa
Tel: 351213836300
Tlm +351967610858
http://novabase.pt
CONFIDENCIALIDADE: Este e-mail é confidencial e apenas pode ser lido,
copiado ou utilizado pelo destinatário. Se o recebeu por engano, por favor
contacte o remetente através de e-mail ou pelo telefone + 351 21 383 63 00.
Agradecemos ainda que apague este e-mail e não divulgue o respectivo
conteúdo.
CONFIDENTIALITY: This e-mail is confidential and may be privileged. It may
be read, copied and used only by the intended recipient. If you have
received it in error, please contact the sender immediately by return e-mail
or by phoning + 351 21 383 63 00. Then please delete this e-mail and do not
disclose its contents to any person.
-----Original Message-----
From: Hakim Tadjer [mailto:[Email Address Removed] quarta-feira, 4 de Setembro de 2002 19:13
To: LazyDBA.com Discussion
Subject: Trans log Shrinking/2000
HI
I shrink my transaction log AA_log.LDF using entreprise manager.
The operation is success but when i go to see the size of my file in window
explorer is the same , the size not changed.
why, or how to shrink my log file.
Thank's
_________________________________________________________________
Affichez, modifiez et partagez gratuitement vos photos en ligne:
http://photos.msn.com/support/worldwide.aspx
---------------------------------------------------------------------
To unsubscribe, e-mail: mssqldba-[Email Address Removed] additional commands, e-mail: mssqldba-[Email Address Removed]MS Sql Server LazyDBA home page