Subject RE: [firebird-support] Attempting Recovery With Services API
Author Alan McDonald
> Hi Folks:
>
> Developing on XP, VS2008 Pro, C++ Win32 no MFC.
>
> Firebird 2.1.1 Embedded, recient IBPP.
>
> I'm a big fan of IBPP, but for reasons I don't understand I can't
> get any traction with it when the task is recovering a database.
>
> Oliver spelled it out for me:
>
> svc = ServiceFactory()
> svc->Connect()
> svc->shutdown()
> svc->StartRestore)
> svc->Disconnect()

take shutdown out for embedded
Alan

>
> I just can't seem to run shutdown without it blowing up.
> With complaints this complaint.
>
> > Engine Code : 335544835
> > Engine Message :
> > Target shutdown mode is invalid for database "C:\PROGRAM FILES\...
> > \xxx.FDB"
>
> So I'm goint to take a swing at it without IBPP.
>
> The user is running my application, they hit the recover button and
> select a file to user for a recovery.
>
> Now I want to emulate what Oliver was showing me.
>
> So first I connect to the service with an attach, right?
>
> if (isc_service_attach(status, 0, service_name,
> &service_handle, spb_length, spb_buffer))
> (
>
> The service attach come back with an error:
>
> Cannot attach to services manager
>
> - service is not defined
>
> Because this is an embedded application, I pass a NULL service to
> isc_service_attach() and the sbp buffer has the parameters for a
> partner user and a password.
>
> is "Service" the saem as "Server"? of am I missing soemthng.