Oracle 權限管理入門 |
發(fā)布時間: 2012/9/24 16:59:07 |
1.啟動監(jiān)聽:lsnrctl start 2.啟動Oracle實例:oradim -startup -sid orcl(oracle實例名) 3.用戶登錄到Oracle數(shù)據(jù)庫:sqlplus username/password 4.dba(默認是sys)登錄到數(shù)據(jù)庫:sqlplus username/password as sysdba ,默認的dba賬號和密碼可以是 sqlplus / as sysdba-
6.授予用戶create session的權限:grant create session to username (此時用戶可以登錄數(shù)據(jù)庫,但是不能創(chuàng)建表) 7.授予用戶創(chuàng)建table的權限:grant create table to username (此時的用戶理論上是可以創(chuàng)建表的,但是沒有權限使用表空間,所有依然不能成功創(chuàng)建表) 8.授予用戶無限制的使用表空間的權限:grant unlimited tablespace to username 9.撤銷權限:revoke 權限名 from username 10.查詢當前用戶所擁有的權限:select * from user_sys_privs 11.查詢當前用戶所擁有表的權限:select * from user_tab_privs 12.查詢當前用戶所擁有列的權限:select * from user_col_privs 13.對象權限的授權: grant 操作權限 on username.table to anotherusername(誰擁有這個對象權限就能授權給別人) 14.對象權限的賒銷: revoke 操作權限 on username.table from anotherusername 15.把某個權限(不分對象還是系統(tǒng)權限)授予給所有的用戶: grant 權限 to public 16.把權限精確到列上面:grant 權限(columnName) on tableName to username ,注意查詢和刪除不能精確到列上面
本文出自:億恩科技【mszdt.com】 |