N
N
Nday0012020-03-23 15:36:14
firebird
Nday001, 2020-03-23 15:36:14

How to transfer the Firebird database to another disk (symlink)?

There is a machine on Windows 10 Pro 32bit, a Firebird 2.5 SuperServer 32bit DBMS server and several databases. The databases are scattered on the E:\ drive with file names like "DBBALBLABLA123.FDB"
Task: move the *.FDB database files to C:\databases\AmirsDB\*.FDB and give normal names to the files. Everything should be transparent to users.

I did the following:
1. moved the DBBALBLABLA123.FDB database to C:\databases\AmirsDB\a76MS0045.FDB.
2. Created a symlink (via mklink) to a file in the old database location to the new location.

In the beginning everything was fine and working. Then I began to notice the following pattern: after a while, I can't open the database file via gbak or ibexpert (both with a local connection and with a network connection to localhost). It gives the error "The file is in use by another process". At the same time, the software for which this base is intended works with it regularly.

Restarting the Firebird service temporarily helps, gbak and ibexpert connect to the database.

I understand that symlinks are not the best idea, but I don’t see any other options to make everything transparent to users.

I'm trying to analyze through Process Monitor with a filter by database name. After trying to make a backup via gbak (gbak -g -b -v C:\databases\AmirsDB\a76MS0045.FDB C:\databases\AmirsDB\a76MS0045.fbk) events occur in the screenshot, the backup attempt itself ends with the error "the file is being used by another process "

5e7a246a13f5d641315958.png

When you try to make a backup of the same database using a symbolic link, the backup is created successfully.

I suspect that this is due to the fact that Firebird considers the database and the symbolic link to the database to be different databases.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question