Reputation: 195
I have a server with Firebird 2.5.3 and I need read then database on another server over the ODBC connection for use in SSIS project(integration services), so I shared the folder with the .FDB database and set the address in my ODBC connection, but doesn't works.
My file firebird.conf:
# ----------------------------
# TCP Protocol Settings
#
# The TCP Service name/Port number to be used for client database
# connections.
#
# It is only necessary to change one of the entries, not both. The
# order of precendence is the 'RemoteServiceName' (if an entry is
# found in the 'services.' file) then the 'RemoteServicePort'.
#
# Type: string, integer
#
RemoteServiceName = fb_db
RemoteServicePort = 5050
I try:
Without port:
192.168.100.21:C:\IntegracaoRH\CONSISANET2_5.FDB
and
With :
192.168.100.21:5050:C:\IntegracaoRH\CONSISANET2_5.FDB
and same error.
How to make remote ODBC connection?
Upvotes: 1
Views: 2708
Reputation: 108941
According to the configuration you posted, your Firebird instance is running on port 5050, however when you don't specify a port in the connection string, then the Firebird client will default to port 3050.
To use the right port, you need to explicitly specify the port in your connection string, by using format <host>/<port>:<db-path-or-alias>
.
In other words, something like:
192.168.100.21/5050:database-alias
Where database-alias
should be the alias or the path of your database.
Be aware, Firebird on Windows supports URLs of the form \\<host>\<db-path-or-alias>
using the WNET protocol. However my guess would be that you navigated to the UNC-path \\192.168.100.21\IntegracaoRH\CONSISANET2_5.FDB
. There is no 1-on-1 correspondence between an UNC-path and a Firebird WNET-url: they look the same, but they are not the same thing. The 'Browse' button in the ODBC configuration should only be used to select databases local to your machine.
As an aside, being able to browse to an UNC-path \\192.168.100.21\IntegracaoRH\CONSISANET2_5.FDB
suggests that your database is in a folder shared to the network. You shouldn't share databases over the network through a fileshare. It is insecure, as anybody with access can create a copy of the database and access it with full permissions, or even replace or otherwise damage the database. Access to the database should always be done through a Firebird server on the same host as the database file.
Upvotes: 4