Subject Re: [firebird-support] Multifile Firebird Database
Author Milan Tomeš - Position
Dne 19.01.2010 20:07, D K napsal(a):
> Hello,
> I would like to create a multifile firebird database.I found how to do
> that by,
> CREATE DATABASE “c:\test\test.fdb”
> USER 'sysdba' PASSWORD 'masterkey'
> PAGE_SIZE 8192
> FILE “c:\test\test.fd1” LENGTH 10000
> FILE “c:\test\test.fd2”;

That's correct

> 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,
> (TABLE_2_ID smallint not null);

And this is a big misunderstanding. Multi-file database is eg. for file
systems that doesn't support files longer than 4GB or for some other
reasons. You cannot choose where the table is located. Declaring
EXTERNAL FILE in CREATE TABLE syntax is just for declaring tables that
aren't stored in database file but somewhere else. Structure of that
file differs from structure of database file and there are some
limitations when you're using external table.

> 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

That's ok because file TEST.FD1 is already in use by database.

> Because EXTERNAL FILE 'filename' will be opened read-only
> Can we specify which table should go in which file in a multifile
> firebird database with all features?


> Please help me with this.
> Thanks
> DK


Milan Tomes

[Non-text portions of this message have been removed]