Oracle學習筆記 之 授權與修改用戶狀態

安裝數據庫的時候很多用戶是鎖定的,下面介紹一下如何解鎖用戶:

以sysdba登陸:(可以通過show user 查看當前用戶)

select username,account_status from dba_users    -- 查看所有用戶狀態 ;

alter  user hr account  unlock                   --解鎖用戶 

alter  user hr identified by 123456          --更換密碼    

alter  user hr account  lock                       --加鎖

             

create role plustrace           --創建角色

grant select   on  v_$table   to  plustrace          --賦權給角色

grant plustrace   to hr          --將角色權限賦給用戶

drop role  plustrace              --刪除角色


set   autotrace   on                --執行命令的時候啓動追蹤

發佈了34 篇原創文章 · 獲贊 16 · 訪問量 3萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章