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 |
|
jamie
Aged Yak Warrior
542 Posts |
Posted - 2003-09-04 : 07:32:30
|
| hello,I am trying to shrink my transaction log.I have tried, shrinking the database via EM , also triedBACKUP LOG MYDB WITH TRUNCATE_ONLYDBCC SHRINKFILE(MYDB_log, 10)in QA.I have even tried dettaching and reattaching the database, but instead of creating n LDF with a small size it creates an LDF of 57 meg, ( the size the transaction log that I want to shrink).any ideas how I can shrink the log file ?thank you,Jamie |
|
|
eyechart
Master Smack Fu Yak Hacker
3575 Posts |
Posted - 2003-09-04 : 09:05:02
|
| 57meg doesn't sound like a huge transaction log, so I am not sure why you need to shrink it. SQL will just allocate that space back again when it needs it.Anyway, if you still want to shrink the file try the code from this article http://evolvedcode.net/content/code_sqllogshrink/-ec |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-09-04 : 12:34:04
|
| You're bothering trying to shrink a 57MB file?!!! I've got 4GB files that I don't even need to shrink.Before you reattach the database, delete the LDF, then run sp_attach_single_file_db (see SQL Server Books Online for details). It will create a very small LDF file for you.Tara |
 |
|
|
|
|
|