Home > Archive > MS SQL Server New Users > December 2005 > backup / truncate transaction log









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author backup / truncate transaction log
Loane Sharp

2005-11-29, 8:24 pm

Hi there

I use DTS to import data into a SQL Server database for archive purposes.
After I do a DTS import, it can happen that I have, say, a 1GB .MDF file and
a 4GB .LDF file. I then backup the database, selecting the option to remove
inactive entries from the transaction log, but this doesn't make any
difference to the size of either file. In the interests of storage, I need
to get rid of the 4GB .LDF file. If, after the backup completes, what would
happen if I detached the database, deleted the .LDF file, and then stored
only the .MDF file for archive purposes? Would I be losing something?

Best regards
Loane


Andrew J. Kelly

2005-11-30, 7:23 am

If you are not using the capabilities of the log for restoration purposes
you should place the database into SIMPLE recovery mode and there will be no
need to worry about the log in regards to backups, just the db backup. you
can shrink the log file with DBCC SHRINKFILE to get it to a manageable size.
Then if it is in SIMPLE mode it will not continue to grow and grow as it is
now.

--
Andrew J. Kelly SQL MVP


"Loane Sharp" < look_sharp_not@hotma
il.com> wrote in message
news:eQFtg6T9FHA.1276@TK2MSFTNGP09.phx.gbl...
> Hi there
>
> I use DTS to import data into a SQL Server database for archive purposes.
> After I do a DTS import, it can happen that I have, say, a 1GB .MDF file
> and a 4GB .LDF file. I then backup the database, selecting the option to
> remove inactive entries from the transaction log, but this doesn't make
> any difference to the size of either file. In the interests of storage, I
> need to get rid of the 4GB .LDF file. If, after the backup completes, what
> would happen if I detached the database, deleted the .LDF file, and then
> stored only the .MDF file for archive purposes? Would I be losing
> something?
>
> Best regards
> Loane
>



Loane Sharp

2005-12-05, 8:25 pm

thanks andrew, best regards Loane
[color=darkred]
> If you are not using the capabilities of the log for restoration purposes
> you should place the database into SIMPLE recovery mode and there will be
> no need to worry about the log in regards to backups, just the db backup.
> you can shrink the log file with DBCC SHRINKFILE to get it to a manageable
> size. Then if it is in SIMPLE mode it will not continue to grow and grow
> as it is now.
>


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com