Hello to Everybody!
I have a doubts about Transaction Log. What's happen when I execute the
follow command
BACKUP LOG [database] WITH NO_LOG ou BACKUP LOG [database] WITH TRUNCATE_ONLY
So, When should I use this command to avoid fill up the log?
Thanks a Lot
Juliano HortaDon't use it. Either have the db in simple recovery mode. Or do regular transaction log backups (the
log is emptied when you do a log backup).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Juliano H via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:541010E0E3B40@.SQLMonster.com...
> Hello to Everybody!
> I have a doubts about Transaction Log. What's happen when I execute the
> follow command
> BACKUP LOG [database] WITH NO_LOG ou BACKUP LOG [database] WITH TRUNCATE_ONLY
> So, When should I use this command to avoid fill up the log?
> Thanks a Lot
> Juliano Horta|||Only use this if you do not need to be recoverable via trans log, if so
maybe you should just use simple recovery mode
Below is from BOL
Note If backing up the log does not appear to truncate most of the log, an
old open transaction may exist in the log. Log space can be monitored with
DBCC SQLPERF (LOGSPACE). For more information, see Transaction Log Backups.
NO_LOG | TRUNCATE_ONLY
Removes the inactive part of the log without making a backup copy of it and
truncates the log. This option frees space. Specifying a backup device is
unnecessary because the log backup is not saved. NO_LOG and TRUNCATE_ONLY
are synonyms.
After backing up the log using either NO_LOG or TRUNCATE_ONLY, the changes
recorded in the log are not recoverable. For recovery purposes, immediately
execute BACKUP DATABASE.
"Juliano H via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:541010E0E3B40@.SQLMonster.com...
> Hello to Everybody!
> I have a doubts about Transaction Log. What's happen when I execute the
> follow command
> BACKUP LOG [database] WITH NO_LOG ou BACKUP LOG [database] WITH
> TRUNCATE_ONLY
> So, When should I use this command to avoid fill up the log?
> Thanks a Lot
> Juliano Horta|||Hi,
To add on to Tibor and David; Go ahead with SIMPLE recovery model if you do
not require a point in time recovery.
There is no difference between NO_LOG and TRUNCATE_ONLY. Both are same and
will truncate the inactive
portion of the log.
Thanks
Hari
SQL Server MVP
"David J. Cartwright" <davidcartwright@.hotmail.com> wrote in message
news:uYKNlZKtFHA.3080@.TK2MSFTNGP15.phx.gbl...
> Only use this if you do not need to be recoverable via trans log, if so
> maybe you should just use simple recovery mode
>
> Below is from BOL
>
> Note If backing up the log does not appear to truncate most of the log,
> an old open transaction may exist in the log. Log space can be monitored
> with DBCC SQLPERF (LOGSPACE). For more information, see Transaction Log
> Backups.
>
> NO_LOG | TRUNCATE_ONLY
> Removes the inactive part of the log without making a backup copy of it
> and truncates the log. This option frees space. Specifying a backup device
> is unnecessary because the log backup is not saved. NO_LOG and
> TRUNCATE_ONLY are synonyms.
> After backing up the log using either NO_LOG or TRUNCATE_ONLY, the changes
> recorded in the log are not recoverable. For recovery purposes,
> immediately execute BACKUP DATABASE.
>
> "Juliano H via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
> news:541010E0E3B40@.SQLMonster.com...
>> Hello to Everybody!
>> I have a doubts about Transaction Log. What's happen when I execute the
>> follow command
>> BACKUP LOG [database] WITH NO_LOG ou BACKUP LOG [database] WITH
>> TRUNCATE_ONLY
>> So, When should I use this command to avoid fill up the log?
>> Thanks a Lot
>> Juliano Horta
>
No comments:
Post a Comment