Re: backup advise



David Greenberg (davidgr@xxxxxxxxxx) writes:
We usae Sql2000.
I'm setting up backups jobs and need advise.
When I run a backup of a database, does it automatically clean out the
transaction log ? For a complete backup ? for a differential backup ?

No. Backing up the database and backing up the transaction log are two
separate operations.

Before you go ahead, determine what level of recovery you need. If the
database goes belly-up, do you need restore to a point in time? Or would
you be content with restoring the most recent backup?

In the former case, you need to use full recovery and you need to back up
your transaction log regularly. In the latter case, you can go with simple
recovery and forget all about the transaction log. SQL Server will
automatically truncate the transaction log regularly so that only active
transctions remain.

When would it be best to run a shrinkdatabase command ? Why would I want
to run the shrinkdatabase ?

Most of the time you don't want to. Shrinking the database is a very
exceptional operation. This article gives some insight about this:
http://www.karaszi.com/SQLServer/info_dont_shrink.asp


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • RE: Backups have Shadow Copy Problems
    ... with volume Shadow Copy error 800423f4. ... You back up data from a volume that contains a Microsoft SQL Server ... The recovery model of the SQL Server database is configured to use an ... It just ensures backup will continue without reporting the error. ...
    (microsoft.public.windows.server.sbs)
  • Re: Large Transaction Log Backup after Database Backup
    ... script and see for yourself that the database backup doesn't truncate the ... ALTER DATABASE steve SET RECOVERY FULL ... But my understanding was that the transaction log was> truncated after a full database backup. ...
    (microsoft.public.sqlserver.server)
  • Re: Transaction Log Size
    ... Backup database does not empty the transaction log files. ... How to Shrink the SQL Server 7.0 Transaction Log ...
    (microsoft.public.sqlserver.server)
  • Disaster Averted?
    ... Some process, unknown at this point, flooded a transaction log to the point ... the .mdf file was 0 bytes according to EM. ... Following the backup, I ... the database was now Suspect! ...
    (microsoft.public.sqlserver.server)
  • Re: Transaction Log Size
    ... We currently use a 3rd party backup agent to backup our SQL databases and ... transaction logs (Commvault Galaxy iDataAgent for SQL) and the database is ... Because we are using a 3rd party agent to backup the database, ... > here are some articles on how to shrink your transaction log. ...
    (microsoft.public.sqlserver.server)