What's a connection string?

Connection string is a string containing server name (hostname or IP address), TCP/IP port and a path to database or database alias. For example, if you are connecting to database /db/mydb.fdb on a Linux Firebird server at IP address, you can use a connection string like this:

You can also write the server hostname instead of IP address:


If the server is Windows, use drive letters as well:\db\mydb.fdb

You can also use aliases instead of database path:

If the server uses some TCP/IP port other than the default 3050, you need to add that as well. For example, if the port is 3051:\db\mydb.fdb

Beside the port name, you can also use the service name, which is gds_db by default:\db\mydb.fdb

Service name is basically an alias for port, and is stored in services file on your system. See FAQ #227 for more details.

Beside TCP/IP you can also connect via Named Pipes (a.k.a. NetBEUI or WNET) protocol. In that case, the connection string looks like this:


On Windows, you can also connect to server on local machine using local transport protocol. In Firebird 2.0, implementation has switched from IPServer to XNET. In this case, the connection string is supplied without the hostname prefix, in the same way as Firebird embedded is used.


Do you find this FAQ incorrect or incomplete? Please e-mail us what needs to be changed. To ensure quality, each change is checked by our editors (and often tested on live Firebird databases), before it enters the main FAQ database. If you desire so, the changes will be credited to your name. To learn more, visit our add content page.

All contents are copyright © 2007-2024 FirebirdFAQ.org unless otherwise stated in the text.

Links   Firebird   News   FlameRobin   Powered by FB: Home Inventory   Euchre  
Add content   About  

 Installation and setup
 Backup and restore
 Connectivity and API
 Errors and error codes