《用户权限角色》PPT课件.ppt

上传人:小飞机 文档编号:5554216 上传时间:2023-07-20 格式:PPT 页数:14 大小:367.50KB
返回 下载 相关 举报
《用户权限角色》PPT课件.ppt_第1页
第1页 / 共14页
《用户权限角色》PPT课件.ppt_第2页
第2页 / 共14页
《用户权限角色》PPT课件.ppt_第3页
第3页 / 共14页
《用户权限角色》PPT课件.ppt_第4页
第4页 / 共14页
《用户权限角色》PPT课件.ppt_第5页
第5页 / 共14页
点击查看更多>>
资源描述

《《用户权限角色》PPT课件.ppt》由会员分享,可在线阅读,更多相关《《用户权限角色》PPT课件.ppt(14页珍藏版)》请在三一办公上搜索。

1、Controlling User Access(控制用户访问),Quality is not an act!Its a habit.,Objectives,After completing this lesson,you should be able to do the following:Create users(创建用户)Create roles to ease setup and maintenance of the security model(创建角色)Use the GRANT and REVOKE statements to grant and revoke object pri

2、vileges(授予和回收权限),Quality is not an act!Its a habit.,Controlling User Access(控制用户概述),Databaseadministrator,Users,Username and passwordPrivileges,Quality is not an act!Its a habit.,Creating Users(创建用户),The DBA creates users by using the CREATE USER statement.,CREATE USER scottIDENTIFIED BY tiger;User

3、created.,CREATE USER user IDENTIFIED BY password;,Quality is not an act!Its a habit.,User System Privileges(用户的系统权限),Once a user is created,the DBA can grant specific system privileges to a user.(DBA赋予用户系统权限)An application developer,for example,may have the following system privileges:(最常用的用户系统权限)CR

4、EATE SESSIONCREATE TABLECREATE SEQUENCECREATE VIEWCREATE PROCEDURE,GRANT privilege,privilege.TO user,user|role,PUBLIC.;,Quality is not an act!Its a habit.,Granting System Privileges(赋权限),The DBA can grant a user specific system privileges.,GRANT create session,create table,create sequence,create vie

5、wTO scott;Grant succeeded.,Quality is not an act!Its a habit.,What is a Role?(角色的概念),Allocating privilegeswithout a role,Allocating privilegeswith a role,Privileges,Users,Manager,Quality is not an act!Its a habit.,Creating and Granting Privileges to a Role(创建角色,赋予权限),CREATE ROLE manager;Role created

6、.,GRANT create table,create view TO manager;Grant succeeded.,GRANT manager TO DEHAAN,KOCHHAR;Grant succeeded.,Create a role(创建角色)Grant privileges to a role(赋予角色权限)Grant a role to users(赋予用户角色),Quality is not an act!Its a habit.,Object Privilege TableViewSequenceProcedureALTER DELETE EXECUTE INDEX IN

7、SERT REFERENCES SELECT UPDATE,Object Privileges(对象权限),Quality is not an act!Its a habit.,Granting Object Privileges(例子),Grant query privileges on the EMPLOYEES table.Grant privileges to update specific columns to users and roles.,GRANT selectON employeesTO sue,rich;Grant succeeded.,GRANT update(depa

8、rtment_name,location_id)ON departmentsTO scott,manager;Grant succeeded.,Quality is not an act!Its a habit.,Using the WITH GRANT OPTION and PUBLIC Keywords,Give a user authority to pass along privileges.(With grant option可传递权限)Allow all users on the system to query data from Alices DEPARTMENTS table.

9、(Public是所有用户),GRANT select,insertON departmentsTO scottWITH GRANT OPTION;Grant succeeded.,GRANT selectON alice.departmentsTO PUBLIC;Grant succeeded.,Quality is not an act!Its a habit.,How to Revoke Object Privileges(回收权限),You use the REVOKE statement to revoke privileges granted to other users.Privi

10、leges granted to others through the WITH GRANT OPTION clause are also revoked.(With grant option权限也同时回收),REVOKE privilege,privilege.|ALLON objectFROM user,user.|role|PUBLICCASCADE CONSTRAINTS;,Quality is not an act!Its a habit.,Revoking Object Privileges(回收权限例子),As user Alice,revoke the SELECT and I

11、NSERT privileges given to user Scott on the DEPARTMENTS table.,REVOKE select,insertON departmentsFROM scott;Revoke succeeded.,Quality is not an act!Its a habit.,Summary(小结),StatementActionCREATE USERCreates a user(usually performed by a DBA)GRANTGives other users privileges to access the your objectsCREATE ROLECreates a collection of privileges(usually performed by a DBA)ALTER USERChanges a users passwordREVOKERemoves privileges on an object fromusers,In this lesson,you should have learned about DCL statements that control access to the database and database objects:,

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号