Subject Re: [Firebird-Java] Database backup mode
Author Mark Rotteveel
On 2016-04-28 8:10, 'Steffen Heil (Mailinglisten)'
lists@... [Firebird-Java] wrote:
> Hi
>
>
> I can enable and disable database backup mode using:
> ALTER DATABASE BEGIN BACKUP
> and
> ALTER DATABASE END BACKUP
>
> This works though a usual Jaybird SQL connection.
> But is there a way to query the database if it is in backup mode or
> not?
>
> My problem is that I need to be sure that the database is in backup
> mode to copy the database file but executing the first statement
> above
> will result in an sql exception if the database already is in backup
> mode. So I cannot tell if the exception is about a generic sql error
> (maybe the connection failed) or if the exception is about the
> database already being in backup mode.
> So I would like to check the state just after executing that
> statement (and ignoring sql exception).
> But how can I check that?

I don't know for sure, I'd need to check that; I assume there is some
service call that provides this info.

Can't you tell from the exception message if you are in backup mode or
not, or is it too generic?

Mark