Home > Archive > MS SQL Server > March 2006 > How do I truncate a 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 How do I truncate a LOG?
MSUTech

2006-03-29, 11:23 am

I have SQL Server 2000 ...

I thought that Scheduled Backups would truncate the existing the Log
files... but, that doesn't seem to be happening.. I have one log file that is
quite large and growing... despite weekly backups....

What is the best way to truncate log files... ???

thanks..
amish

2006-03-29, 11:23 am

If you have autoshrink option is on it will shrink, but shrink log only
if you have space issue.
By default SQL Server after backup truncate backed up log, but do not
free space.
It will reuse space when needed, and it helps to reduce load on server
for growing database files sizes.

You can use DBCC Shrinkfile to shrink database.
Look at books online for Shrinking the Transaction Log

Regards
Amish Shah

Tibor Karaszi

2006-03-29, 11:23 am

http://www.karaszi.com/SQLServer/info_dont_shrink.asp

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www. solidqualitylearning
.com/

Blog: http:// solidqualitylearning
.com/blogs/tibor/



"MSUTech" <MSUTech@discussions.microsoft.com> wrote in message
news:B46A8994-FA94-4261-B2BF- 2985256BC7F7@microso
ft.com...
>I have SQL Server 2000 ...
>
> I thought that Scheduled Backups would truncate the existing the Log
> files... but, that doesn't seem to be happening.. I have one log file that is
> quite large and growing... despite weekly backups....
>
> What is the best way to truncate log files... ???
>
> thanks..


Steen Persson (DK)

2006-03-29, 8:23 pm

MSUTech wrote:
> I have SQL Server 2000 ...
>
> I thought that Scheduled Backups would truncate the existing the Log
> files... but, that doesn't seem to be happening.. I have one log file that is
> quite large and growing... despite weekly backups....
>
> What is the best way to truncate log files... ???
>
> thanks..


Remember that a database backup doesn't do anything to the logfile.
You'll have to specifically do a logfile backup in order to truncate the
logfile. Also keep in mind that a log backup doesn't shrink the actual
physical file - it only truncate it so the already allocated space can
be reused.

Regards
Steen
MSUTech

2006-03-30, 9:23 am

Thanks for the information...

One last question.... in regards to the SERVER PAGE FILE.... if this logfile
gets large... does it have any impact on the Server Page File....

in other words... does this logfile... sit in server memory???

thanks...

"Steen Persson (DK)" wrote:

> MSUTech wrote:
>
> Remember that a database backup doesn't do anything to the logfile.
> You'll have to specifically do a logfile backup in order to truncate the
> logfile. Also keep in mind that a log backup doesn't shrink the actual
> physical file - it only truncate it so the already allocated space can
> be reused.
>
> Regards
> Steen
>

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