The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,975 other subscribers

Archive for December 15th, 2016

Firebird [# CORE-3558] server reports that DB file is used by another application on secondary attachment attempt through a symlink

Posted by jpluimers on 2016/12/15

It took quite a while to find out what happened, but this is the underlying issue: [# CORE-3558] FB server reports that DB file is used by another application on secondary attachment attempt through a symlink – Firebird RDBMS Issue Tracker.

The error you get in Windows is this one: I/O error during “CreateFile (open)” “The process cannot access the file because it is being used by another process.”

When you look with Process Explorer or handle.exe (both from SysInternals) they will show exactly the same filename (the canonical name to which the SymLink points).

But when you look in the config files of the applications, the database connections point to different filenames. Either (or both) are a symlink themselves or have a directory in their path that is a symlink.


In my case it was the latter: one of the directories in the path had an mklink.exe created link to another directory that had a directory contained the final file. There is even an API function that gets the canonical file name: GetFinalPathNameByHandle function (Windows)

Firebird doesn’t use that API on Windows (probably because it’s only available as of Windows Vista and Windows Server 2008) but does use a similar POSIX function (so on Mac OS X and Linux you don’t get this error).

Note that the above error messages can also happen when you use an embedded connection to a database (i.e. a connection string without a network address). There it is normal you get an exclusive file lock.


via: ADO.NET – a problem with multiple connections to the database (Russian) with Google Translate

Posted in Database Development, Development, Firebird, Software Development | Leave a Comment »

.NET/C# some links on querying the ActiveDirectory

Posted by jpluimers on 2016/12/15

Without dsquery installable, I had to query an ActiveDirectory spanning two domains.

Here are some links that helped:


Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Development, Software Development | Leave a Comment »

%d bloggers like this: