Subject Re: [Firebird-Java] Creating a database with a predefined page size
Author Mark Rotteveel
On 2017-07-06 11:08, 'Steffen Heil (Mailinglisten)'
lists@... [Firebird-Java] wrote:
> Hi
>
>
> I want to do the following in Java:
>
> CREATE DATABASE 'filename.fdb'
> USER 'SYSDBA' PASSWORD 'password'
> PAGE_SIZE 16384
> DEFAULT CHARACTER SET UTF8;
>
>
> I got so far:
>
> FBManager manager = new FBManager();
> manager.setDialect( 3 );
> manager.setServer("127.0.0.1" );
> manager.setPort( 3050 );
> manager.start();
> manager.createDatabase( "filename.fdb", "SYSDBA", "password" );
> manager.stop();
>
>
> So I created a database. Then I need to commit one of the following
> statements, depending on the firebird version:
>
> UPDATE RDB$DATABASE SET RDB$CHARACTER_SET_NAME='UTF8';
> ALTER DATABASE SET DEFAULT CHARACTER SET UTF8;
>
>
> But I did not find any way to set the PAGE_SIZE, which as I understand
> needs to be set during creation.
>
>
> How can I create a database with page size 16384 in jaybird?

FBManager.setPageSize(int), this was added in Jaybird 3, see
https://www.firebirdsql.org/file/documentation/drivers_documentation/java/3.0.1/docs/org/firebirdsql/management/FBManager.html#setPageSize-int-

Mark