Subject | Re: running firebird without installing it |
---|---|
Author | Adam |
Post date | 2006-08-06T07:02:52Z |
> Adam,First things first, review this article to see why you should avoid
>
> - Why i cant just copy the GDB file ?
using the .gdb extension under windows:
http://www.fbtalk.net/viewtopic.php?id=204
I will adjust your question then answer it:
- Why i cant just copy the FDB file ?
The FDB file(s) make up the database. They contain blocks of data
(called pages), but the data is stored according to the architecture
and endian of the database server. They contain built indices, garbage
that is waiting to be collected, and free pages that were formerly
occupied by old record versions. This bloats the size of the FDB file
well beyond what it needs to be. Another problem is that the FDB is a
living file when the database server is running. You can not simply
take a file copy and expect it to contain consistent data - in fact if
the database server decides to do anything to the file while the copy
is running, you will end up with a corrupted database in your
installer. Worse still, it may not show itself until you need to
restore a backup.
In short, it simply is a bad idea to copy a fdb file. Firebird can
generate a safe hot backup. This means that you can get a backup
without shutting down the database engine and without causing any locks.
As an example, I have a 250MB database that reduces to a pinch over
20MB if you take a backup then compress the backup file using 7zip.
> i mean, what other commands does gbak make toIt does not store the garbage, does not store deleted records, does
> firebird ?
not store uncommitted inserts or updates, does not store the index
nodes (just the fact an index must be generated on a given field). As
a result, the file is significantly smaller, even before compression.
gbak can be used to make a database transportable between
architectures and operating systems.
>IBExpert is a 3rd party program, Firebird does have aliases, but I do
> > > - do you mean that in my dev-machine i
> > > make a backup of the database and simple
> > > restore them into the new firebird servers ?
> >
> > Yes.
>
> - one last newbie-question: where do i have to
> set the alias of the database ?
> i ask this because i have just downloaded
> IBExpert Personal Edition, and there is
> a button called "copy alias info", and when i
> press on it, i get all the string containing
> the server ip, and the path of the GDB file.
>
not know whether an IBExpert Alias is another concept. Consult the
help document for IBExpert.
> - must i set the aliases on clients ?The idea of an alias (in Firebird, again don't know about IBE) is that
> - doesnt exists a network registered alias ?
>
> for example, in postgres you set the alias over
> the server and you dont have to do it on the
> clients... you just set the server ip/port and
> specify the alias name.
a client workstation should not really need to know the physical path
of a database file. What if you install 50 clients, buy a nice new
fast drive and want to then install the database file on that new
drive. If the clients are telling the server the database filename,
then you would have to reconfigure each workstation - not nice. There
are also security implications. Do you really want to tell each
workstation where it can get its hands on the physical database file
should someone do something silly like share the volume?
There is a file in the Firebird folder called aliases.conf. You can
edit this in notepad and define an alias for your database. Then
moving the database is quite simple, the network nodes will be no wiser.
> (you dont have to open an applet manualy toI am a bit confused about this statement. You don't need to install
> specify it on each client)
Firebird on the client machines. You only need a few dlls.
Adam