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 February 21st, 2007, 01:48 PM
Registered User
 
Join Date: Feb 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL2000/MOM2005

Hi all,

I am having some issues with SQL 2000 and MOM 2005:

The first doubt is, I have one database (Onepoint) with two type of Logs, *.ldf and *.mdf, the *.mdf log as 25GB and I don’t know what can I do with this.

I know that this log refers to data, but I need to reduce this size asap, I already make the shrink and truncate but the size remains almost the same.

This machine just have one hard drive with 30Gb.

Can anyone help me, any kind of help is welcome

Thanks and regards
Hugo
 
Old February 23rd, 2007, 04:26 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Do you mean mdf file is of 25 GB? If so it is not the log file it is the data file. If that doesn't reduce, then probably you got to clean up the old data from the tables and try to shrink.

And what size does the ldf file come to?

Can you post us the commands that you tried?

Cheers.

_________________________
- Vijay G
Strive for Perfection
 
Old February 23rd, 2007, 07:11 AM
Registered User
 
Join Date: Feb 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The ldf log had 1,5Gb.
The srink tried was in the EM (SQL), right click in the database and srink
And tried the truncate: backup log database_name with truncate_only
 
Old February 23rd, 2007, 09:48 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

To cleanup the log you need to do the following.
Code:
Backup Log DB_NAME with truncate_only
Then you need to Shrink the log using
Code:
DBCC ShrinkFile(LOGICAL_NAME or FILE_ID,TARGET_SIZE)
The log file (.ldf) can be shrunk only to the extent of the existence of inactive transactions and not less than that.

And regarding the data file (.mdf), when you do a shrink and it doesn't come down in size, then you need to clean up the data that are older and not essentially required to exist in the DB. For this you should have had a maintenance plan planned earlier. If not you got to find out the tables on which you can run your DELETE statements and cleanup, so that there is some free space available in the data file for it to be shrunk to a lower size from 25 GB.

Hope that clarifies.
Cheers.

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL2000 Database available with any one ..? SoftMind BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 9 September 13th, 2006 10:48 AM
SQL2000 - DTSPackageDSO rgodar SQL Server DTS 0 June 1st, 2006 03:54 PM
SQL2005 to SQL2000 issue SoftMind BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 May 2nd, 2006 09:09 AM
DateTime Mayhem in SQL2000 dfalconer SQL Server 2000 11 July 16th, 2004 01:06 PM





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