2014-07-08 09:35:27 +02:00
|
|
|
SQL Language Extension: GRANT/REVOKE permissions on DDL operations
|
|
|
|
|
|
|
|
Implements capability to manage permissions on DDL operations.
|
|
|
|
|
|
|
|
Author:
|
|
|
|
Red Soft Corporation, roman.simakov(at)red-soft.biz
|
|
|
|
|
|
|
|
Syntax is:
|
|
|
|
|
2014-07-18 03:52:24 +02:00
|
|
|
GRANT CREATE <OBJECT> TO [USER | ROLE] <user/role name> [WITH GRANT OPTION];
|
|
|
|
GRANT ALTER ANY <OBJECT> TO [USER | ROLE] <user/role name> [WITH GRANT OPTION];
|
|
|
|
GRANT DROP ANY <OBJECT> TO [USER | ROLE] <user/role name> [WITH GRANT OPTION];
|
2014-07-08 09:35:27 +02:00
|
|
|
|
2014-07-18 03:52:24 +02:00
|
|
|
REVOKE [GRANT OPTION FOR] CREATE <OBJECT> FROM [USER | ROLE] <user/role name>;
|
|
|
|
REVOKE [GRANT OPTION FOR] ALTER ANY <OBJECT> FROM [USER | ROLE] <user/role name>;
|
|
|
|
REVOKE [GRANT OPTION FOR] DROP ANY <OBJECT> FROM [USER | ROLE] <user/role name>;
|
2014-07-08 09:35:27 +02:00
|
|
|
|
|
|
|
Where <OBJECT> could be:
|
2014-09-02 18:55:14 +02:00
|
|
|
TABLE, VIEW, PROCEDURE, FUNCTION, PACKAGE, GENERATOR, SEQUENCE, DOMAIN,
|
|
|
|
EXCEPTION, ROLE, CHARACTER SET, COLLATION, FILTER
|
2014-07-08 09:35:27 +02:00
|
|
|
|
|
|
|
Description:
|
|
|
|
|
2014-09-02 18:55:14 +02:00
|
|
|
Makes it possible to grant and revoke privileges on DDL operations.
|
2014-07-08 09:35:27 +02:00
|
|
|
|
|
|
|
DDL operations for managing triggers and indices re-use table privileges.
|
|
|
|
|
|
|
|
Sample:
|
|
|
|
|
|
|
|
GRANT CREATE TABLE TO Joe;
|
2014-09-02 18:55:14 +02:00
|
|
|
GRANT ALTER ANY TABLE TO Joe;
|
2014-07-08 09:35:27 +02:00
|
|
|
REVOKE CREATE TABLE FROM Joe;
|
2014-09-02 18:55:14 +02:00
|
|
|
|
|
|
|
For database access special form is supported:
|
|
|
|
|
|
|
|
GRANT CREATE DATABASE TO [USER | ROLE] <user/role name>;
|
|
|
|
GRANT ALTER DATABASE TO [USER | ROLE] <user/role name> [WITH GRANT OPTION];
|
|
|
|
GRANT DROP DATABASE TO [USER | ROLE] <user/role name> [WITH GRANT OPTION];
|
|
|
|
|
|
|
|
REVOKE CREATE DATABASE FROM [USER | ROLE] <user/role name>;
|
|
|
|
REVOKE [GRANT OPTION FOR] ALTER DATABASE FROM [USER | ROLE] <user/role name>;
|
|
|
|
REVOKE [GRANT OPTION FOR] DROP DATABASE FROM [USER | ROLE] <user/role name>;
|