歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Oracle培訓教程,淘寶本科技術類培訓

Oracle培訓教程,淘寶本科技術類培訓

日期:2017/2/28 15:30:58   编辑:Linux教程

完裝前:1。serivce有個listener,若未啟動,剛不能使用pl/sql developer;2.給scott解鎖。

scott是當前用戶

1.建新用戶
create user xiaoming identified by m123;
但報錯,沒權限
2.轉用戶conn system/manager;
3.就可以了,但新建的xiaoming不能登錄的。要用sys授權限
4.權限共二種:系統權限,對像權限
系統權限:對數據庫使用,create table等等;
對像權限:用戶對其他用戶的數據對像的權限;(數據對像如table,view,trigger)
grant connect to xiaoming;便可登錄
幾個角色說明:
dba:最高的權限,重要
resource:在任何一個表空間建表
再加上一個connect

希望xiaoming可以去查emp表;
grant select on emp to xiaoming;[sys,system,emp自主soctt可執行]
對像權限select insert update delete all create index...

select * from SCOTT.EMP;[打他人的表要加前綴]

若要修改/插入/選擇
grant all on emp to xiaoming;
5.也可撒撒回來
6.授權的傳遞
grant select an emp to xiaoming with grant option;
grant select an emp to xiaohong;
7如果是系統權 system給小明授權,則小明可以把權限再傳遞
系統權限grant connect to xiaoming with admin option
回收的要連在一起的

Copyright © Linux教程網 All Rights Reserved