Subject | Re: Trouble with Gbak on Vista |
---|---|
Author | stewartwarren |
Post date | 2007-12-10T21:05:35Z |
Thanks Adam,
I've got two apps trying to access the firebird database. The main
app accesses the db OK. I take that to mean the server is running OK
and TCP port 3050 is not being block by a firewall.
The second app is just a visual interface to gbak to give the user a
button click approach to backups and restores. That's why the
message "unavailable database" threw me. With Interbase, that
message usually meant the Interbase server process was not running.
The backup app is not running gbak in its install directory, but in
another directory where we manually copied the gbak.exe file to. We
also manully copied the fbclient.dll file to the System32 directory.
The gbak parameters were written for interbase 5.6 version of gbak
which didn't accept long Windows filenames, as I recall. So gbak
would be invoked as:
gbak -B -b C:\Datdir~1\datafile.gdb C:\Datdir~1
\Backups\backfil.bac -user uname -password theword
With the firebird version of gbak:
Can it take the long filenames?
Should I use the localhost or 127.0.0.1 as part of the file path?
For example, would this be correct:
gbak -B -b localhost:C:\My LongDir Name\datafile.gdb localhost:C:\My
LongDir Name\Backups\backfile.bac -user uname -pasword theword
or maybe better as:
gbak -B -b 127.0.0.1:C:\My LongDir Name\datafile.gdb 127.0.0.1:C:\My
LongDir Name\Backups\backfile.bac -user uname -pasword theword
Warren
I've got two apps trying to access the firebird database. The main
app accesses the db OK. I take that to mean the server is running OK
and TCP port 3050 is not being block by a firewall.
The second app is just a visual interface to gbak to give the user a
button click approach to backups and restores. That's why the
message "unavailable database" threw me. With Interbase, that
message usually meant the Interbase server process was not running.
The backup app is not running gbak in its install directory, but in
another directory where we manually copied the gbak.exe file to. We
also manully copied the fbclient.dll file to the System32 directory.
The gbak parameters were written for interbase 5.6 version of gbak
which didn't accept long Windows filenames, as I recall. So gbak
would be invoked as:
gbak -B -b C:\Datdir~1\datafile.gdb C:\Datdir~1
\Backups\backfil.bac -user uname -password theword
With the firebird version of gbak:
Can it take the long filenames?
Should I use the localhost or 127.0.0.1 as part of the file path?
For example, would this be correct:
gbak -B -b localhost:C:\My LongDir Name\datafile.gdb localhost:C:\My
LongDir Name\Backups\backfile.bac -user uname -pasword theword
or maybe better as:
gbak -B -b 127.0.0.1:C:\My LongDir Name\datafile.gdb 127.0.0.1:C:\My
LongDir Name\Backups\backfile.bac -user uname -pasword theword
Warren
--- In firebird-support@yahoogroups.com, "Adam" <s3057043@...> wrote:
>
> --- In firebird-support@yahoogroups.com, "stewartwarren"
> <stewartwarren@> wrote:
> >
> > I have Firebird 1.5.4 running on a Vista machine. I'm calling
gbak
> > from a C++ Builder program. Initial error message was "system
can't
> > find fbclient.dll".
>
> When you say you are calling gbak from your program, are your
actually
> calling gbak in the path it was installed (eg %Program
> Files%\Firebird\Firebird_1_5\bin\) or are you copying gbak.exe to
your
> own path and executing that? If you are copying it to some other
> folder, you will need to understand that it is not a stand-alone
> independent application. It does need fbclient.dll (not sure whether
> you need the other dlls too).
>
> > I located this file in the Firbird folder and
> > copied it to the System32 folder.
>
> Microsoft are trying to discourage that sort of thing. You will find
> they virtualised this call and you actually copied it to somewhere
> beneath documents and settings.
>
> The problem (not so much with Firebird but with shared dlls in
> general) is that you get dll hell when some application goes and
> installs an antiquated version of the dll over the top of 'yours'.
> Windows will always try to load the dll from the current directory
> before running through %PATH% (which is where it finds %SYSTEM32%).
>
> > On next call, I get the error
> > message "unavailable database". I verified the Firebird server
was
> > running as a Service. Any ideas what might cause this error?
>
> A couple of possibilities, but without seeing the parameters you fed
> gbak, it is hard to say. Incidentally, have you attempted to run
gbak
> from the command line with whatever parameters you wanted rather
than
> your application?
>
> I doubt that local connections will work in Vista under 1.5, so make
> sure you use a TCP/IP connection string like [hostname]:
[alias/path].
> It it is the local PC, use 127.0.0.1 as Vista might try IPv6.
>
> Next, you will need to make sure you have allowed connections to
port
> 3050 or to the firebird server process (fbserver or fb_inet_server
> depending on what you installed) through the firewall. You should be
> able to use any third party database admin tool to confirm that your
> firebird installation is working correctly, or even
> telnet 127.0.0.1 3050
> should return an empty screen, not a message that the host actively
> refused the connection.
>
> Adam
>