Subject RE: [firebird-support] FireBird Services Manager, backup/restore and isc_service_query/start
Author Alan McDonald
>
> Hello,
>
> I am looking at the API doc to use isc_service_start for database
> backup/restore.
> If I understand well, I can check if a task is already running using
> the "current" service_handle (using isc_service_query and
> isc_info_svc_running).
>
> But, I would like to prevent my program from running several
> tasks=backup/restore (in different service_handle) at the same time.
> Mainly, I would like to avoid several backups of the *same* database.
>
> Is there something I missed that could help ?
>
>
> Am I right to assume the "isc_service_start" call is asynchronous ? I
> cannot test it on a huge database for the moment to check manually.
>
> We are using FB 1.5.
>
> Regards,
> Bénédicte
>

I can't answer this directly but since noone else seems to have made any
comments I would have to pipe up that I think you are going about this the
wrong way. If there are many users on your system, I would necessarily
prevent ALL of them from backing up the database and make it an activity for
the server only.
Alan
PS - you could shutdown the database from a client who would necessarily be
SYSDBA and would also require that all other users NOT be SYSDBA. Then you
could backup without anyone attached.
Please tell us why you think you need this ability. What are you trying to
avoid?