易截截图软件、单文件、免安装、纯绿色、仅160KB

oracle 用户管理

系统权限: 回收时不会产生级联回收
conn / as sysdba;
create user t1 identified by t1;
create user t2 identified by t2;
grant connect to t1,t2;
grant create table, create view to t1 with admin option;
conn t1/t1
grant create table to t2;
conn / as sysdba;
select * from dba_sys_privs where grantee in('T1', 'T2');
GRANTEE PRIVILEGE ADM
------------------------------ ---------------------------------------- ---
T1 CREATE TABLE YES
T1 CREATE VIEW YES
T2 CREATE TABLE NO
with admin option 可使被授予权限者有权转授其他人。
revoke create table, create view from t1;
select * from dba_sys_privs where grantee in('T1', 'T2');
GRANTEE PRIVILEGE ADM
------------------------------ ---------------------------------------- ---
T2 CREATE TABLE NO
不会级联删除已经授予的系统权限。
    
对象权限:级联回收所有权限
conn test/test
grant select on t to t1 with grant option;
conn t1/t1
grant select on test.t to t2;
conn test/test
select * from dba_tab_privs where grantee in('T1', 'T2');
GRANTEE OWNER TABLE_NAME GRANTOR PRIVILEGE
------------------------------ ------------------------------ ------------------------------ ------- --------------------------------
T2 TEST T T1 SELECT
T1 TEST T TEST SELECT
revoke select on t from t1;
select * from dba_tab_privs where grantee in('T1', 'T2');
SQL> select * from dba_tab_privs where grantee in('T1', 'T2');
  
级联删除已经授予的对象权限。
角色权限:级联回收所有权限
create role ttt;
grant create table, create user, create session to ttt with admin option;
grant select on test.t to ttt with grant option;
SQL> grant select on test.t to ttt with grant option;
grant select on test.t to ttt with grant option
ORA-01926:
 
无法使用with grant option选项给角色授权。
grant select on test.t to ttt;
create user d identified by d;
create user e identified by e;
grant ttt to d with admin option;
conn d/d
grant ttt to e;
select * from test.t;
SQL> select * from test.t;
conn / as


相关文档:

oracle 日常使用功能集

1. 查看数据的字符集
sqlplus> col parameter format a30
sqlplus> col value format a30
sqlplus> select * from nls_database_parameter
PARAMETER                      VALUE
------------------------------ --------------------
...
NLS_CH ......

ORACLE如何停止一个JOB

ORACLE如何停止一个JOB
1 相关表、视图
2 问题描述
为同事解决一个因为网络连接情况不佳时,执行一个超长时间的SQL插入操作。
既然网络状况不好,就选择了使用一次性使用JOB来完成该插入操作。在JOB执行一段时间后,我发现被插入表有些问题(惭愧,当时也没有先检查检查就做了)。准备停止JOB,因为在JOB运行情况下,我 ......

ORACLE常用命令

ORACLE常用命令
一、ORACLE的启动和关闭
1、在单机环境下
要想启动或关闭ORACLE系统必须首先切换到ORACLE用户,如下
su - oracle
a、启动ORACLE系统
oracle>svrmgrl
SVRMGR>connect internal
SVRMGR>startup
SVRMGR>quit
b、关闭ORACLE系统
oracle>svrmgrl
SVRMGR>connect internal
SVRMGR& ......

oracle练习(mldn视频课程)四

视图
创建新表:create table emp2 as select * from emp;
create view empv20 as select empno,ename,job,hiredate,deptno from emp where deptno=20 with check option;
语法:create or replace view 视图名称 as 子查询(修改之后的子查询)
替换视图(修改)
create or replace view empv20 as select empno,ename, ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号