Subject AW: [firebird-support] [EDatabaseError] How to simultaneously connect to a firebird database in elevated and non-elevated mode.
Author Arno Peter

The *same user* can make multiple
connections from within the same application space.

Are you sure? Because I am able to connect to the same db using the same embedded library from different instances of my application using the same user account but only if all of the instances are elevated or all instances are not elevated.

"Mixed mode" seems not to work even if I use the same user account.

 

Actually this is only true for superserver embedded mode, prior to 2.5.

In 2.5 embedded mode on windows is superclassic, and multiple connections from multiple applications using the same embedded library are normally possible.

Yes, thats what I am trying.

As said before, I can start multiple applications (my exe file multiple times) and connect to the same db using the same embedded library.

So embedded version works for multiple applications on the same db but only if all applications are elevated or not (using the same user account).

Unfortunately my service has to run as elevated process.

 

There is some issue however that does not allow this from some context, e.g. from a normal application and from a script, executed by the web server.

Yes, maybe this is a similar issue.

 

If there is no other solution I would also install the firebird server but this would be the worst of all options.

 

 

Von: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com]
Gesendet: Freitag, 28. Oktober 2016 11:54
An: firebird-support@yahoogroups.com
Betreff: Re: [firebird-support] [EDatabaseError] How to simultaneously connect to a firebird database in elevated and non-elevated mode.

 

 

 

 

---In firebird-support@yahoogroups.com, <helebor@...> wrote :

> I am using Firebird embedded 3.0.1.

> I receive an EDatabase error : "[ODBC Firebird Driver]Database is
> probably already opened by another engine instance on another Windows session."

> when trying to connect to a firebird db simultaneously in
> Adminstrator (elevated) mode and non-elevated mode with the same user account.


It is not a question of "elevated" vs "non-elevated" users. Embedded
is *by design* a single-user model. A successful embedded connection
locks out all other users from connecting to the same database - hence
the error message you see. The *same user* can make multiple
connections from within the same application space.

> Does anyone know how to solve this issue?


It depends on the issue you are trying to solve. But if you want
multi-user access then you need to install a server. If you want
multiple embedded connections to connect concurrently, configure the
server as Classic or Superclassic. Note that the default server
installation is Superserver, which also cannot share with embedded
connections.

Describe what you want to achieve in real life and someone will advise
you about the best model for your requirements.

Incidentally, since you are using Delphi, be aware that embedded is a
deployment model, not a development one. You can't have an embedded
connection in the IDE space and another one in the executable space.
So you need to have a server running for your Delphi development, even
if you intend to deploy an embedded app for single-user use.

Helen

 

 

Actually this is only true for superserver embedded mode, prior to 2.5.

In 2.5 embedded mode on windows is superclassic, and multiple connections from multiple applications using the same embedded library are normally possible.

There is some issue however that does not allow this from some context, e.g. from a normal application and from a script, executed by the web server. I don't remember now the exact details, but it was not a question of user account - even when the web server was using the same user account, it didn't work. I believe there is at least one discussion somewhere in the list history about this issue.

 

Emil

 

 






----------------------------------------------------
JAM Software GmbH
Geschäftsführer: Joachim Marder
Am Wissenschaftspark 26 * 54296 Trier * Germany
Tel: 0651-145 653 -0 * Fax: 0651-145 653 -29
Handelsregister Nr. HRB 4920 (AG Wittlich) http://www.jam-software.de