Subject Re: How to use gbak, gfix and isql on embedded server?
Author Sean
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 09:28 AM 16/01/2007, you wrote:
>
> >I am worried that after deployment if a database gets corrupted, I
> >need better tools such as gfix to fix the problem. That's why I was
> >wondering how to use gfix / isql to manage an embedded database.
> >
> >Back to the original question: I did the following
> >1. On a win2k3 server with firebird service installed, stopped the
service
> >2. copied firebird embedded files into firebird 1.5 .\bin folder
> >3. added ISC_USER of SYSDBA, and ISC_PASSWORD of a junk password, and
> >double checked to make sure they were available in commnad prompt
> >4. in command prompt, went to the folder with the database, launched
> >isql by "isql <database path & name>"
> >
> >I got an error of "Statement failed, SQLCODE = -904" "unavailable
> >database"
> >
> >Are the steps wrong?
>
> Yes, they are wrong. What's happening is that fbembed.dll is not
> being used as the client, because it hasn't been renamed; so your
> connection request is finding the regular client either locally or in
> your system path and attempting to connect to the full server, which
> is not running.
>
> As to the steps, they are not as recommended for setting up an
> embedded application structure on disk. It looks likely that you
> haven't followed the installation instructions in the release
> notes. I won't waste time and bandwidth describing the recommended
> folder structure since it is all docmented.
>
> For a start, you need to rename fbembed.dll to fbclient.dll. You
> haven't mentioned that you did this.
>
> Next, each embedded installation needs to be self-contained and able
> to find its bits and pieces in its own on-disk folder structure that
> is relative to the location of the application executable. What I do
> (for own purposes, not deployment) is have a self-contained
> application setup for the command-line tools alone, which allows me
> to have a single set of tools that I can use independently of the
> various other self-contained embedded setups I might have around the
system.
>
> ./heLen
>

Cool! After following your suggestion, it's working like a charm :)