Oracle 基礎知識之查看用戶,用戶權(quán)限,用戶表空間,用戶默認表空間 |
發(fā)布時間: 2012/9/13 17:14:59 |
1. 查看用戶和默認表空間的對應關(guān)系 www.linuxidc.com@ORCL> select username,default_tablespace from dba_users;
desc 表名
www.linuxidc.com@ORCL> select table_name from user_tables;
www.linuxidc.com@ORCL> select table_name from all_tables;
www.linuxidc.com@ORCL> select a.file_id "FileNo",a.tablespace_name "Tablespace_name", 2 a.bytes "Bytes",a.bytes-sum(nvl(b.bytes,0)) "Used", 3 sum(nvl(b.bytes,0)) "Free", 4 sum(nvl(b.bytes,0))/a.bytes*100 "%free" 5 from dba_data_files a, dba_free_space b 6 where a.file_id=b.file_id(+) 7 group by a.tablespace_name, a.file_id,a.bytes 8 order by a.tablespace_name;
www.linuxidc.com@ORCL> select * from dba_sys_privs; www.linuxidc.com@ORCL> select * from user_sys_privs;
www.linuxidc.com@ORCL> select * from dba_tab_privs;
www.linuxidc.com@ORCL> select * from dba_roles;
www.linuxidc.com@ORCL> select * from dba_role_privs;
www.linuxidc.com@ORCL> select * from role_sys_privs; www.linuxidc.com@ORCL> select * from role_tab_privs;
11. 查看所有系統(tǒng)權(quán)限 www.linuxidc.com@ORCL> select * from system_privilege_map; 12. 查看所有對象權(quán)限 www.linuxidc.com@ORCL> select * from table_privilege_map;
本文出自:億恩科技【mszdt.com】 |