Home | Site Map | Cisco How ToNet How To | Wireless |Search | Forums | Services | Donations | Careers | About Us | Contact Us|

"Cannot shrink log file because logical files are in use"

Network Sharing , TCP/IP, Internet, Wireless, Exchange, IIS, ISA and Print

"Cannot shrink log file because logical files are in use"

Postby blin » Wed Feb 22, 2012 11:07 am

Our CRM got an additional feature from C360, which is a group calendar. The weird thing is, the C360 has a very very big log_file; its size is triple the size of the C360_data file itself. Therefore I'm trying to run a script to shrink the file.

Apparently I coudln't run the shrink; it keeps saying "Cannot shrink log file because logical files are in use", even tho I already stopped any C360 activities and even I was on single-user connection. I tried running the DBCC OPENTRAN, but it said there was no open active transaction..

Can anyone please help me on this one? Thanks in advanced!
How to Configure and Troubleshoot Cisco
http://www.howtocisco.com

Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com
blin
Site Admin
 
Posts: 2367
Joined: Wed Dec 31, 1969 7:00 pm
Location: Chicago, USA

Re: "Cannot shrink log file because logical files are in use"

Postby blin » Wed Feb 22, 2012 11:07 am

The message "Cannot shrink log file because logical files are in use" refers to the way SQL Server manages the space within the log file, and can still occur without any open transactions.



From what I remember the sequence that works on SQL 2000 (and I expect would be similar on SQL 2005) is:

Backup / truncate the log

Run DBCC SHRINKFILE on the log

Backup / truncate the log again

Run DBCC SHRINKFILE on the log again



There's an article somewhere in SQL Books online / MSDN that purports to explain how this works
How to Configure and Troubleshoot Cisco
http://www.howtocisco.com

Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com
blin
Site Admin
 
Posts: 2367
Joined: Wed Dec 31, 1969 7:00 pm
Location: Chicago, USA


Return to Networking

Your Ad Here

Who is online

Users browsing this forum: Majestic-12 [Bot] and 6 guests