Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 30th, 2005, 10:47 AM
Authorized User
 
Join Date: Aug 2003
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default HUGE Log Files - Help?!?

Hi:

I've got a client who is running about 5 database on SQL Server 2000.

The databases are about 25 - 100 megs each.
The log files in some cases are huge.
In one case the log file is 68 GIGS.

Rebooting, backing up, shrinking the log file doesn't help.

Why are they so huge? Is there a setting that may be causing this?
More importantly, how can I shrink them?
Can I just delete them in SQL Server (Enterprise Manager?)
I see where it lets me but I don't know the consequences.

__________________
http://www.softlinksys.com
Professional Software Developer since 1994.
 
Old August 30th, 2005, 12:33 PM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Hi
Please check the following articles:
http://support.microsoft.com/kb/317375/EN-US/
http://support.microsoft.com/kb/272318/EN-US/
http://support.microsoft.com/kb/110139/EN-US/


Om Prakash
 
Old August 30th, 2005, 02:21 PM
Authorized User
 
Join Date: Aug 2003
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the articles.

I did a BACKUP LOG <database> WITH TRUNCATE_ONLY

Then I went into Enterprise Manager and used the 'Shrink Database' but then shrunk only the 'Files' > log file.

Whew!! That deleted about 100 GIGS of unwanted log data.

THANKS a bunch!!

 
Old August 30th, 2005, 03:04 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 303
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I would recommend to create a scheduled job in SQL Server for truncating your log files.

BACKUP LOG db_name WITH TRUNCATE_ONLY
WAITFOR DELAY '00:00:10'
DBCC SHRINKFILE(dbname_log,targetsize)


 
Old August 30th, 2005, 03:13 PM
Authorized User
 
Join Date: Aug 2003
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yea, that's a good idea.

I'll do that.
Thanks:)






Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't get Log to write the Log.txt file jnbutler BOOK: Professional XNA Game Programming: For Xbox 360 and Windows ISBN: 978-0-470-12677-6 3 July 31st, 2007 04:04 AM
Backup Log Files out of order khautinh SQL Server 2000 2 March 16th, 2007 01:41 AM
How do Trace and write log files in ASP.NET2.0? arunkishore82 ASP.NET 2.0 Basics 0 March 20th, 2006 02:04 AM
Loading huge text files zoostar Java GUI 0 June 13th, 2005 04:08 PM
AppException Class -Log Error to Event Log bekim BOOK: ASP.NET Website Programming Problem-Design-Solution 7 December 7th, 2004 01:01 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.