Subject Re: [firebird-support] How to use gbak, gfix and isql on embedded server?
Author Helen Borrie
At 06:16 AM 15/01/2007, you wrote:
>Hi,
>
>Our application uses embedded server w/o SS installed.

Embedded is SS.

>Can I use gbak, gfix and isql to connect ot embedded server for maintenance

Yes. They are embedded applications too, so the same rules apply to
them with regard to relative locations of the executable and the
client library as apply to any other embedded application.

Gbak and gfix require an authenticated user for some operations. As
the embedded client bypasses user authentication, you need to use
some other way for the server to know that the user is
authorised. In your own applications you can pass them via the
Services API, which is the HIGHLY RECOMMENDED way to do admin tasks
with embedded. For the command line tools you have only one option,
which is to set the ISC_USER and ISC_PASSWORD environment variables
in the local user's environment space.

>tasks? I tried to figure out the command line parameters but failed. :-(

There is documentation for the command-line tools. You can read
brief help at the command line by entering the name of the executable
without any switches. Fuller documentation is in the OpGuide.pdf
of the IB 6.0 docset. Even fuller documentation is in the last part
of The Firebird Book. Newer features you can catch up on in the
release notes. If ISC_USER and ISC_PASSWORD are set, none of the
tools needs the -user or -password switches.

And don't forget that v.1.5 embedded can't access databases via a
network protocol.

But, for deployment, you should not rely on users to do stuff via the
command line tools. You can write batch files to set the variables,
run one or more specific commands and unset the variables. Only a
privileged user, e.g. Admin, should have access to these scripts, so
you should password-protect them.

And remember that, once attached, the current Windows user has an
exclusive lock on the database file. If you have a script running,
the ordinary user won't be able start his application, and vice versa.

But by far the proper way to make admin tasks available for your
deployed software is to write an admin program and use the Services
API, which provides its own structure for supplying username and
password. Most host language interfaces (Jaybird, Delphi, .NET,
etc.) provide wrappers for the Services API.

./heLen