Oracle 使用者管理(二)

來源:互聯網
上載者:User

1    給某人賦予"系統許可權"
    SQL> grant connect to aobama with admin option
    意思是將admin的串連資料庫許可權賦予“aobama”,並且"aobama"可以將這種許可權賦予其他人
    
2    關於賦予許可權收回的問題
    描述:A將查詢emp表的許可權賦予B,B又將該許可權賦予C。那麼當A把B的該許可權收回時,C的許可權是否也沒有了呢?
    答案:SQL> revoke select on emp from B;
          SQL> select * from A.emp;(使用C的賬戶登入)
          此時使用C的賬戶再查詢A的emp表資訊時,你會發現當B的查詢許可權被收回後,C的查詢許可權也沒有了
          
3    使用profile命令
    SQL> create profile Rule1 limit failed_login_attempts 3 password_lock_time 1;
    建立一個規則設定檔,該規則表示輸錯密碼的次數達到三次時賬戶鎖定1天
    SQL> alter user aobama profile Rule1;
    將上面的規則設定檔應用於使用者“aobama”。
    
4    給使用者解除鎖定
    SQL> alter user aobama account unlock;
    注意:必須是DBA許可權
    
5    使用終止口令指令
    SQL> create profile MyRules limit password_life_time 10 password_grace_time 3;
    建立一個規則設定檔,該檔案表示使用者的密碼生命週期為10天,寬限期為3天,超過這個時間則密碼失效
    alter user aobama profile MyRules;
    將該規則設定檔應用於使用者“aobama”
    
6    使用口令曆史
    SQL> create profile MyRules limit password_life_time 10 password_grace_time 3 password_reuse_time 7;
    建立一個規則設定檔,該檔案表示使用者的密碼的生命週期為10天,寬限期為3天,超過這個期限必須修改密碼,而且密碼不能與原來的相同。
    直到密碼到期起7天后才能使用原來使用過的密碼
    
7    刪除規則設定檔
    SQL> drop profile MyRules [cascade]
    刪除規則設定檔“MyRules”
    注意:刪除規則設定檔後,應用該設定檔的使用者都獲得釋放

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.