Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve Firebird "unavailable database" error on a remote database?

I have a Firebird 2.0 database running on a remote Windows XP PC.
Using the ADO.net connection provider, I configure the connection as follows:

Dim x As New FirebirdSql.Data.FirebirdClient.FbConnectionStringBuilder
x.Database = "[hostname]:FileShare:/db/REMOTE_SVR.FDB"
x.UserID = "SYSDBA"
x.Password = "masterkey"

Dim y As New FirebirdSql.Data.FirebirdClient.FbConnection(x.ConnectionString)
y.Open()

Attempting to open the connection raises an FbException, with the message "unavailable database".

Downloading the ODBC drivers and attempting to connect with those settings produces the same error message.

I have copied the database file to my development environment and verified that I can connect to x.Database = "c:\testdb\REMOTE_SVR.FDB" with these settings (with a local install of Firebird 2.0 Server).

I have confirmed that the Firebird 2.0 Server is running on the remote PC. The fileshare in which the DB is located doesn't require any login or permissions.

I'm probably doing something dumb, but I'm out of ideas.

like image 976
Frosty840 Avatar asked Aug 12 '16 10:08

Frosty840


Video Answer


1 Answers

Firebird will - by default - not open database files that are located on a network share. The file must be on a physical disk of the server. This is done to protect the database against corruption from incorrect or insufficient locking of the file (eg when accessed by multiple Firebird server processes from different machines).

So you need to move the database to one of the real drives of the machine that hosts the Firebird server process.

like image 84
Mark Rotteveel Avatar answered Oct 09 '22 05:10

Mark Rotteveel