Oracle簡單學習筆記

來源:互聯網
上載者:User

標籤:lte   資料庫   blog   修改密碼   學習   資料表空間   cas   nbsp   username   

  1. 建立使用者
    1. 1 CREATE USER username identified by password;//這是最簡單的使用者建立SQL語句.2 CREATE USER username identified by password default tablespace users temporary tablespace temp;//增加指定資料表空間的SQL語句.
  2. 分配使用者權限
    1. 1 grant 許可權/角色 to 使用者;//把許可權或角色的許可權 分配給 使用者.2 revoke 許可權/角色  from 使用者;//收回使用者的許可權.
      3 grant 許可權 on 使用者.對象 to 使用者;//把這個使用者的對象的操作許可權分配給另一個使用者.
  3. 查看使用者資訊
    1. select * from dba_users;//查看系統使用者表.select * from user_users;//查看普通使用者表.select * from user_sys_privs;//查詢目前使用者擁有的系統許可權.select * from user_role_privs;//查詢目前使用者擁有的角色.select * from user_tab_privs;//查詢目前使用者擁有的對象許可權.Oracle許可權的概念:操作資料庫的權利.Oracle角色的概念:一組許可權的集合.Oracle對象許可權的概念:操作其他使用者物件的許可權.
  4. 修改使用者資訊
    1. password password;//修改密碼限自身使用alter user username identified by password;//需要有相應許可權的使用者,才能去修改其他使用者的密碼.alter user 使用者 account lock;//鎖掉一個使用者使其無法登陸但保留該使用者的資料.alter user 使用者 account unlock;//解鎖一個使用者使其可以登陸正常使用.
  5. 刪除使用者
    1. 1 drop user 使用者;//刪除沒有資料對象的使用者.2 drop user 使用者 cascade;//刪除使用者及使用者的資料對象.

       

Oracle簡單學習筆記

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.