Subject | RE: [firebird-support] embedded FB and backup |
---|---|
Author | Alan McDonald |
Post date | 2005-02-24T21:07:38Z |
> > for the embedded app - you need to use the embedded server'sthis IS true - the embedded server can/does accept as many connections as
> services API to
> > backup. If your app is running and you execute gbak external to
> the app - it
> > will be refused a connection. Your app must be closed before
> gbak can maek
> > this separte connection.
> I don't think this is true. Embedded server accepts only one connection
> at a time.
> So I think you can just close the connection and then run gbak from
> within your app (which is probably also true when you use the services
> API through IBO or another component set that supports services.
> > OTOH - if your app uses IBO it can use the IBOAdmin components
> (IBX=IBAdmin)
> > components to attache to the embedded server and run a backup.
> > I also provide restore features which require. I have this all running
> > seamlessly in my embedded app.
> > Alan
> >
>
> HTH
> Urs
you like via a single embedded dll load i.e one app loads the embedded
server which connects to a datbase - this database is now locked by the
embedded server and no other loaded embedded server can connect to it nor
can any full server installation. The application, however, can continue,
under it's lock on the database file, to make as many connections as it
likes. I do it so there's no question about this.
A connection to the embedded services API is just another of those
connections. There is no need to disconnect from the databse, run gbak and
then re-connect.
There is apparent confusion about these points since we use the word
"connection" to mena differnet things. An embedded "connection" is
constituted by the embedded server, which is loaded by a host application
opening a database file for the purpose of making application instructed
transactions. The application connection is a request by the application to
the embedded server for it (the server) to make a(nother) user connection to
the same file. The embedded server connection is blocking in nature. The
application connection, however, is not blocking. e.g. an embedded server
application using a local file can load only once on the same PC, the second
attempt to load the app will fail since the first embedded server locks the
file. The first/single application, hoever, can continue to use it's loaded
connection fo the database in exactly the same way as it would it it were
talking to a full server installation, i.e. multi threads and many
connections.
Alan