The firebird.conf file has a list of providers in the following order: Remote, Engine13 (embedded) and loopback. When Firebird receive a connection request using the string above, it runs through the list of providers, from left to right, until it finds a provider that recognizes and creates the connection.
In this example, the first provider (Remote) fails since there is no host name in the string. The connection request then goes to the second provider (Engine13), which establishes an embedded connection.
How do you make an xnet connection rather than an embedded connection? To do so, you must specify the xnet protocol in the connection string:
xnet://c:\databases\base.fdb

You might ask why you would want to use xnet instead of embedded for a local connection. One possible scenario is that Firebird is running as SuperServer with an active connection to that database. In that case, the embedded connection to the database fails because the SuperServer has the database file open in exclusive mode. However, the xnet connection works since it will connect through the running SuperServer.

In isql, the show version command is an easy way to determine what kind of connection has been established:
SQL>show version;
Firebird/Windows/Intel/i386 (remote server), version " WI-V4.0.0.2496 Firebird 4.0/tcp (servidor)/P16:C"
SQL>show version;
Firebird/Windows/Intel/i386 (remote server), version " WI-V4.0.0.2496 Firebird 4.0/XNet (servidor)/P16"
Another way to show the connection type is to read the MON$REMOTE_PROTOCOL field of the mon$attachments monitoring table.
Partager