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 October 31st, 2003, 01:59 PM
Authorized User
 
Join Date: Jun 2003
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default Shrink Trans Log

Can you shrink Transaction Logs? I thought one could only shrink database files? If so can anyone help me with how to shrink Transaction Logs, a scripts will be highly appreciated .

Regards,

CarlWalden
__________________
CarlWalden
 
Old November 1st, 2003, 08:38 PM
Registered User
 
Join Date: Oct 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

you can find that in Sql Server Books online (it's part of sql server instalation) -> Index -> shrinking transaction logs or you can set your database recovery model to simple (Specify that the transaction log is truncated when the checkpoint process occurs).

Regards,

Nuno

 
Old November 3rd, 2003, 09:29 AM
Registered User
 
Join Date: Nov 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can detach the database, delete the transaction log file (ldf) and reattach the database using sp_attach_singlefile_db. This will create a new transaction log file that is very small.

If you have a lot of bulk transcations you might want to set your recover settings on the database to Bulked Log.



Quote:
quote:Originally posted by Walden
 Can you shrink Transaction Logs? I thought one could only shrink database files? If so can anyone help me with how to shrink Transaction Logs, a scripts will be highly appreciated .

Regards,

CarlWalden





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
Log Shrink acko SQL Server 2000 1 March 25th, 2004 10:57 AM





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