标签:wrap his view audit each acl ext 影响 nec
[oracle@crl ~]$ rlwrap sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue May 16 14:59:27 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create table z2 as select 1 as a from dual;
Table created.
SQL> grant select on z2 to dwetl;
Grant succeeded.
SQL>
[oracle@crl ~]$ rlwrap sqlplus ‘dwetl/"pwd2017"‘@DB1
SQL*Plus: Release 11.2.0.4.0 Production on Tue May 16 14:59:01 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from sys.z2;
A
----------
1
SQL>
[oracle@crl ~]$ rlwrap sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue May 16 14:59:27 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> drop table sys.z2;
Table dropped.
SQL> create table z2 as select 1 as a from dual;
Table created.
SQL>
SQL> select * from sys.z2;
A
----------
1
SQL>
[oracle@crl ~]$ rlwrap sqlplus ‘dwetl/"pwd2017"‘@DB1
SQL*Plus: Release 11.2.0.4.0 Production on Tue May 16 15:03:10 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from sys.z2;
select * from sys.z2
*
ERROR at line 1:
ORA-00942: table or view does not exist
SQL>
[oracle@crl ~]$ rlwrap sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue May 16 15:14:16 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> grant select on z2 to dwetl;
Grant succeeded.
SQL>
[oracle@crl ~]$ rlwrap sqlplus ‘dwetl/"pwd2017"‘@DB1
SQL*Plus: Release 11.2.0.4.0 Production on Tue May 16 15:14:57 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from sys.z2;
A
----------
1
SQL>
以sys登陆,执行truncate操作表z2,然后退出,以dwetl登陆查询表z2,发现可以执行select操作
SQL> truncate table z2;
Table truncated.
SQL> exit
ERROR:
ORA-04088: error during execution of trigger ‘TIMDBA.TRIG_LOGOFF_AUDIT‘
ORA-01403: no data found
ORA-06512: at line 5
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options (with complications)
[oracle@crl ~]$ rlwrap sqlplus ‘dwetl/"pwd2017"‘@DB1
SQL*Plus: Release 11.2.0.4.0 Production on Tue May 16 15:18:08 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from sys.z2;
no rows selected
SQL>
以上测试实验结论标识:
(1):当表被drop掉后,别的用户对这个表的操作权限失效了,请记得重新grant下权限,不然另外的用户就无法对表进行操作;
(2):当表被truncate之后,别的用户对这张表的操作权限依然有效。
Oracle drop table 和 truncate table对grant授权的影响
标签:wrap his view audit each acl ext 影响 nec
原文地址:http://blog.csdn.net/mchdba/article/details/72292378