Creating a database as a non-privileged user
In Firebird 5, if you try to create a database other than in embedded mode as someone who is not a Firebird admin (i.e. SYSDBA
or an account with equal rights), you may be in for a surprise:
SQL>create database 'xnet://D:\data\mydb.fdb' user 'john' password 'lennon';[chevron circle left]
Statement failed, SQLSTATE = 28000
no permission for CREATE access to DATABASE D:\DATA\MYDB.FDB
Non-admin users must explicitly be granted the right to create databases by a Firebird admin:
SQL>grant create database to user john;[chevron circle left]
After that, they can create databases.
Notice that with a serverless connection, i.e. without specifying a host name or protocol before the database name (and Engine13
enabled!), Firebird won’t deny any CREATE DATABASE
statement.It will only fail if the client process doesn’t have sufficient rights in the directory where the database is to be created.