Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 how can remove logfile ?

Author  Topic 

pamyral_279
Posting Yak Master

143 Posts

Posted - 2007-01-22 : 12:10:08
I am begginer sql server 2000.I only know that :
There are two type file : datafile and logfile.
After time i use database in sqlserver 2000,my logfile increase very fast.Can I delete it ? How to delete it ?
Which best method in situation ?
Give me some advice or tutorial in managing logfile.
Thank you very much.

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2007-01-22 : 12:40:38
cant delete it. backup will database will truncate the log.
Go to Top of Page

pamyral_279
Posting Yak Master

143 Posts

Posted - 2007-01-22 : 20:20:47
quote:
Originally posted by russell

cant delete it. backup will database will truncate the log.


You refer to drop database,and restore the backup . is it correct ?
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2007-01-22 : 20:25:05
no, what i mean is when u execute backup, the log file will be truncated. if u aren't running regular backups then (1) u should be but (2) can do this to shrink the file size

use databaseName
GO
BACKUP Log databaseName WITH TRUNCATE_ONLY

DBCC SHRINKFILE (databaseName_log, 2)

that'll shrink the file size of the log
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-01-23 : 02:33:14
See http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=Why%20is%20my%20LDF%20Log%20File%20so%20big

Kristen
Go to Top of Page
   

- Advertisement -