Link to home
Start Free TrialLog in
Avatar of brokeMyLegBiking
brokeMyLegBiking

asked on

Cannot shrink log file 2 (sfs_genie_log) because all logical log files are in use.

i am trying to run the following command, but am getting an error:


DBCC SHRINKDATABASE (SFS_GENIE,10)


Cannot shrink log file 2 (sfs_genie_log) because all logical log files are in use.

How do I make the sfs_genie_log file not be in use? so that I can shrink it.

Avatar of SweatCoder
SweatCoder
Flag of United States of America image

In query analyzer, change the pull-down, active DB, from SFS_GENIE, to "master" or something.
Avatar of brokeMyLegBiking
brokeMyLegBiking

ASKER

That didn't work. I ran a sp_who command to make sure that there are no open connections to the SFS_Genie database.

I also tried
dbcc shrinkfile( sfs_genie_log,1)
but that gave me the same message.
Avatar of Lowfatspread
do you have replication active on the database?

are there uncommitted transactions?

have you tried adding a new log file?
ASKER CERTIFIED SOLUTION
Avatar of Sirees
Sirees

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
awesome, that worked. Thanks Sirees.
Thank you