all groups > sql server connect > july 2005 >
You're in the

sql server connect

group:

Error 5123


Error 5123 Dan Slaby
7/23/2005 6:59:36 PM
sql server connect:
I detached a database and moved it to another folder. I am trying to
re-attach the database and am getting 'Error 5123: CREATE FILE encountered
operating system error 32(The process cannot access the file because it is
being used by another process.) while attempting to open or create the
physical file...

Is there a file configuration setting I can change to eliminate this error
message? I've done this many times without problem and had no indication of
any process using this database when I detached it. Any helpful suggestions
to be able to attach this database will be appreciated. Thank you.

Dan

Re: Error 5123 Hari Prasad
7/24/2005 12:00:00 AM
Hi,

It can be our Backup process or Virus software accessing the file. Please
verify.

Thanks
Hari
SQL Server MVP

[quoted text, click to view]

RE: Error 5123 Leslie
7/27/2005 12:22:03 PM
Dan,

I am having the exact same problem. I loaded a utility from
www.sysinternals.com that told me that it is indeed the SQL Server process
locking the .mdf file. I, however, have been unable to correct the problem.
I'm thinking about stopping the SQL Server, renaming the .mdf files,
restarting the server, then attaching the DBs.

I believe I locked the DB file accidentally before I detached by issuing a
DBCC OpenTran(<DBName>). Now I can't reattach because of the file lock.

Leslie

[quoted text, click to view]
AddThis Social Bookmark Button