Oracle 權限入門如何管理
以下的文章主要介紹的是Oracle 權限入門的具體操作方法,如果你是Oracle 權限入門實際應用方面的新手,你就可以通過以下的文章對Oracle 權限入門是如何正確使用的方法有一個更好的了解,以下就是文章的詳細內容的介紹。
1.啟動監(jiān)聽:lsnrctl start
2.啟動oracle實例:oradim -startup -sid orcl(oracle實例名)
3.用戶登錄到oracle數據庫:sqlplus username/password
4.dba(默認是sys)登錄到數據庫:sqlplus username/password as sysdba ,默認的dba賬號和密碼可以是 sqlplus / as sysdba
5.創(chuàng)建用戶:create user username identified by password(此時用戶已經創(chuàng)建,但是不能登錄到oracle數據庫)
6.授予用戶create session的權限:grant create session to username (此時用戶可以登錄數據庫,但是不能創(chuàng)建表)
7.授予用戶創(chuàng)建table的Oracle 權限: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.把Oracle 權限精確到列上面:grant 權限(columnName) on tableName to username ,注意查詢和刪除不能精確到列上面
【編輯推薦】