?
Solved

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

Posted on 2006-04-03
6
Medium Priority
?
9,683 Views
Last Modified: 2012-05-05
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.

0
Comment
Question by:brokeMyLegBiking
6 Comments
 
LVL 11

Expert Comment

by:SweatCoder
ID: 16362958
In query analyzer, change the pull-down, active DB, from SFS_GENIE, to "master" or something.
0
 
LVL 4

Author Comment

by:brokeMyLegBiking
ID: 16363018
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.
0
 
LVL 50

Expert Comment

by:Lowfatspread
ID: 16363032
do you have replication active on the database?

are there uncommitted transactions?

have you tried adding a new log file?
0
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 
LVL 20

Accepted Solution

by:
Sirees earned 2000 total points
ID: 16363040
To solve this temporarily change the Recovery Model to Simple.  You should then be able to shrink.
0
 
LVL 4

Author Comment

by:brokeMyLegBiking
ID: 16363077
awesome, that worked. Thanks Sirees.
0
 

Expert Comment

by:STEVE00098
ID: 25894625
Thank you
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question