You are not logged in.
Hi,
I want to use the UniDAC library for firebird access.
In the constructor of the class TSQLDBUniDACConnectionProperties
Create(const aServerName, aDatabaseName, aUserID, aPassWord: RawUTF8);
mormot really is using the first parameter aServerName for what UniDAC names their provider (e.g. Oracle, Interbase, etc).
Due to that, I have no means to pass a server name to be used with firebird. Mormots implementation only works with embedded Firebird but not with Firebird on a different DB-Server.
Looking at the code I can see that in TSQLDBUniDACConnection.Create either fDatabase.Database or fDatabase.Server is set (depending on the DBMS) but not both.
Using Firebird on an external server requires to set both.
For the moment I can help myself by changing the TSQLDBUniDACConnection.Create by adding these two lines at the end:
if fDatabase.SpecificOptions.Values['Server']<>'' then
fDatabase.Server := fDatabase.SpecificOptions.Values['Server'];
Then I can create my TSQLDBUniDACConnectionProperties this way:
aProps := TSQLDBUniDACConnectionProperties.Create(
'Interbase',
'mormot',
'SYSDBA', 'masterkey');
aProps.SpecificOptions.Values['Server'] := '10.211.55.2';
But I think this should only be a temporary workaround.
Mormot should change the TSQLDBUniDACConnectionProperties constructor by adding a provider parameter instead of using the aServerName parameter for it.
What do you think?
Martin
Last edited by martin.suer (2013-12-21 21:12:19)
Offline
You are right.
We have added server name in TSQLDBUniDACConnectionProperties.URI(), able to specify a server name for UniDAC connection.
In fact, we can not change the TSQLDBUniDACConnectionProperties.Create() signature, without breaking all SynDB units.
The solution here is similar to what we have done with other kind of connections.
See http://synopse.info/fossil/info/a6894b2bba
About UniDAC and FireBird, I'm quite sure it will be much slower than using Zeos/ZDBC 7.2:
{
"ClassName":"TStat",
"Engine": "ZEOS Firebird",
"CreateTableTime": "236.74ms",
"NumberOfElements": 5000,
"InsertTime": "506.21ms",
"InsertRate": 9877,
"InsertBatchTime": "501.05ms",
"InsertBatchRate": 9979,
"InsertTransactionTime": "250.51ms",
"InsertTransactionRate": 19958,
"InsertBatchTransactionTime": "228.76ms",
"InsertBatchTransactionRate": 21856,
"ReadOneByOneTime": "338.42ms",
"ReadOneByOneRate": 14774,
"ReadAllVirtualTime": "78.68ms",
"ReadAllVirtualRate": 63546,
"ReadAllDirectTime": "60.05ms",
"ReadAllDirectRate": 83255,
"ClientCloseTime": "70us"
},
{
"ClassName":"TStat",
"Engine": "UniDAC Firebird",
"CreateTableTime": "123.34ms",
"NumberOfElements": 5000,
"InsertTime": "957.86ms",
"InsertRate": 5219,
"InsertBatchTime": "874.75ms",
"InsertBatchRate": 5715,
"InsertTransactionTime": "47.22s",
"InsertTransactionRate": 105,
"InsertBatchTransactionTime": "7.82s",
"InsertBatchTransactionRate": 639,
"ReadOneByOneTime": "2.76s",
"ReadOneByOneRate": 1808,
"ReadAllVirtualTime": "85.41ms",
"ReadAllVirtualRate": 58537,
"ReadAllDirectTime": "64.33ms",
"ReadAllDirectRate": 77720,
"ClientCloseTime": "70us"
}
Offline
Excellent.
Thank you.
Offline