TCP/IP connection strings
Firebird has two forms of TCP/IP connection strings:
-
{inet|inet4|inet6}://[<host>[:<port>]/]<path-or-alias>
-
<host>[/port]:<path-or-alias>
With:
<host>
-
a server name or IP address (for IPv6 addresses, enclose them in
[
and]
) <port>
-
port number or service name
<path-or-alias>
-
either the absolute path + filename on the server machine, or an alias defined on the server machine
Examples:
-
On Linux/Unix:
pongo:/opt/firebird/examples/empbuild/employee.fdb inet://pongo//opt/firebird/examples/empbuild/employee.fdb bongo/3052:fury inet://bongo:3052/fury 112.179.0.1:/var/Firebird/databases/butterflies.fdb inet://112.179.0.1//var/Firebird/databases/butterflies.fdb localhost:blackjack.fdb inet://localhost/blackjack.fdb
-
On Windows:
siamang:C:\Biology\Data\Primates\Apes\populations.fdb inet://siamang/C:\Biology\Data\Primates\Apes\populations.fdb sofa:D:\Misc\Friends\Rich\Lenders.fdb inet://sofa/D:\Misc\Friends\Rich\Lenders.fdb inca/fb_db:D:\Traffic\Roads.fdb inet://inca:fb_db/D:\Traffic\Roads.fdb 127.0.0.1:Borrowers inet://127.0.0.1/Borrowers
Notice how the aliased connection strings don’t give any clue about the server OS.And they don’t have to, either: you talk to a Linux Firebird server just like you talk to a Windows Firebird server.In fact, specifying an explicit database path is one of the rare occasions where you have to be aware of the difference.