1

I have created an update tool which will update a Firebird Server database to an SQL Server database, this updating is done using Firebird database backup file and updated to an SQL Server database. I have a Firebird backup file with data up tp 2016, but the client has latest data up to 2018. I want to access his backup file, and for this I have created a Firebird connection string

string ConnectionString = "User ID=sysdba;Password=masterkey;Database=192.168.1.19:50800:D:\\Company Data\\CLINEDB.CMP;DataSource=192.168.1.19;Charset=NONE;Server Type=1;";

I get this error:

Unable to complete network request to host "50800". failed to establish a connection

If I use this connection string

string ConnectionString = "User ID=sysdba;Password=masterkey;Database=192.168.1.19/50800:D:\\Company Data\\CLINEDB.CMP;;DataSource=192.168.1.19;Charset=NONE;Server Type=1;";

Unable to complete network request to host "D". failed to locate host machine

1
  • " want to access his backup file" - you can not open back-up file, you first have to recreate a database file from this backup. Which libraries you use to connect to the remote server? Charset=NONE is potentially dangerous setting... Try DataSource=192.168.1.19:50800 or DataSource=192.168.1.19/5080 and totally remove the server part from Database=. It seems you make that remote FB server to act as proxy and try to connect to the next server on your behalf, "server chaining" Commented Jul 20, 2018 at 8:30

1 Answer 1

3

Your connection string is wrong:

  1. You try to specify the full connection information in Database, but you need to specify them separately in DataSource, Port and Database.
  2. You also incorrectly try to use Firebird Embedded, while you need to connect to a remote server. So, Server Type=1 should be left off or be given value 0.

The right connection string would be:

"User ID=sysdba;Password=masterkey;DataSource=192.168.1.19;Port=50800;Database=D:\\Company Data\\CLINEDB.CMP;Charset=NONE;Server Type=0;";

See https://www.connectionstrings.com/firebird/

In your question you say you want to connect to a Firebird "backup file". That is not possible, you can only connect to a real Firebird database.

Sign up to request clarification or add additional context in comments.

12 Comments

i have tried with given connection string im getting error like this "Connection rejected by remote interface" and also how can i find extract port number
@Amarnath You should ask whoever administers that server. The default port for Firebird is port 3050 (which will also be used if you leave the Port property out of the string. "Connection rejected by remote interface" may also mean this is a Firebird 3 server which requires wire protocol encryption. It will need to be set to Enabled (or Disabled) for the Firebird ADO.net provider to be able to connect.
I do, but many people who regularly post on SO don't like their comments being edited. And trying to guess does not work always.
very sorry to bother, still i am getting error "unable to complete network request to host '192.168.1.11' even i enabled the "Wirecrypt=Enable" that removed # from firebird.config file. still i am getting error.
@Amarnath The setting is WireCrypt=Enabled (ending in a d), and otherwise it suggests that there is no Firebird server listening at the ip+port specified
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.