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 March 22nd, 2004, 10:40 AM
Authorized User
 
Join Date: Jun 2003
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default Log Shrink

Hi
I have a transactional log that size is 7286.12mb and space used is 548.42mb. When i shrink log to 1000mb i get something like this:
Current size: 7286.12mb and space used: 623.53mb.
I think that current size should be 1000mb.
Why current size still 7286.12mb.
thanks
alex
 
Old March 25th, 2004, 10:57 AM
bph bph is offline
Friend of Wrox
 
Join Date: Dec 2003
Posts: 102
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Try dumping the log, then the database. After that do your shrinkfile, but go only down to 2000 meg for starters.
If that works proceed to 1500 or a 1000. Those numbers still better than 7000.

--Verify the name of the log file.
select * from sysfiles

After you dump the log, run the following statement to shrink the file.
Use db_name
go
DBCC SHRINKFILE (name of log file, 100 --size you want To shrink to in meg--)
go
Example:
dbcc shrinkfile(abc_log, 100)
go

--Once that is done you can run this to shrink the database if you want. It can take some time when it comes to --larger databases, so choose the time you do it wisely.
use abc
go
DBCC SHRINKDATABASE (abc, 1000) size is megs once again.
GO






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
AppException Class -Log Error to Event Log bekim BOOK: ASP.NET Website Programming Problem-Design-Solution 7 December 7th, 2004 01:01 PM
Shrink Great Problem alyeng2000 SQL Server 2000 3 June 30th, 2004 11:29 AM
Shrink Log without SQL service restart. happygv SQL Server 2000 9 May 12th, 2004 09:24 AM
Shrink Trans Log Walden SQL Server 2000 2 November 3rd, 2003 09:29 AM





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