""Magnus Hagander"" <mha@sollentuna.net> writes
>
> I suggest you try using Process Explorer from www.sysinternals.com to
> figure out who has the file open. Most of the time it should be able to
> tell you exactly who has locked the file - at least as long as it's done
> from userspace. I'm not 100% sure on how it deals with kernel level
> locks.
>
Yes, "handle" (also in sysinternal's site) might be an alternative. I've
add a call to "handle" to catch all the open handles of DataDir when the
error is trapped.
Regards,
Qingqing