Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle determines which object permissions are granted

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

There are several views related to object permissions, TAB for table permissions and COL for column permissions:

USER_TAB_PRIVS_MADE

USER_TAB_PRIVS_RECD

ALL_TAB_PRIVS_MADE

ALL_TAB_PRIVS_RECD

USER_COL_PRIVS_MADE

USER_COL_PRIVS_RECD

ALL_COL_PRIVS_MADE

ALL_COL_PRIVS_RECD

Because the above views are very similar, take the two views of USER_TAB_PRIVS_MADE,USER_TAB_PRIVS_RECD as an example.

The 1.USER_TAB_PRIVS_MADE view has the following structure, which simply represents the table permissions granted by the current user to other users.

Column

Class type

State clearly

Grantee

VARCHAR2 (30)

Users to whom this privilege is granted

Table_name

VARCHAR2 (30)

The name of the object operated on by the privilege granted

Column_name

VARCHAR2 (30)

The name of the object operated on by the privilege granted

Grantor

VARCHAR2 (30)

Authorized person

Privilege

VARCHAR2 (40)

Privileges granted to this object

Grantable

VARCHAR2 (3)

Whether the user granted the privilege can grant this privilege to other users. This value is equal to YES or NO

The 2.USER_TAB_PRIVS_RECD view has the following structure, which simply represents the table permissions granted to the current user by other users.

Column

Class type

State clearly

Owner

VARCHAR2 (30)

The user who owns the object

Table_name

VARCHAR2 (30)

The name of the object operated on by the privilege granted

Grantor

VARCHAR2 (30)

Authorized person

Privilege

VARCHAR2 (40)

Privileges granted to this object

Grantable

VARCHAR2 (3)

Whether the user granted the privilege can grant this privilege to other users. This value is equal to YES or NO

Hierarchy

VARCHAR2 (3)

Whether privileges constitute a hierarchical relationship. This value is equal to YES or NO

I think it is clear from the explanation of the above two views. Generally speaking, the view that ends with MADE indicates the permissions I grant to others, and RECD ends with the permissions granted to me by others.

-- query the granted object permissions (that is, a user opens object permissions for which tables and for which users)

Log in as test user, and test user has dba permission

SQL > SELECT * FROM user_tab_privs_made;-- find out which open object permissions test users have

TEST@orcl > SELECT * FROM user_tab_privs_made GRANTEE TABLE_NAME GRANTOR PRIVILEGE GRA HIE -JKWY INTERFACEUSERS TEST SELECT NO NO

Log in as a test1 user to see that the current user has only the right to query the dn table assigned to the tom user.

SQL > select grantee, owner, table_name, privilege from user_tab_privs

GRANTEE OWNER TABLE_NAME PRIVILEGE- -TOM TEST1 DN SELECT

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report