Home > Archive > microsoft.public.sqlserver.server > November 2002 > RE: Huge Log file...what to do with it?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author RE: Huge Log file...what to do with it?
ace

2002-11-07, 1:23 pm

Hello,

I noticed that the log file for a database is too big (about 10 times bigger
than the data file .mdf) and I was wondering if there is anyway I can shrink
this file?

Thanx,

SK


Jerome Halmans [MS]

2002-11-10, 11:23 am

To shrink the transaction log you will first need to either backup the log
or truncate it.

Backup Log dbname to disk = 'filename'
Backup Log dbname with truncate_only

Once you have done that use DBCC SHRINKDATABASE or DBCC SHRINKFILE to cause
the log to shrink. If you are using SQL 2000 you should not have a problem.

Q272318 INF: Shrinking the Transaction Log in SQL Server 2000 with DBCC
http://support.microsoft.com/defaul...b;EN-US;Q272318

With SQL 7.0 you may need to generate some logged activity in the database
in order to move the active portion of the log to the beginning of the log
file.

see Q256650 INF: How to Shrink the SQL Server 7.0 Transaction Log
http://support.microsoft.com/defaul...b;EN-US;Q256650 for more
details on shrinking a transaction log in SQL 7.0.




This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.

Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net