Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 30th, 2005, 10:47 AM
Authorized User
Points: 325, Level: 6
Points: 325, Level: 6 Points: 325, Level: 6 Points: 325, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Altamonte Springs, FL
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.
Reply With Quote
  #2 (permalink)  
Old August 30th, 2005, 12:33 PM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
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
Reply With Quote
  #3 (permalink)  
Old August 30th, 2005, 02:21 PM
Authorized User
Points: 325, Level: 6
Points: 325, Level: 6 Points: 325, Level: 6 Points: 325, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Altamonte Springs, FL
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!!

Reply With Quote
  #4 (permalink)  
Old August 30th, 2005, 03:04 PM
Friend of Wrox
 
Join Date: Jan 2004
Location: , , USA.
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)


Reply With Quote
  #5 (permalink)  
Old August 30th, 2005, 03:13 PM
Authorized User
Points: 325, Level: 6
Points: 325, Level: 6 Points: 325, Level: 6 Points: 325, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Altamonte Springs, FL
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yea, that's a good idea.

I'll do that.
Thanks:)

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:23 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.