728x90

인포믹스 권한 관련하여 일부 정리해봅니다.



AS grantor Clause

When you grant privileges, by default, you are the one who can revoke those privileges. The AS grantor clause lets you establish another user as the source of the privileges you are granting. When you use this clause, the login provided in the AS grantor clause replaces your login in the appropriate system catalog table. You can use this clause only if you have the DBA privilege on the database.

After you use this clause, only the specified grantor can REVOKE the effects of the current GRANT. Even a DBA cannot revoke a privilege unless that DBA is listed in the system catalog table as the source who granted the privilege.

The following example illustrates this situation. You are the DBA and you grant all privileges on the items table to user tom with the right to grant all privileges:
REVOKE ALL on items FROM PUBLIC;
GRANT ALL on items TO tom WITH GRANT OPTION;
The following example illustrates a different situation. You also grant Select and Update privileges to user jim, but you specify that the grant is made as user tom. (The records of the database server show that user tom is the grantor of the grant in the systabauth system catalog table, rather than you.)
GRANT SELECT, UPDATE on items TO jim AS tom;
Later, you decide to revoke privileges on the items table from user tom, so you issue the following statement:
REVOKE ALL on items FROM tom;
If instead, however, you try to revoke privileges from user jim with a similar statement, the database server returns an error, as the next example shows:
REVOKE SELECT, UPDATE on items FROM jim;
580: Cannot revoke permission.

You receive an error because the database server record shows the original grantor as user tom, and you cannot revoke the privilege. Although you are the DBA, you cannot revoke a privilege that another user granted.

The AS grantor clause is not valid in the GRANT DEFAULT ROLE statement.


http://publib.boulder.ibm.com/infocenter/idshelp/v115/topic/com.ibm.sqls.doc/ids_sqs_0123.htm

http://www-01.ibm.com/support/docview.wss?uid=swg1IC52362

728x90

+ Recent posts