Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Data Corruption Issues
 mdf file is locked

Author  Topic 

karthik
Starting Member

8 Posts

Posted - 2007-12-18 : 06:15:47

My mdf and ldf files were locked by windowsXP. Iam not using these files in anywhere of my two instances of databases.

Even after stopping SQL SERVER 2005 iam not able to cut or copy those files.

How to recover this files.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-12-18 : 06:58:08
Which process is locking the two files?



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

karthik
Starting Member

8 Posts

Posted - 2007-12-18 : 07:07:26
quote:
Originally posted by Peso

Which process is locking the two files?



E 12°55'05.25"
N 56°04'39.16"




Iam unable cut or copy or even attach to my database. But iam able to rename the folder in which two files exist. Iam not running any application related to that.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-12-18 : 07:11:50
Download processexplorer from sysinternals.com
See which process is using the mdf file.

http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx


E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

karthik
Starting Member

8 Posts

Posted - 2007-12-19 : 07:52:05
quote:
Originally posted by Peso

Download processexplorer from sysinternals.com
See which process is using the mdf file.

http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx


E 12°55'05.25"
N 56°04'39.16"




Iam already holding this tool, but to check for a particular file.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-12-19 : 08:03:06
Great!
What did the tool tell you? Which file has a handle for the mdf file that is locked?



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -