Subject | Re: [Firebird-Java] Database backup mode |
---|---|
Author | Thomas Steinmaurer |
Post date | 2016-04-28T08:46:12Z |
> On 2016-04-28 8:10, 'Steffen Heil (Mailinglisten)'I'm not sure how the enums of MON$DATABASE.MON$BACKUP_STATE map to Steffen's requirements?
> 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.
http://www.firebirdsql.org/file/documentation/reference_manuals/fblangref25-en/html/fblangref-appx05-mondb.html
Thomas