Subject Re: [Firebird-Java] Xythos server Firebird install failing: unsuccessfulmetadataupdate GDS exception
Author Helen Borrie
David Brown had written:

>> Hello Roman, thanks for the speedy and informative reply. That worked. Now, the server install I'm trying to connect to firebird complains that the newly created DB has been created in the so-called Global Schema. And, that it should be created in it's own database schema (verbatim). At: the reference says: CREATE {DATABASE | SCHEMA} so is a DATABASE the same as a SCHEMA? How to make this installer happy with firebird? Please advise, David

At 06:08 30/08/2008, Roman Rokytskyy wrote:

> Well... that question I cannot answer. In Firebird exists only one
>schema (what they call "Global Schema"). Talk to Xythos, maybe they have
>good idea how to fool the installer?

Amen to that. If the product doesn't have a way to accept an existing database I'd be very surprised.

You are dealing with (at least) four distinct components here, apparently in all cases as a newbie.
-- Firebird, which is a database management system with its own rules and regulations, albeit pretty standard throughout. You need to use the firebird-support list for questions related to your metadata problems (and CREATE SCHEMA and CREATE DATABASE are both valid and identical in Firebird)

-- Jaybird, which is a native interface between the Fb server and your application layers, including Xythos server. In architectural terms, Jaybird is a "client layer". This list is the right one to ask about the implementation details of Jaybird, especially as it contains a large number of workarounds to push the Firebird client API into the JDBC model. Hence, Jaybird-related questions will be off-topic in the other forums.

-- Xythos server, which fits into the layering *somewhere*. So far it's impossible to tell where Xythos lives in your architecture...A Xythos forum should be able to explain the complexities of the Xythos layering how this complexity is distributed. In turn, that should get you on track as to what happens where and in what order

-- possibly other layers, such as scripts in browser code


-- Client application, written by you in Java

A "GDS exception" is an exception returned to the Jaybird driver layer by the database engine. There is a complete list of these at the Firebird website - you will find the lists for the various Fb versions in the Doc Index.

If the Xythos installer is throwing DDL errors that are not appropriate to Firebird, or is passing DDL that is invalid for Firebird, then one has to suspect that either you have missed a setting to make the installer understand that the database server is Firebird; or the product does not support Firebird; or it supports some older version of Firebird...

As for the metadata rules for Firebird, these are documented (scour the Documentation Index at the Firebird website).

-- In Fb 2.x, the maximum index size is a quarter of the page size. The default page size is 4 Kb and you cannot set it by configuration. It is also the minimum page size for a Fb 2.x database (on-disk structure 11 and above). You must *create* the database to have the page size you need. Grab the IB6 beta "Language Reference" to get the correct syntax.

-- In Fb 1.5 and below, the max size of an index is 252 bytes

-- note BYTES not characters. Some character sets (including Unicode) are divide the max index size by the number of bytes in the widest character in a MBCS to get closer to the real maximum. Indexes, whether MBCS or SBCS, also often have COLLATIONs associated with them, which consume sometimes large numbers of additional bytes. Multi-key indexes eat some more bytes. Ivan Prenosil has an online calculator to help you determine the maximum size of an index:

-- in database design terms, you need to be quite clear about why you might *need* huge indexes. This isn't a Jaybird matter, so inquire about it in firebird-support. It's really very important.

-- You can *recreate* a database by backing it up with gbak -b (read documentation!) and restoring it with gbak -c, under a new name initially. In the gbak -c command you can specify a page size parameter (the switch is "-page_size"). Again, this isn't a Jaybird matter. Documentation for gbak is in the IB6 Operations Guide and you can ask about it in firebird-support [or buy a copy of the The Firebird Book and the supplement! ;-) ]