Subject Re: [firebird-support] How to set database page size in embedded mode?
Author Alec Lebedev
Sorry, Firebird 2.1.2 and Jaybird 2.1.6.

I am creating a brand new database. Where can I change the default page size?

Is there a tool that can connect to the database file created in embedded mode? (I am using Windows XP)

Thanks!




________________________________
From: Helen Borrie <helebor@...>
To: firebird-support@yahoogroups.com
Sent: Sunday, August 16, 2009 8:24:52 PM
Subject: Re: [firebird-support] How to set database page size in embedded mode?


At 12:00 PM 17/08/2009, you wrote:
>I am migrating my project to Firebird 2.1.6

2.1.2?

>which runs in an embedded mode. I receive the following exception when trying to create an index on a large table column, such as VARCHAR(2048) .
>
>org.firebirdsql. jdbc.FBSQLExcept ion: GDS Exception. 335544351. unsuccessful metadata update
>key size exceeds implementation restriction for index "IDX_1250473636589"
>
> From the documentation I understood that the maximum size of an index key is 1/4 of the database page size.

Correct - although the index key size will be more than the aggregated sizes of the key elements. A calculator is available at Ivan Prenosils site:
http://www.volny cz/iprenosil/ interbase/ ip_ib_indexcalcu lator.htm

>However, I cannot figure out how to set the page size when running in embedded mode?

The page size is an attribute of the database itself, not contingent on what model of database access you are using. It can't be changed arbitrarily from your app, since the page size affects the entire layout of the database. You can *change* it by backing up the database and then restoring with a new page size.

To find out what the page size is currently, you can do a gstat -h. Most of the GUI tools also report various header attributes, including page size. If you want to know how to read it with .net provider code, ask on the firebird-net- provider list.

./heLen




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