Database shrink Error

I know shrinking data files are not good, but sometimes we have to do it when we have some space issue. I don't do this on a regular basis but when i tried shrinking the data files i got his error below:  any idea???

Shrink failed for Datafile 'IBM_Core_1'. (Microsoft.Sqlserver.smo)
Additional information:
      An expception occured while executing a Transact-SQL statement or batch.
      (Microsoft.SqlServer.ConnectionInfo)
      A server error occured on the current command. The results, if any, should be discarded.
      File ID 6 of Database ID 2 cannot be shrunk as it is either being shrunk by another process or is empty. (Microsoft SQL Server)
LVL 1
espanolanthonyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mdagisCommented:
" cannot be shrunk as it is either being shrunk by another process or is empty"

I think the error message is descriptive here.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cyberkiwiCommented:
It is already being shrunk by another process, another query window perhaps?
0
espanolanthonyAuthor Commented:
i checked that and nothing is working except my shrink job....its very confusing.
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

mdagisCommented:
You can try doing this just to be sure:




ALTER DATABASE database_name SET SINGLE_USER;



DBCC SHRINKDATABASE (database_name);



-- TURN BACK MULTI USER
ALTER DATABASE database_name SET MULTI_USER;
0
espanolanthonyAuthor Commented:
i had an idea about that but any other idea?
setting single seems a bit confusing since client are using it at all times.
0
cyberkiwiCommented:
sp_who2 active

shows no other user performing a shrink operation?
0
espanolanthonyAuthor Commented:
no one else does the shrink. i am the only DBA followed by my manager. so no one touches the database.
0
cyberkiwiCommented:
Have a look at some suggestions here
http://social.msdn.microsoft.com/Forums/en/sqldatabaseengine/thread/581393f0-37bd-4521-9c6b-44fb37858b17

This worked for me - I increased the file size of the database file by a few MBs after which I was successfully able to issue the DBCC SHRINK file command.

Close Management Studio then launch Management Studio again and try the shrink again

take the database offline and then bring it back online.
0
espanolanthonyAuthor Commented:
thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.