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 |
|
federicot
Starting Member
6 Posts |
Posted - 2004-04-21 : 09:59:37
|
| hi folks, im having some issues trying to shrink the tlog in my sql 2000.i performed the dbcc shrinkfile command and i got the error bellow.Cannot shrink log file 2 (Petrobras_Log) because all logical log files are in use.(1 row(s) affected)i have 3 databases with 3 diferent tlogs (with diferent file name) but with the same logical name.any aproach will be apreciated.cheers. |
|
|
samsekar
Constraint Violating Yak Guru
437 Posts |
Posted - 2004-04-21 : 10:12:39
|
| Can you post the DBCC Command ?- Sekar |
 |
|
|
federicot
Starting Member
6 Posts |
Posted - 2004-04-21 : 10:20:08
|
yes sure, dbcc shrinkfile (petrobras_log,1000)where petrobras_log is the logical name of the log.quote: Originally posted by samsekar Can you post the DBCC Command ?- Sekar
|
 |
|
|
samsekar
Constraint Violating Yak Guru
437 Posts |
Posted - 2004-04-21 : 11:08:47
|
| Try executing Backup log petrobras with truncate_only and then try dbcc shrinkfile.- Sekar |
 |
|
|
federicot
Starting Member
6 Posts |
Posted - 2004-04-21 : 14:32:46
|
it works, thanks a lot mate.take care..quote: Originally posted by samsekar Try executing Backup log petrobras with truncate_only and then try dbcc shrinkfile.- Sekar
|
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-04-21 : 14:35:00
|
| What is your database recovery model set to? Right click on your database, go to properties, then to Options tab. If it is set to FULL, then you need to start performing transaction log backups. If you don't need the ability to restore to a point in time, then change it to SIMPLE.I mention this because we often get asked similar questions to what you have posted and it usually is a result of the recovery model and not performing transaction log backups.Tara |
 |
|
|
|
|
|