I need help bypassing Firebird 2.5 error. The error is
Your login SYSDBA is same as one of the SQL role name. Ask your
database administrator to set up a valid Firebird login.
[SQLState:28000, ISC error code:335544745]
So the old administrator who is long gone, might be dead for all I know, left us this database which we need to access, but it’s locked because of that role error. I need to connect to it, so I can export the data, but every tool that can export the data requires for me to connect to it and I can’t connect because of that error.
0
You need to connect with a different user than SYSDBA, and drop the role SYSDBA.
This can be done by:
-
The database owner.
Find the database owner with:
select distinct RDB$OWNER_NAME from RDB$RELATIONS where RDB$SYSTEM_FLAG = 1
-
The role owner.
Find the role owner with:
select RDB$OWNER_NAME from RDB$ROLES where RDB$ROLE_NAME = 'SYSDBA'
-
A user with the role
RDB$ADMIN
in that specific database if they specify that role when connecting.Find members of
RDB$ADMIN
with:select RDB$USER from RDB$USER_PRIVILEGES where RDB$PRIVILEGE = 'M' and RDB$RELATION_NAME = 'RDB$ADMIN'
Above queries can be executed by any user, even unprivileged users. If needed you can create a user — with SYSDBA — by connecting to the employee
example database, or any other database, and then connect to the database in question.
Find out the owner or a privileged user, create that user (or if it already exists, use or change its password), and then with any of those users, simply execute:
drop role SYSDBA;
(In case of RDB$ADMIN members, make sure to specify the role when connecting.)
If the owner of the database and role is SYSDBA, and there are no users with the RDB$ADMIN role, then you’ll be in a bit of a bind, and I think the only way to fix it then is to use a hex editor, find the right occurrence of SYSDBA, and change it (e.g. to SYSDBB; use the same number of characters!). It is important that you change the right occurrence of SYSDBA, because if you change the wrong occurrence, I think you might break other privileges of SYSDBA.
5