In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Let's learn how to manage database permissions and roles. I believe you will benefit a lot after reading it. The text is not very good. You want to know how to manage database permissions and roles.
The system permissions granted to the user SQL > grant create table,create sequence,create view to tpcc;Grant succeeded. Query the system permissions granted to users: SQL > col grantee for a20SQL > col privilege for a30SQL > col admin_option for a15SQL > select * from dba_sys_privs where grantee = 'TPCC' GRANTEE PRIVILEGE ADMIN_OPTION- TPCC CREATE TABLE NOTPCC UNLIMITED TABLESPACE NOTPCC CREATE VIEW NOTPCC ALTER SESSION NOTPCC CREATE SEQUENCE NO revokes the system permissions granted to the user SQL > revoke create sequence from tpcc Revoke succeeded.SQL > select * from dba_sys_privs where grantee = 'TPCC' GRANTEE PRIVILEGE ADMIN_OPTION- TPCC CREATE TABLE NOTPCC UNLIMITED TABLESPACE NOTPCC CREATE VIEW Object permissions granted to users by NOTPCC ALTER SESSION NO SQL > grant select on scott.emp to tpcc Grant succeeded. Query the object permissions granted to the user: SQL > col owner for a20SQL > col table_name for a20SQL > col grantee for a15SQL > col grantor for a15SQL > col privilege for a30SQL > select grantee,owner,table_name,grantor,privilege from dba_tab_privs where grantee = 'TPCC' GRANTEE OWNER TABLE_NAME GRANTOR PRIVILEGE-- -TPCC SYS DBMS_LOCK SYS EXECUTETPCC SCOTT EMP SCOTT SELECT revokes the object permissions granted to the user SQL > revoke select on scott.emp from tpcc Revoke succeeded.SQL > select grantee,owner,table_name,grantor,privilege from dba_tab_privs where grantee = 'TPCC' GRANTEE OWNER TABLE_NAME GRANTOR PRIVILEGE-- -TPCC SYS DBMS_LOCK SYS EXECUTE query database role SQL > col role for a30SQL > select * from dba_roles ROLE PASSWORD_REQUIRED AUTHENTICATION_TYPE---CONNECT NO NONERESOURCE NO NONEDBA NO NONESELECT_CATALOG_ROLE NO NONEEXECUTE_CATALOG_ROLE NO NONEDELETE_CATALOG_ROLE NO NONEEXP_FULL_DATABASE NO NONEIMP_FULL_DATABASE NO NONELOGSTDBY_ADMINISTRATOR NO NONEDBFS_ROLE NO NONEAQ_ADMINISTRATOR_ROLE NO NONE query permissions granted to roles SQL > select * from role_sys_privs where role in ('CONNECT' 'RESOURCE') ROLE PRIVILEGE ADMIN_OPTION-- RESOURCE CREATE SEQUENCE NORESOURCE CREATE TRIGGER NORESOURCE CREATE CLUSTER NORESOURCE CREATE PROCEDURE NORESOURCE CREATE TYPE NOCONNECT CREATE SESSION NORESOURCE CREATE OPERATOR NORESOURCE CREATE TABLE NORESOURCE CREATE INDEXTYPE NO query the roles granted to users SQL > col admin_option for a15SQL > col default_role for a15SQL > col granted_role for a30SQL > select * from dba_role_privs where grantee = 'TPCC' GRANTEE GRANTED_ROLE ADMIN_OPTION DEFAULT_ROLE- TPCC RESOURCE NO YESTPCC CONNECT NO YES queries the permissions obtained by users SQL > conn tpcc/tpccConnected.SQL > select * from session_privs PRIVILEGE--CREATE SESSIONALTER SESSIONUNLIMITED TABLESPACECREATE TABLECREATE CLUSTERCREATE VIEWCREATE SEQUENCECREATE PROCEDURECREATE TRIGGERCREATE TYPECREATE OPERATORPRIVILEGE--CREATE INDEXTYPE
After reading this article on how to manage database permissions and roles, many readers will want to know more about it. If you need more industry information, you can follow our industry information section.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.