Subject RE: [firebird-support] How to create a database over a UNC path?
Author Nigel Weeks
> Sorry if this post is naive or redundant. I am new
> to Firebird.
> Summary
> -------
> We are having trouble creating a database on a drive
> described by a UNC path. Firebird is not installed
> over a UNC path, but we would like to keep the database
> itself on a Network Appliance box for ease of backup, etc.
> I have searched the newsgroups, etc. a bit, and it sounds
> like this is unsupported. The most relevant posts I found
> reference
> However, what we want to do seems like a fairly normal
> thing for a database to support, so I wanted to make sure
> whether this is supported or not.

It is a popular question, but it's not a good idea.
If you seperate a database engine from it's database file, and put a network
in the middle, you're guaranteed the following:
speed and latency issues due to network congestion and protocol stacks
The possibility of a switch/hub jamming - DOS your database
exclusive access to your database file could be obtained by software other
than the database engine.

In short, keep the database file, and the database engine on the same
While it is possible to trick Firebird to store it's databases on drive
mappings, effectively storing the data elsewhere, it's a shocker of an idea.
The Firebird engine NEEDS exclusive low-level access to the database file.
Bad things will happen if you try to insert layers here.

Keep it local, and either shadow, replicate, or do regular backups and store
elsewhere if you need to.

> I have also tried via isql, as follows:
> SQL> CREATE DATABASE "gradgrind:\\mthood\data\test.fdb"
> user 'sysdba' password 'masterkey';
> Commit current transaction (y/n)?y
> Committing.
> Statement failed, SQLCODE = -902
> Unable to complete network request to host "mthood".
> -Failed to establish a connection.
> -The system cannot find the path specified.
> SQL>

This'll never work(Stepping through it's connect process):
Connect to machine 'gradgrind'
Somehow switch to a drive called \\mthood (Firebird is expecting drives and
filesystem path info here, not machine names)
traverse the path to the database "\data\test.fdb"

> I have tried a few different variants of this incantation,
> and I have tried their equivalents using isql as well,
> but no luck.
> I know Firebird is basically working fine because
> this works correctly (using isql and the C API):
> SQL> CREATE DATABASE "gradgrind:c:\tmp\test.fdb"
> user 'sysdba' password 'masterkey';
> SQL>


I hope this has answered your question...


Nigel Weeks
Tech Support & Systems Developer
71 - 75 Paterson Street
Tasmania 7250
Phone: 03 6336 7234