Subject How to create a database over a UNC path?
Author echawkes

Sorry if this post is naive or redundant. I am new
to Firebird.

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

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.

We trying to incorporate Firebird v 1.5.1 into our product.
We plan to install Firebird at customer sites
in a standard location on PCs running Windows:
C:\Program Files\Firebird

However, we would like to create the database on a
NetApp drive via a UNC path. For example, if the
NetApp is called mthood, the path would be:

We would run processes that create and connect to
the database on the Windows PC via the Firebird C API.

Code I have tried
If firebird is installed and running as a service
on a PC called gradgrind, a code fragment is:

char *createStatement = "CREATE DATABASE
user 'sysdba' password 'masterkey'"

// Create a new database with SQL dialect 3.
// There is no transaction for create database,
// so we don't start or commit the transaction.
// See page 325 of the Firebird API guide.
if (isc_dsql_execute_immediate(status, newdb, &trans, 0,
createStatement, SQL_DIALECT, NULL) != 0)
pr_error(status, "create database");
return false; // failure

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
Statement failed, SQLCODE = -902

Unable to complete network request to host "mthood".
-Failed to establish a connection.
-The system cannot find the path specified.

The errors I get using the C API look similar:

PROBLEM ON 'create database'
Unable to complete network request to host "mthood".
- Failed to establish a connection.
- The system cannot find the path specified.\r\n
SQLCODE = -902, GDSCODE = 335544721

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';

Is there any way to do this over a UNC path?
If so, any advice would be appreciated.