Page 1 of 1

Firebird server on Linux, cleint on windows

Posted: 08.11.2006, 14:18
by dudeski
Firebird server in instaled on linux server but clients are using windows. Client is delphi 7 application for windows.
If I install Firebird on windows mashine I use next settings on run time:

CONNBAZA.Protocol:='firebird-1.5';
CONNBAZA.HostName:='10.10.0.2';
CONNBAZA.Port:= 3051;
CONNBAZA.Database:= 'e:\DELPHI\KORISNIK.FDB';
CONNBAZA.Password:= 'masterkey';
CONNBAZA.User:= 'SYSDBA';
CONNBAZA.LoginPrompt:= False;
CONNBAZA.ReadOnly:= False;
CONNBAZA.TransactIsolationLevel:= tiReadCommitted ;

and every thing is ok.
But on linux server I can't make it work.

How to write connection string on run time for TZConnection component?
Do I need to make some aditional settings?

Posted: 08.11.2006, 14:53
by mdaems
Hi,

I have very little experience with Firebird, but when you connect to a different server I think easiest way is to create an alias on the server. (there is an aliases file in the firebird directory and (on windows) there is an example entry provided. You can use that alias name as database name in zeoslib. I only did this on windows but it should work on Linux as well, I think. This way you don't have to use path names.

Mark

Posted: 08.11.2006, 15:39
by dudeski
I'll try that.
All settings for connection are stored in external file so if I make instalation on some other plase I can only change path and ip and thats it. I don't have same network structure in every place.

I make ti work with IB expert but not with zeos connection component.

Posted: 08.11.2006, 16:05
by mdaems
Oh... How are your connection settings for IBExpert? Maybe we should figure out where it goes wrong.
What's the error that is reported?
Mark

Posted: 08.11.2006, 16:27
by gto
CONNBAZA.Protocol:='firebird-1.5';
CONNBAZA.HostName:='10.10.0.2'; // the ip for the server
//CONNBAZA.Port:= 3051; // only assign this if it's not the default port
CONNBAZA.Database:= 'e:\DELPHI\KORISNIK.FDB'; // the path on server!
CONNBAZA.Password:= 'masterkey';
CONNBAZA.User:= 'SYSDBA';
CONNBAZA.LoginPrompt:= False;
CONNBAZA.ReadOnly:= False;
CONNBAZA.TransactIsolationLevel:= tiReadCommitted ;

please take a closer look at Database property. It is relative to the database on server. This means, if your database is stored in /var/data/myDb.fdb, this will be your Database property, the server path of database.

Posted: 10.11.2006, 11:06
by dudeski
mdaems wrote:Oh... How are your connection settings for IBExpert? Maybe we should figure out where it goes wrong.
What's the error that is reported?
Mark
In IBExpert connection settings are:
Server=Remote
ServerVersion=firebird-1.5;
ServerName:=10.10.0.254/3050
DatabaseFile:= /media/backupdisk/EsAppBAZA/baza.FDB
DatbaseAlias=DatbaseAlias
Password:= 'masterkey';
User:= 'SYSDBA';

statment from IBExpert

Attempting to connect to:
10.10.0.254/3050:/media/backupdisk/EsAppBAZA/baza.FDB

Connecting... Passed!
Server version: LI-V6.3.3.4870 Firebird 1.5

Attempting to connect to services manager... Passed!

Disconnecting from database... Passed!


I made same setings directly in TZConnection commponent but it didn't work.
This is message
2006-11-10 11:05:10 cat: Connect, proto: firebird-1.5, msg: Unable to complete network request to host "10.10.0.254". Failed to establish a connection. No connection could be made because the target machine actively refused it.
, errcode: -902, error: Unsuccessful execution caused by a system error that precludes\nsuccessful execution of subsequent statements

Posted: 10.11.2006, 13:50
by gto
No connection could be made because the target machine actively refused it.
Wow! Very strange o.O

That's the same machine? the way IBExpert uses to connect on firebird isn't much different that zeos uses.

Posted: 10.11.2006, 15:03
by dudeski
Machine is same. Now you see my problem :-(

Posted: 13.11.2006, 11:09
by dudeski
I don't want to ask too mutch, but is it possible some of you to try to make configuration what I have? Firebird server on linux, client application on windows ? I'm interested in results.
Thank you.

Posted: 13.11.2006, 13:07
by gto
Hello dudeski! I have this configuration up and running on a costumer. Server linux (openSUSE 10) with firebird 1.5, and all clients Windows (from 98 to XP). And, well, everithing works !

Posted: 13.11.2006, 13:11
by dudeski
can you please send settings.

Posted: 13.11.2006, 15:30
by gto
Well, it's almost the thing you have done.

Protocol is 'firebird-1.5', Hostname is the ip adress of server (192.168.1.1, in case), Database is the path on server (/raid/dados/dados.fdb), User and Password for the server (I've changed the SYSDBA default pass) and TransIsolation is tiReadCommited.
With I don't mention, is set to default.

Posted: 16.11.2006, 08:43
by dudeski
I find the source of problem.
Server configuration was wrong.
But also it was confusing becouse when I put ServerName:=10.10.0.254/3050 in IBexpert everything was fine but when I put ServerName:=10.10.0.254 I have error.
So I changed port to 3051 and every thing is fine now.