On 09-03-2026 14:30, Nick Vaughan wrote:
> In a way this might be a follow-on from the topic " Looking for help
> migrating LibreOffice embedded HSQLDB to Firebird" as I'm trying to do
> the same thing.
> The environment is a single Windows 10 PC with a single Windows user
> (SALIS).
> In my case I've set up a Firebird 5 environment. The plan is to create
> users, databases, tables and insert all the data through isql. After
> that to connect LO Base 26.02 using JDBC (although I'm looking at
> (
https://help.libreoffice.org/latest/sq/text/sdatabase/
> dabawiz02firebird.html).
> Using SYSDBA I can create a user with "GRANT ADMIN ROLE" ("CREATE USER
> fbbatch PASSWORD 'fbbatch' FIRSTNAME 'Run' LASTNAME 'Batch' GRANT ADMIN
> ROLE ACTIVE TAGS (Interactive = 'No', LibreOffice = 'Yes', isql = 'Yes');").
Creating a user with GRANT ADMIN ROLE grants the user administrator
privileges in the security database.
You have not granted the administrator role in the desired database.
> With this user I can create a database
> CONNECT employee user 'fbbatch' password 'fbbatch';
> Server version:
> WI-V5.0.3.1683 Firebird 5.0
>
> create database 'C:/Users/salis/Documents/DBs/TestDB/teste.fdb'
> page_size 8192 SET NAMES 'NONE' DEFAULT CHARACTER SET NONE; COMMIT;
You don't need to be connected to a database to execute CREATE DATABASE.
In fact, doing so will just close the current connection and then run
CREATE DATABASE.
Given you haven't specified a username, nor a hostname, you're executing
this with embedded connection, using your OS username as the username.
Embedded connections do not perform authentication.
They have no permissions at all, as
1) The database was created with your OS username (presumably SALIS), so
fbbatch is not the owner
2) You have only granted fbbatch administrator privileges (role
RDB$ADMIN) in the security database, not in that new database
Either you need to ensure that database is created by the user fbbatch,
by specifying the USER clause of CREATE DATABASE, so it becomes the
owner, or you need to explicitly grant the RDB$ADMIN role in that
specific database.
Also, unless the role is granted as a default role, you must specify the
role explicitly when connecting (ROLE clause of CONNECT, or equivalent
connection property when using other means of connecting) for to user to
be able to use the privileges of a role.
Mark
--
Mark Rotteveel