Subject Read only user
Author Gustavo
Hello:

I use FireBird 2, Delphi 5 and IBX.

I have an application wich uses many databases. Let´s suppose they are 10 and each database has 100 tables. I need to create a user wich has read only privileges to every table in every database.

The only way I know to do that is the following:

1. Create a user PEPE (using IB_SQL).
2. Connect to DATABASE1 using user SYSDBA
3. Execute GRANT SELECT ON TABLE001 TO PEPE
Execute GRANT SELECT ON TABLE002 TO PEPE
....
Execute GRANT SELECT ON TABLE100 TO PEPE
.............
Repeat steps 2 and 3 for the 10 databases.

Is there another way to do this without using 1000 SQL statements?

The problem is not only the number of SQL statements. In my application, the tables are created as needed. So, if I create the user now and execute every SQL statements for every table, perhaps tomorrow there will be a new table and the user PEPE won´t have access to it.

Another thing is that the user PEPE will be allowed to create a new table (for example executing CREATE TABLE NEWTABLE1(NAME VARCHAR(10)) and I don´t want this. I need that the only thing the user PEPE can do is to see (SELECT) every register in every table in every database.

Is this possible? How?

Thanks in advance.

Gustavo

[Non-text portions of this message have been removed]