Firebird on Windows has the following switches to explicitly enable connection protocols:
C:\HQbird\Firebird30>firebird -a C:\HQbird\Firebird30>isql -user SYSDBA -pass masterkey localhost:o:\OLTP30.V20190415.FDB Database: localhost:o:\OLTP30.V20190415.FDB, User: SYSDBA SQL> exit; C:\HQbird\Firebird30>isql -user SYSDBA -pass masterkey xnet://o:\OLTP30.V20190415.FDB Database: xnet://o:\OLTP30.V20190415.FDB, User: SYSDBA SQL> exit; C:\HQbird\Firebird30>isql -user SYSDBA -pass masterkey \\Win-0u7pnfkg57p\o:\OLTP30.V20190415.FDB Database: \\Win-0u7pnfkg57p\o:\OLTP30.V20190415.FDB, User: SYSDBA SQL>exit;
Only XNET (local connection) is allowed:
C:\HQbird\Firebird30>firebird -a -x C:\HQbird\Firebird30>isql -user SYSDBA -pass masterkey localhost:o:\OLTP30.V20190415.FDB Statement failed, SQLSTATE = 08006 Unable to complete network request to host "localhost". -Failed to establish a connection. Use CONNECT or CREATE DATABASE to specify a database SQL> exit; C:\HQbird\Firebird30>isql -user SYSDBA -pass masterkey xnet://o:\OLTP30.V20190415.FDB Database: xnet://o:\OLTP30.V20190415.FDB, User: SYSDBA SQL> exit; C:\HQbird\Firebird30>isql -user SYSDBA -pass masterkey \\Win-0u7pnfkg57p\o:\OLTP30.V20190415.FDB Statement failed, SQLSTATE = 08006 Unable to complete network request to host ".". -Failed to establish a connection. -The system cannot find the file specified. Use CONNECT or CREATE DATABASE to specify a database SQL> exit;
Only INET (TCP connection) is allowed:
C:\HQbird\Firebird30>firebird -a -i C:\HQbird\Firebird30>isql -user SYSDBA -pass masterkey localhost:o:\OLTP30.V20190415.FDB Database: localhost:o:\OLTP30.V20190415.FDB, User: SYSDBA SQL> exit; C:\HQbird\Firebird30>isql -user SYSDBA -pass masterkey xnet://o:\OLTP30.V20190415.FDB Statement failed, SQLSTATE = 08006 Unable to complete network request to host "xnet://Global\FIREBIRDHQBIRD". Use CONNECT or CREATE DATABASE to specify a database SQL> exit; C:\HQbird\Firebird30>isql -user SYSDBA -pass masterkey \\Win-0u7pnfkg57p\o:\OLTP30.V20190415.FDB Statement failed, SQLSTATE = 08006 Unable to complete network request to host ".". -Failed to establish a connection. -The system cannot find the file specified. Use CONNECT or CREATE DATABASE to specify a database SQL> exit;INET and XNET connections, but don't allow WNET:
C:\HQbird\Firebird30>firebird -a -i -x
C:\HQbird\Firebird30>isql -user SYSDBA -pass masterkey localhost:o:\OLTP30.V20190415.FDB
Database: localhost:o:\OLTP30.V20190415.FDB, User: SYSDBA
SQL> exit;
C:\HQbird\Firebird30>isql -user SYSDBA -pass masterkey xnet://o:\OLTP30.V20190415.FDB
Database: xnet://o:\OLTP30.V20190415.FDB, User: SYSDBA
SQL> exit;
C:\HQbird\Firebird30>isql -user SYSDBA -pass masterkey \\Win-0u7pnfkg57p\o:\OLTP30.V20190415.FDB
Statement failed, SQLSTATE = 08006
Unable to complete network request to host ".".
-Failed to establish a connection.
-The system cannot find the file specified.
Use CONNECT or CREATE DATABASE to specify a database
SQL> exit;
These switches can be used to manage Firebird in the application mode and in the service mode.
For example, if you need to restrict connections to the Firebird server through the network, you can use switch -x.
Another good application of switches: if you see WNET errors in firebird.log, it means that somebody uses WNET connection string. Specify -i -x, and you will easily identify users with WNET connection string by their loud screams :)
Did you like it? Want more Firebird tips, tricks, and jokes? Subscribe to FirebirdSQL telegram channel!