ian_scho
ian_scho

Reputation: 6056

Oracle pl/sql ORA-02204 error

With the following statement (attempting to grant a role permissions to use a view), I'm getting an error in Oracle:

grant execute on "PMC_TDT_V_APLICACION_EMAIL" to "PMC_TDT_ROL_USR";

Error:

SQL Error: ORA-02204: privilegios ALTER, INDEX y EXECUTE no permitidos para las vistas
02204. 00000 -  "ALTER, INDEX and EXECUTE not allowed for views"
*Cause:    An attempt was made to grant or revoke an invalid privilege on a view.
*Action:   Do not attempt to grant or revoke any of ALTER, INDEX, or
           EXECUTE privileges on views.

Upvotes: 2

Views: 3954

Answers (1)

ian_scho
ian_scho

Reputation: 6056

It's a case of RTFM I'm afraid:

grant select on "PMC_TDT_V_APLICACION_EMAIL" to "PMC_TDT_ROL_USR";

We can only 'execute' Functions/Procedures, Views are handled like tables.

Upvotes: 6

Related Questions