Re: [firebird-support] Firebird 2.5 - UTF8 - UDFs

2013-03-04 Thread Konstantin Khomoutov
On Mon, 4 Mar 2013 12:25:14 -0400
W O  wrote:

> How do you use fbclone?
> 
> It is a command-line tool, but I can not find its documentation, just
> the syntax.

It's able to show a long help message -- just play with its
command-line options.  Start with "-h".


Re: [firebird-support] fbtrace - linux server

2013-03-13 Thread Konstantin Khomoutov
On Wed, 13 Mar 2013 08:54:58 +0100
 wrote:

> I used trace & audit in de services menu of IBexpert with a windows
> firebird server and it works great ! 
> Now, i wanted to trace a database on a linux firebird 2.5 server but i
> get nothing in de trace screen.
> 
> I also tried with the trial version of "FB tracemanager 2", but I see
> nothing when I work on the database. Nothing is traced.
> 
> 
> Is there special things/config to activate in a linux server so that
> we can trace activity on the database ? (I did nothing special on the
> windows server)

Just a shot in the dark: are you running Debian Squeeze by chance?
I've stumbled upon this bug [1] in it, which looks similar to the
symptoms you describe.

Next time please consider that "Linux" is just a kernel, and you're not
running FB on Linux, you're running it on some operating system which
just happens to use Linux as its kernel.  Bugs in software may be
caused by myriads of various factors, often not rooted in software
itself, but rather in the libraries they use, the ways the system is
configured etc.  So always specify precisely which version of which OS
you're running and how did you obtain the software which shows
problematic behaviour -- I mean, did you install FB from a package
provided by your OS or fetched ready-made package from somewhere else
or built from the sources?

1. http://bugs.debian.org/690769


Re: [firebird-support] fbtrace - linux server

2013-03-13 Thread Konstantin Khomoutov
On Wed, 13 Mar 2013 11:28:26 +0100
 wrote:

> Thanks Konstantin,
> Sorry for the darkness ... :-)
> Yes The server is a debian, just checked the version : 6.0.7 , that's
> a Squeeze and the firebird package was installed from the debian
> depot. Just checked firebird log file, and found this message  : (not
> exactly the same as the one you gave in the debian bug report)
> 
> "Trace plugin libfbtrace.so returned error on call trace_create.
> Error details: line 1: error while compiling regular
> expression "/var/databases/mlv2_ps4t.fdb""
> 
> I'm now reading the bugreport/tracker posts. 

No, this message usually results from invalid specification of the
database in the trace configuration file.
Could you please post the exact contents of the file you're using
(passwords and things like this culled, of course)?


Re: [firebird-support] How do you stop/start firebird 2.5 on Linux Ubuntu?

2013-03-29 Thread Konstantin Khomoutov
On Thu, Mar 28, 2013 at 11:02:45PM -, jorgebj wrote:

> I had Firebird 2.1 and I stopped with: ./fbmgr.bin
> > -shut -password masterkey
> 
> Now I think it does not exist fbmgr in Firebird version 2.5
> How do you stop/start firebird 2.5 on Linux Ubuntu?

I can't say for Ubuntu as I use Debian on my Linux-based servers, but
since Ubuntu most possibly just pulls Firebird packages from Debian, my
response has a good chance to apply to your case.

The idea is that the "classic" server (one process per client
connection) is run through the daemon called "inetd" (or "xinetd" --
different implementations exists and are packaged).  This daemon opens
the specified TCP port and listens for connections.  After completing a
successful connection it spawns the program configured to run on that
port and agganges to that the program communicates through that
connection (maintained by inetd).  You can see configuration snippets
packaged for inetd daemon in [1] -- look for pathnames starting with
"/etc/init.d" and "/etc/xinet.d".  So basically after installing a
classic server you should go and check this port (3050 or gds_db) is
enabled (uncommented) in the inetd configuration; uncomment it and
reload the inetd daemon if it isn't.

The "superver" which uses OS threads hosted in a single process to
handle client sessions runs just that single process and manages TCP
connections by itself, so it's itself a daemon.  Consequently, it's
startup and shutdown is managed its own init-script, you can find it in
[2] -- look for the pathname starting from "/etc/init.d".

1. http://packages.ubuntu.com/lucid/i386/firebird2.1-classic/filelist
2. http://packages.ubuntu.com/lucid/i386/firebird2.0-super/filelist



Re: [firebird-support] Restart and stop Firebird 2.5.2 on Linux

2013-04-07 Thread Konstantin Khomoutov
On Fri, 05 Apr 2013 22:17:09 -
"jorgebj"  wrote:

> How to restart and stop Firebird 2.5.2 on Linux?
> No rebooting the server.
> 
> In version 2.1 of FireBird the command fbmgr was used to stop and
> restart Firebird.
> 
> In Firebird 2.5.2 command no longer exists fbmgr.bin

Did you see this [1] my response to your first post on this topic?

1. http://tech.groups.yahoo.com/group/firebird-support/message/121289


Re: [firebird-support] Could you give me an advice how to switch my Windows-1250 database to UTF-8?

2013-04-17 Thread Konstantin Khomoutov
On Wed, 17 Apr 2013 07:52:47 -
"un_spoken"  wrote:

> We have few hundred of clients and each client is using database with
> the same structure. How should we do the conversion? What is your
> exeprience with this? Can it be done automatically? What tools could
> you recommend?

fbclone [1] reportedly can do that.  Of course, you will have to
thoroughly test the sample conversion result before doing the final
conversion and deploying it.

1. http://code.google.com/p/fbclone/


Re: [firebird-support] Running firebird using inetd suddenly exited with status 1

2013-04-29 Thread Konstantin Khomoutov
On Mon, 29 Apr 2013 15:39:55 +0200
Man Gro  wrote:

> Hi everybody,
> I'm running Firebird 2.0 using inetd on a dedicated machine (FreeBSD)
> for several years. This morning the database suddenly stopped
> responding and then suddenly started responding.
> 
> File /var/log/messages was full of these messages
> inetd[856]: /usr/local/bin/fb_inet_server[84685]: exited, status 1
> 
> I also find another one related to firebird
> inetd[856]: /usr/local/bin/fb_inet_server[84569]: exited, signal 14
> 
> Almost all of them were "exited, status 1".
> 
> I searched the web and couldn't find what that means. Any advice what
> "exited, status 1" means?

"status 1" most probably means the exit code of the process.
Unfortunately, the FB classic server code seems to just use code 1 for
everything gone wrong.

Googling yields that signal 14 is SIGALRM on FreeBSD (as required by
POSIX).  The signal(7) manual page says that the default action for a
process that received this signal and not handled it is to terminate.
The code of FB 2.5 does really uses the alarm(2) syscall and installs a
handler to trap SIGALRM.  It might turn out that the code misbehaves
under certain circumstances so that the signal is delivered at the
moment where no handler is installed.

So...  Try to look to the syslog logs -- is there anything related to
FB logged by the inetd?  Try passing the "-d" command-line option to
the fb_inet_server in the inetd configuration file and see if this
improves logging in any way.


Re: [firebird-support] Re: Aliases and Windows 7

2013-05-30 Thread Konstantin Khomoutov
On Thu, 30 May 2013 11:55:26 -
"Walter"  wrote:

> this is the path of the fdb file:
> C:\Users\Desy\Documents\FB
> 
> this is the aliases.conf (on the server machine):
> XFILES = C:\Users\Desy\Documents\FB\XFILES.FDB
> 
> the error occours both with local or remote access.

> For example, I had Firebird installed on a Windows 2003 machine
> (named AD2K3), which has this aliases.conf: XFILES = C:\DATI\FB
> \XFILES.FDB
> 
> And I can access it from any client with AD2K3:XFILES

How Firebird is being run on this box?  With what credentials I mean?
Does it have access to the specified file (and all the enclosing
directories)?


Re: [firebird-support] Incremental Backup

2013-06-28 Thread Konstantin Khomoutov
On Thu, 27 Jun 2013 15:21:51 -0400
"Leyne, Sean"  wrote:

> > You are right. Now a days gbak indeed takes arounda five 5 minutes.
> > 
> > I was thinking about use nbackup for additional "log".
> > I would make incremental backup every 5 minutes (for example) and
> > so I could restore the db situation in any 5 minutes I need.
> > 
> > Is it a good idea?
> 
> You would need to also have hourly/daily incremental backups.
> 
> Since in order to recover using an incremental you would need to
> restore the last full backup, as well as each the last daily, last
> hourly and each 5 min incremental, to perform a "point-in-time"
> recovery...

Actually not.  A backup session of level N > 0 copies all the data
since the backup of level N - 1 ended, so should the OP take only, say,
level 1 backup each 5 minutes, each backup file will contain the data
which could be used to combine the last 0-level (that is, full) backup
with the last incremental one.  Combining the last full backup with some
other (earlier) incremental would provide for PITR.  I'd say it's a
viable approach unless the database receives really heavy changes so
that doing only level 1 incrementals would copy too much data each time.

Also the OP should be aware of the fact if they intend to implement
incremental backups, full backups should also be done with nbackup --
IIUC it's impossible to apply files created by nbackup containing
backups of levels > 0 without also having lower-level backups created
by nbackup.  And AFAIK these files are not portable across different
systems (machine word- and endianness-wise), and this should also be
considered before implementing such a scheme.


Re: [firebird-support] Re: Freepascal 32 bit service on debian amd64 / 64 bit firebird?

2013-07-11 Thread Konstantin Khomoutov
On Thu, 11 Jul 2013 10:15:53 +0200
John vd Waeter  wrote:

[...]

> But still "cannot load error" while starting the program.
> Could it be it finds the 64 bit libfbclient.so first and throws the
> "can not load default Firebird clients" error?

A quick followup on debugging the dynamic loader job -- an invocation
like this one

$ LD_DEBUG=libs,files /usr/bin/gcc

would provide you with details on what libraries the linker tried to
load, why, and from where.


Re: [firebird-support] Re: Freepascal 32 bit service on debian amd64 / 64 bit firebird?

2013-07-11 Thread Konstantin Khomoutov
On Thu, 11 Jul 2013 10:15:53 +0200
John vd Waeter  wrote:

> On 11-7-2013 09:44, Philippe Makowski wrote:
> > Le 10/07/13 16:13, John vd Waeter a écrit :
> >> So I tried:
> >> - get a 32 bit libfbclient.so from another 32 bit machine.
> >> - put it in /lib/i386-linux-gnu
> >> - made a reference in /etc/ld.so.conf.d
> >> - run ldconfig
> >>
> > bad idea
> >
> >> But the ibconnection in freepascal still cannot find it.
> >> Maybe this is a freepascal question... I don't know.
> >> Is it enough to get libfbclient.so from a 32 bit machine or is
> >> does it depend on more 32 bit libraries?
> > certainly more
> >
> > you should better do something like :
> >
> > sudo dpkg --add-architecture i386
> > sudo apt-get update
> > sudo apt-get install libfbclient2:i386

[...]

> That last extension (:I386) did it to get the 32 bit library. I
> didn't know about such extension.

That's the consequence of Wheezy supporting "multi-arch" for a large
extent of its code base.  It's detailed in [1] which is linked to from
the official release notes document [2] (which you're supposed to read
before upgrading or installing).

> But still "cannot load error" while starting the program.
> Could it be it finds the 64 bit libfbclient.so first and throws the
> "can not load default Firebird clients" error?

Did you undo your hacks to the dynamic linker configuration?

After undoing, try running

ldd /path/to/your/program

and see if it shows you all the libraries it needs w/o signalizing any
errors for any of them.

Also try running your program while having LD_VERBOSE or LD_DEBUG set
to something sensible in your environment (refer to the ld-linux(8)
manual page for more info) -- the linker will print you what happens at
it tries to satisfy all the dependencies to run your program.

An example to get you started:

$ LD_TRACE_LOADED_OBJECTS=1 LD_VERBOSE=1 /usr/bin/gcc


Re: [firebird-support] NBackup level 0 vs. file copy?

2013-10-08 Thread Konstantin Khomoutov
On Tue, 8 Oct 2013 12:37:57 +0200
Kjell Rilbe  wrote:

> Working with FB 2.5 on Windows 64 bit, how does Nbackup level 0
> perform compared to a high-performance copy utility like FastCopy?
> 
> I'm asking because my DB is 80+ Gbyte and both the database and the 
> backup are currently on the same physical disk. FastCopy works with 
> large chunks to minimize time wasted on disk seeks.
> 
> How does NBackup perform in this regard?
> 
> Second question: after transferring the level 0 backup file to a
> secure backup volume, I want to use it to create a DB copy for
> test/delev/debug purposes. I can do that using Nbackup restore, b ut
> does this imply copying the entire database yet again?
> 
> With a file copy solution with Nbackup lock, I can essentially use
> the copy "as is" (need to do Nbackup fixup + sweep though). I.e. a
> single read+write of 80 Gbyte. Is this possible with a Nbackup level
> 0 backup approach?

Note that nbackup not only copies the data but also updates a special
system table in the database, recording the backup level, timestap and
name of the destination file.  This is used by nbackup to create backup
of the next (lower level).  So if you intend to ever take backups of
lower levels, I'd say you have to use nbackup to do the job, otherwise
lock/copy/unlock is a quite reasonable alternative, I reckon.


Re: [firebird-support] Firebird v1.5.3 on Windows Server 2012

2013-12-06 Thread Konstantin Khomoutov
On Fri, 6 Dec 2013 08:33:25 -0600
"Softtech Support"  wrote:

> Can anyone tell be if Firebird v 1.5.3 will install and run
> effectively on Windows Server 2012?
> 
> It is currently being ran on a Windows 2003 Server and they are
> wanting to upgrade to a new server and I just wanted to see if there
> would be any issues.
> 
> Thanks to any who can shed some light.

Versions of Firebird below 2.5 are discontinued, so is there really any
reason to ask?  I mean, if it breaks those "they" will have to hold both
pieces.  So I'd they they should better look at upgrading their app to
support 2.5 (extensive release notes with possible compatibility
issues are available for both 2.0 and 2.5 series).


Re: [firebird-support] Firebird v1.5.3 on Windows Server 2012

2013-12-08 Thread Konstantin Khomoutov
On Fri, 6 Dec 2013 11:12:41 -0500
Ann Harrison  wrote:

> > I do not have time to upgrade to V2.0 or v2.5 before the new server
> > would be in.  I fully intend to when time permits.  Thus, the
> > reason I'm asking if it could be done to allow them to continue
> > while I do the conversion.
> I guess what Konstantin was saying is "'Unsupported' means that
> version isn't tested on
> new operating system versions."

No, I mean that if the OP discovers FB 1.5 doesn't work on Windows 2012,
the best he will be able to possibly do is to fetch its source code and
try to fix the problem himself, or try to pay some of the FB developers
to do that.  Unsupported version means that bugs in it are not fixed
because the codebase has moved on, and the human resources are limited
(and are better spent elsewhere).

Of course, there's always a possibility to create a virtualized Windows
XP instance on that server, and install FB 1.5 on it.  Windows XP will
be EOL'ed this year as well, but if one is about to mess with
fossilized software anyway, the overall situation would not be too
much worse to deal with. ;-)