[AccessD] Re: SQL LOG File is Huge!

Robert L. Stewart rl_stewart at highstream.net
Wed Oct 8 11:11:00 CDT 2003


Julie,

Here is the SQL code that I use for the log file:

CREATE PROCEDURE [DBO].[usp_Truncate_Log] AS
BEGIN
      EXEC sp_dboption 'DB_NAME' , 'trunc. log on chkpt.','TRUE'
END
BEGIN
      CHECKPOINT
END
BEGIN
      EXEC sp_dboption 'DB_NAME' , 'trunc. log on chkpt.','FALSE'
END
BEGIN
      DBCC SHRINKFILE(LogFileName,1)
END

GO

Replace DB_Name with the name of your database
Replace LogFileName with the name of your log file and do not put quotes 
around it like DB_Name has.

Robert

At 10:56 AM 10/8/2003 -0500, you wrote:
>Date: Wed, 08 Oct 2003 09:35:14 -0400
>From: "Julie Reardon-Taylor" <prosoft6 at hotmail.com>
>Subject: [AccessD] SQL LOG File is Huge!   10GB - Help
>To: AccessD at databaseadvisors.com, dba-SQLServer at databaseadvisors.com
>Message-ID: <BAY10-F80FC4XYOcpgV00014d2d at hotmail.com>
>Content-Type: text/plain; format=flowed
>
>
>Hi Group,
>
>All of a sudden, my BEDB.dbf file has grown huge.  The file itself and the
>log file are at 10GB.  I tried shrinking the database, and received a
>message saying that it was successful, however, the files are still the same
>size.  I'm receiving an event log error ID 17052 that states that there is
>no more room in the log file.  How can I resolve this problem?  It is
>causing problems on the server because the files are taking up so much
>space.  It is error 9002, severity 17.
>
>
>Julie Reardon-Taylor
>PRO-SOFT OF NY, INC.
>www.pro-soft.net




More information about the AccessD mailing list