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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-12-17 : 08:12:46
|
| kobi writes "Hello,I have a 400MB .mdf file and 12GB .ldf file.I do not need the log file anymore and i want to clear the file.Is there any way to clear this huge log file and start a new one?Thanks in advanced,Kobi." |
|
|
harshal_in
Aged Yak Warrior
633 Posts |
Posted - 2002-12-17 : 08:34:36
|
quote: kobi writes "Hello,I have a 400MB .mdf file and 12GB .ldf file.I do not need the log file anymore and i want to clear the file.Is there any way to clear this huge log file and start a new one?Thanks in advanced,Kobi."
backup the log file with truncate option then use dbcc shrinkfile to shrink the log file.harshalExpect the UnExpectedEdited by - harshal_in on 12/17/2002 08:35:22 |
 |
|
|
KnooKie
Aged Yak Warrior
623 Posts |
Posted - 2002-12-17 : 08:37:03
|
| use sp_detachdb and sp_attachdb. See BOL for exact syntax.when you reattach the database it will create a new default log automatically for you.===========Paul |
 |
|
|
|
|
|