詳解Oracle創建用戶權限全過程(完成基本功能)

        本文將介紹的是通過創建一張表,進而實現Oracle創建用戶權限的過程。以下這些代碼主要也就是爲實現Oracle創建用戶權限而編寫,希望能對大家有所幫助。

注意:每條語語分開執行,結尾必須用分號;

  1. //創建空間  
    create tablespace test  datafile 'c:\oracle\oradata\orcl9\test.dbf' size 50M  default storage (initial 500K   Next 500K  minextents 1  maxextents unlimited  pctincrease 0);  
  1. //Oracle創建用戶權限//創建用戶  
    create user lxg identified by lxg default tablespace test;  
    //授權   
    grant resource,connect,dba to test;  
  1. //刪除表空間   
    drop tablespace "空間名" including contents and datafiles  
  1. 刪除用戶   
  2. drop user "lxg" cascade  
  1. 增加表空間  
  2. alter tablespace chinawater add datafile 'c:\oracle\oradata\orcl9\ADDCHINAWATER.dbf' size 200M   
  3.  
  4. 創建用戶  
  5. create user userName identified by password;   
  6. 創建用戶 userName, 密碼爲 password 
  7.  
  8. 給用戶授權  
  9. grant dba to lxg;--授予DBA權限    
  10. grant unlimited tablespace to lxg;--授予不限制的表空間      
  11. grant select any table to lxg;--授予查詢任何表
    grant
     select any dictionary to lxg;--授予 查詢 任何字典 
  12. grant dba to lxg;
    grant
     unlimited tablespace to lxg;    
  13. grant select any table to lxg;    
  14. grant select any dictionary to lxg;  

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章