通过pl/sql创建Oracle新用户

创建用户和为用户分配权限

dba账号登录pl/sql developer

1、选择Users-->New,在打开的面板中输入般性用户信息

2、在Role privileges中,增加connect,resource两个Role(一般普通用户适用),如要dba角色则同时选择dba项。

3、在System privileges中,增加create any view和unlimited tablespace两个System privilege

 

Pl/sql代码   收藏代码
  1. -- Create the user   
  2. create user DM  
  3.   identified by ""  
  4.   default tablespace USERS  
  5.   temporary tablespace TEMP  
  6.   profile DEFAULT  
  7.   password expire;  
  8. -- Grant/Revoke role privileges   
  9. grant connect to DM;  
  10. grant dba to DM;  
  11. grant resource to DM;  
  12. -- Grant/Revoke system privileges   
  13. grant create any view to DM;  
  14. grant unlimited tablespace to DM; 

你可能感兴趣的:(oracle)