Subject Re: [firebird-support] Multifile Firebird Database
Author Norman Dunbar
Evening DK,

> Hello,
> I would like to create a multifile firebird database.I found how to do that by,
> ...

> I wanted that Table_1 reside in Primary file and Table_2 reside in First secondary File(test.fd1) and table_3 reside in secnd secondary file(test.fd2)..
> For this i tried,
> CREATE TABLE TABLE_2 EXTERNAL FILE 'C:\test\test.fd1'
> (TABLE_2_ID smallint not null);

As far as I know, Firebird doesn't allow you to specify which of the
files in a multi file database a table can be stored in. (Open to
corrections by the way!)

If you look at the file size for your first primary file and secondary,
you will find that they are not the sizes you think thay are, Firebird
creates the first file large enough to hold all the system metadata
tables, views, etc and then stops.

It is only when you create a table, for example, that the database file
extends a bit to hold the pages reserved for your table (and any indices
that you create for it) etc.

I'm almost certain (!) that as you add more data and more tables and so
on, that Firebird will then start to write to the second file when the
first one hits the size limit you have specified.

This is what I have seen in my own experiments.

> But when i tried to insert values to table2 i got error
> Statement failed, SQLCODE = -902
> Access to external file "C:\TEST\TEST.FD1" is denied by server administrator

What you have tried to do is use your Firebird database file as an
external table. You could have trashed it. I would advise getting hold
of the Firebird 2.x release notes and checking the what's new sections
for details on these external tables before you start to use them.

You should find plenty to read at http://www.firebirdsql.org

Cheers,
Norman.