工作上使用的Oracle重要sql手冊

來源:互聯網
上載者:User

1、查看目前使用者的預設資料表空間: SQL>select username,default_tablespace from user_users;

2、查看目前使用者的角色: SQL>select * from user_role_privs;

3、查看目前使用者的系統許可權和表級許可權: SQL>select * from user_sys_privs;  

SQL>select * from user_tab_privs;

4、顯示當前會話所具有的許可權: SQL>select * from session_privs;

5、顯示指定使用者所具有的系統許可權: SQL>select * from dba_sys_privs where grantee='GAME';

6、使用者擁有資料的大小:    SQL>select sum(bytes)/1024/1024 from user_extents;

7、查看所有使用者:    SQL>select username from dba_users;

8、給A使用者賦予執行B使用者下某對象的許可權:  grant execute on proc_name to B;

A使用者執行對象時使用命令: call B.proc_name(par..);

9給某使用者賦予角色: grant dba to hollyfee;

更多Oracle相關資訊見Oracle 專題頁面 http://www.bkjia.com/topicnews.aspx?tid=12

聯繫我們

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