Re: Simple recovery model + checkpoint = no need to save .ldf file?
From: Peter Yeoh (nospam_at_nospam.com)
Date: 08/04/04
- Next message: Jim Trowbridge: "Programmatic killing connections"
- Previous message: Andrew J. Kelly: "Re: defrag for a SQL Server?"
- In reply to: jwf: "Simple recovery model + checkpoint = no need to save .ldf file?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 4 Aug 2004 09:13:40 +0800
>From Books Online,
'The detached files remain and can be reattached using sp_attach_db or
sp_attach_single_file_db. The files can also be moved to another server and
attached.'
This implies that sp_detach_db rolls back all uncommitted transactions and
writes all changes to the data files before the database is detached.
Hence, you do not need the log file as sp_attach_single_file_db can be used
to attach only the data file. This has been the experience in my case so
far.
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Get MiniSQLBackup Lite, free!
"jwf" <jwf@discussions.microsoft.com> wrote in message
news:8AA7ECF5-CDDB-45AC-BCBD-0947D941829D@microsoft.com...
> If I have a sql server 2000 database using the simple recovery model and
then issue a checkpoint command right before I sp_detach_db, do I need to
even save the .ldf file at that point?
>
> Seems like in this case the log file is truncated anyway and upon an
attach there would be no recovery needed so later when I want to attach the
database again I could simply use sp_attach_single_file_db (we only use a
single .mdf and single .ldf file).
>
> Other than the obvious drawbacks of the simple vs. full recovery models,
is there any other issue I'm not grasping with this?
>
> From reading BOL it seems like there might be a problem with this. Even
though the log is "truncated", it sounds like there could still be committed
data from the start of a logical log section to the checkpoint LSN that
would be lost?? Or is this not the case for simple recovery mode?
>
> Our application needs are similar to the simplicity of moving around
MS-Access database files, but the functionality of SQL Server/MSDE 2000 when
the database is live.
- Next message: Jim Trowbridge: "Programmatic killing connections"
- Previous message: Andrew J. Kelly: "Re: defrag for a SQL Server?"
- In reply to: jwf: "Simple recovery model + checkpoint = no need to save .ldf file?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|