User name XYZ could not be used for SQL role


You might get this error when trying to create a new role. Since roles and usernames share the same namespace, you cannot have a role with the same name as some user. The tricky part of this problem is that Firebird does not store usernames in databases, so it checks the privileges table to see if privileges for such user exists (and then concludes that such user does exist). If you are sure that such user does not exist anymore, revoke all his privileges before creating the role. To find out what are those privileges, you can query the RDB$USER_PRIVILEGES table:

SELECT *
FROM RDB$USER_PRIVILEGES
WHERE RDB$USER = 'new_role_name'



Do you find this FAQ incorrect or incomplete? Please e-mail us what needs to be changed. To ensure quality, each change is checked by our editors (and often tested on live Firebird databases), before it enters the main FAQ database. If you desire so, the changes will be credited to your name. To learn more, visit our add content page.



All contents are copyright © 2007-2024 FirebirdFAQ.org unless otherwise stated in the text.


Links   Firebird   News   FlameRobin   Powered by FB: Home Inventory   Euchre  
Add content   About  

Categories
 Newbies
 SQL
 Installation and setup
 Backup and restore
 Performance
 Security
 Connectivity and API
 HOWTOs
 Errors and error codes
 Miscellaneous