oracle角色及用户

oracle角色及用户

ID:15423820

大小:26.50 KB

页数:4页

时间:2018-08-03

oracle角色及用户_第1页
oracle角色及用户_第2页
oracle角色及用户_第3页
oracle角色及用户_第4页
资源描述:

《oracle角色及用户》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、oracle角色及用户ORACLE用户数据库系统权限(DataBaseSystemPrivilege)数据库对象权限(DataBaseSystemPrivilege)Oracle内部用户Sys和System创建用户:createuseruser01identifiedbyu01;修改用户:alteruseruser01identifiedbyusr01;删除用户:dropuseruser01;删除用户与其对象:dropuseruser01CASCADE;用户授权连接:grantconnect,resourcetou

2、ser01;Oracle3种标准角色:1.ConnectRole(连接角色):临时用户,不需要建表的用户。2.ResourceRole(资源角色):更可靠和正式的数据库用户。3.DbaRole(数据库管理员角色):拥有所有的系统权限。操作:grant(授权)命令:grantconnect,resourcetouser01;revoke(撤销)命令:revokeconnect,resourcetouser01;创建角色:除了系统自带的3种标准角色外用户可以创建自己的role.createrolestudent;角色授

3、权:grantselectonCLASStostudent;注:拥有student角色的用户都具有对CLASS表的select权限。删除角色:droprolestudent;查看用户有哪些角色:selectgrant_rolefromdba_role_privswheregrantee='scott';查看用户有哪些权限:selectprivilegefromdba_sys_privswheregrantee='scott';selectprivilegefromdba_sys_privswheregrantee=

4、'CONNECT';默认用户:Sys:oralce中的超级用户,主要用来维护系统信息和管理实例。System:oracle中默认的系统管理员,拥有dba权限。通常管理oracle数据库的用户、权限和存储等。Scott:oracle数据库的一个示范账户,在数据库安装时创建。用户授权:grant权限[on对象名]to用户名[withgrantoption];grantselectonscott.emptouser01withgrantoption;grantcreatsessiontouser01;授予user01用户

5、查看emp表数据的权限1.验证user01对scott用户的emp表进行查询的权限。SQL>select*fromscott.emp;2.为用户user01授予scott用户的emp表的查询权限。SQL>connscott/scott@test;SQL>grantselectonscott.emptouser01;3.使用user01账户登录并查询scott用户的表emp信息。SQL>connuser01/u01@test;SQL>select*fromscott.emp;收回权限:revoke权限[on对象名]f

6、rom用户名SQL>revokeselectonscott.empfromuser01;修改用户密码:alteruser用户名identifiedby新密码;与权限相关的表:1.dba_sys_privs(所有系统权限)2.user_sys_privs(用户拥有的系统权限)3.user_col_privs(用户拥有的对象权限)常用的系统权限赋值语句:SQL>grantcreatesessiontouser01;SQL>grantcreatetabletouser01;SQL>grantunlimitedtables

7、pacetouser01;SQL>grantcreatesessiontopublic;对象权限的赋予与撤销语句:SQL>grantselectonmytabletouser01;SQL>grantallonmytabletouser01;SQL>revokeselectonmytablefromuser01;SQL>revokeallonmytablefromuser01;Oracle中除了能在表对象上赋予相应的权限,还能将权限控制到表的列上:SQL>grantupdate(name)onmytabletouse

8、r01;SQL>grantinsert(id)onmytabletouser01;口令管理使用profile管理用户口令profile是口令限制,资源管理的命令集合,当建立数据库时,Oracle会自动建立名词为default的profile。当建立用户没有指定profile选项,那Oroacle就会将default分配给用户。关键字列表:SQL>create

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。