[dba-SQLServer] Re: Truncate Log On Checkpoint

paul.hartland at fsmail.net paul.hartland at fsmail.net
Fri May 27 09:07:01 CDT 2005


Thanks very much, will give that a try later





Message date : May 27 2005, 02:35 PM
>From : "Robert L. Stewart" 
To : dba-sqlserver at databaseadvisors.com
Copy to : Paul.Hartland at orridge.co.uk
Subject : [dba-SQLServer] Re: Truncate Log On Checkpoint
Paul,

Here is the stored procedure that I include in all my databases to do teh 
log stuff.

CREATE PROCEDURE dbo.TruncateLog
AS
begin
exec sp_dboption 'clientaware','trunc.log on chkpt.','TRUE'
end
begin
checkpoint
end
begin
dbcc shrinkfile(clientaware_log,1)
end

GO

Just replace clientaware with the name of you database and/or log file name.

Robert

At 12:00 PM 5/26/2005 -0500, you wrote:
>Date: Thu, 26 May 2005 13:30:44 +0100
>From: "Paul Hartland" 
>Subject: [dba-SQLServer] Truncate Log On Checkpoint
>To: 
>Message-ID:
> <14A7AB003EFD444BBB193A23128DA20E264E54 at AL-PRI.Aldridge.local>
>Content-Type: text/plain; charset="US-ASCII"
>
> To all,
>
> I want to be able to turn on the following option in a SQL
>Server 2000 database - trunc. log on chkpt
> but can't for the life of me see where I do this, I am quite new
>to SQL Server and have never used this option before but think it will
>be quite useful.
>
> Can anyone help me on this.....
>
> Thanks in advance for any help.....
>
>
>PAUL HARTLAND


_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com

-- 

Whatever you Wanadoo:
http://www.wanadoo.co.uk/time/

This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm


More information about the dba-SQLServer mailing list