Subject Re: [firebird-support] Re: granting persmissions
Author Milan Babuskov
si_carter_987654321 wrote:
> I was after a utility to grant read/write/execute etc on all objects in one hit rather than individually

Well, you could simply generate GRANTs by querying the system tables and
then copy/paste results back to sql editor.

For example, this grants all privileges on all tables and views to all
users:

select 'Grant all on '||x.RDB$RELATION_NAME||' to PUBLIC;'
from RDB$RELATIONS x
where not exists (
SELECT 1
FROM RDB$USER_PRIVILEGES a
where a.RDB$USER = 'PUBLIC'
and a.RDB$RELATION_NAME = x.RDB$RELATION_NAME
)
and (x.RDB$SYSTEM_FLAG is null or x.RDB$SYSTEM_FLAG = 0)

You can write a similar one for procedures.

Regards,

--
Milan Babuskov

==================================
The easiest way to import XML, CSV
and textual files into Firebird:
http://www.guacosoft.com/xmlwizard
==================================