jherr1971
04-16-2004, 03:13 AM
My service hosted at discountasp.net uses a MS SQL 2000 database. Many transactions are involved with this database inclusive deleting expired messages. I delete about 1000 rows in my database daily.
But my database keeps growing (currently over 100MB). One day I deleted over 2000 rows of data and the size of the database didn't shrink a bit.
After a while I figured that I have to perform a SHRINKDATABASE to gain back all deleted space. I've used this approach:
DBCC SHRINKDATABASE (database_name, 20)
GO
and get following error message:
Warnings: --->
W (1): Cannot shrink log file 2 (DB_54121_Log) because all logical log files are in use.
Thanks for any help in this issue.
But my database keeps growing (currently over 100MB). One day I deleted over 2000 rows of data and the size of the database didn't shrink a bit.
After a while I figured that I have to perform a SHRINKDATABASE to gain back all deleted space. I've used this approach:
DBCC SHRINKDATABASE (database_name, 20)
GO
and get following error message:
Warnings: --->
W (1): Cannot shrink log file 2 (DB_54121_Log) because all logical log files are in use.
Thanks for any help in this issue.