FB4 from FB25 migration admin role issue

16 views
Skip to first unread message

Hugo Larson

unread,
Nov 2, 2022, 12:48:49 PM11/2/22
to Firebird-support
Hello,

I create a user (FB4) with isql
SQL> CREATE USER newuser PASSWORD '123456' grant admin role;
SQL> GRANT RDB$ADMIN TO newuser;

Now I backup a FB25 a database and restore it with FB4.

CONNECT DB.FDB USER 'newuser' password '123456' role 'rdb@admin';

When connection with user "newuser" to the converted db i get 

Statement failed, SQLSTATE = 28000
no permission for SELECT access to TABLE EMPLOYEE 
-Effective user is NEWUSER

When connecting to example db EMPLOYEE.FDB that comes with FB40 newuser have access to the tables.

Is something lost during conversion from FB25?

Thanks,
Hugo. 



Dimitry Sibiryakov

unread,
Nov 2, 2022, 12:52:00 PM11/2/22
to firebird...@googlegroups.com
'Hugo Larson' via firebird-support wrote 02.11.2022 17:48:
> SQL> GRANT RDB$ADMIN TO newuser;
>
> Now I backup a FB25 a database and restore it with FB4.
>
> CONNECT DB.FDB USER 'newuser' password '123456' role 'rdb@admin';

There is a definite difference between "RDB$ADMIN" and "RDB@ADMIN".

--
WBR, SD.

Mark Rotteveel

unread,
Nov 2, 2022, 12:58:04 PM11/2/22
to firebird...@googlegroups.com
On 02-11-2022 17:48, 'Hugo Larson' via firebird-support wrote:
> I create a user (FB4) with isql
> SQL> CREATE USER newuser PASSWORD '123456' grant admin role;
> SQL> GRANT RDB$ADMIN TO newuser;
>
> Now I backup a FB25 a database and restore it with FB4.
>
> CONNECT DB.FDB USER 'newuser' password '123456' role 'rdb@admin';

1) You specified the role rdb@admin, not rdb$admin (though I guess this
is a typo in your question)
2) The RDB$ADMIN role is *per database*

Following your own description, you
1) With FB 4.0, created a user with RDB$ADMIN in the security database,
2) granted that user RDB$ADMIN in whichever database you were connected
to at that time,
and then you
3) restored a different database from 2.5 to 4.0

It sounds like the database you just restored in step 3 doesn't have
that user with role RDB$ADMIN.

You need to explicitly grant this user RDB$ADMIN in that database.

Mark
--
Mark Rotteveel

Hugo Larson

unread,
Nov 2, 2022, 12:59:19 PM11/2/22
to firebird...@googlegroups.com
Sorry it's a type in the email.

role is 'RDB$ADMIN' when connection.

--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-support+unsub...@googlegroups.com.

Hugo Larson

unread,
Nov 2, 2022, 1:07:52 PM11/2/22
to firebird...@googlegroups.com
Of course.....

Many thanks guys! 

--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-support+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages