1.檢視所有使用者:
select * from dba_users;
select * from all_users;
select * from user_users;
2.檢視使用者或角色系統許可權(直接賦值給使用者或角色的系統許可權):
select * from dba_sys_privs;
select * from user_sys_privs;
3.檢視角色(只能檢視登陸使用者擁有的角色)所包含的許可權
sql>select * from role_sys_privs;
4.檢視使用者物件許可權:
select * from dba_tab_privs;
select * from all_tab_privs;
select * from user_tab_privs;
5.檢視所有角色:
select * from dba_roles;
6.檢視使用者或角色所擁有的角色:
select * from dba_role_privs;
select * from user_role_privs;
7.檢視哪些使用者有sysdba或sysoper系統許可權(查詢時需要相應許可權)
select * from v$pwfile_users
比如我要檢視使用者 wutong的擁有的許可權:
sql> select * from dba_sys_privs where grantee=『wutong』;
grantee privilege admin_option
wutong create trigger no
wutong unlimited tablespace no
比如我要檢視使用者 wutong的擁有的角色:
sql> select * from dba_role_privs where grantee=『wutong』;
grantee granted_role admin_option default_role
wutong dba no yes
檢視乙個使用者所有的許可權及角色
select privilege from dba_sys_privs where grantee=『wutong』
union
select privilege from dba_sys_privs where grantee in
(select granted_role from dba_role_privs where grantee=『wutong』 );
8.使用者操作
–建立使用者
create user 使用者 identified by pass1
default tablespace users
temporary tablespace temp;
–修改使用者配額
alter user 使用者 quota 20m on users;
–修改使用者密碼
alter user 使用者 identified by pass2;
–解鎖使用者
alter user 使用者 account unlock;
–刪除使用者
drop user 使用者 cascade;
–授權使用者
–grant sys_privi|role to user|role|public with admin option
grant connect to 使用者;
grant resource to 使用者;
grant dba to 使用者;
grant exp_full_database to 使用者;
grant imp_full_database to 使用者;
–**使用者許可權
–revoke sys_privi|role from user|role|public
revoke dba from使用者;
–物件授權
grant select,insert,delete,update on bbs.bbsdetail to 使用者;
–**物件授權
–revoke obj_privi|all on schema.object from user|role|public cascade constraints
revoke delete,update,insert,select on bbs.bbsdetail from 使用者;
oracle新手隨記10
1.unpivot注意點 select new col from select ename,job,to char sal as sal,null as c from emp unpivot include nulls new col for old col in ename,job,sal,c 1...
MySQL筆記隨記
引擎服務 查詢優化 不同的引擎支援不同的索引,如innodb就不支援hash索引 unique索引可以存在null值,且允許多個null 因為任意兩個null是無法進行比較的 全文檢索fulltext 全文搜尋,在不適用模板匹配操作的情況下進行單詞或短語的查詢。3種型別 索引參考意見缺省會把錶集中儲...
AE筆記隨記
新建 匯入素材 ctrl i 旋轉選中的素材 r 調整中心點定位工具 錨點 ctrl z撤銷 將素材拖到新建合成組 可以建立一樣大小的合成 攝像機 在合成組裡面要新建才有效果,並且調整角度不影響素材,只對攝像機有效,感覺像是圖層。鋼筆工具上的滑桿 通過ctrl可以只調整乙個來達到目的 時間軸 使用的...