Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
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 July 11th, 2004, 04:28 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default IsThere A way Easiest to clear Log File

Actually I Need To Delete The Log File Or Remove Its Contents

i have one way but is there a way else
my way is two generate a script file and make a new db and then import data....



Ahmed Ali
Software Developer
__________________
Ahmed Ali
Senior Software Developer
 
Old July 20th, 2004, 09:11 AM
Authorized User
 
Join Date: Jul 2004
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Check this URL:

hope it helps!

http://www.mssqlcity.com/FAQ/Trouble/LogTrunc.htm
 
Old August 5th, 2004, 11:51 AM
Authorized User
 
Join Date: Jun 2003
Posts: 77
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I use the following script (replace dbname with the name of the database):

backup log dbname with no_log
dbcc shrinkdatabase(dbname, 0)

remember to do a backup before, just in case.

the script can be run in SQL Query Analyzer, for example.
 
Old August 5th, 2004, 04:10 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

it works

Ahmed Ali
Software Developer





Similar Threads
Thread Thread Starter Forum Replies Last Post
log file problem MunishBhatia SQL Server 2005 0 October 5th, 2007 04:22 AM
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
Log file tsimsha Classic ASP Databases 1 April 30th, 2005 04:27 AM
Easiest way to change the orientation of a DGrid macupryk General .NET 1 October 7th, 2004 11:25 AM
Log file Asish SQL Server 2000 3 November 10th, 2003 02:30 PM





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