1
创建用户
create user userName identified by password;
创建用户 userName,密码为 password[@more@]2
给用户授权
grant dba to userName; --授予DBA权限
grant unlimited tablespace to userName;--授予不限制的表空间
grant select any table to userName; --授予查询任何表
grant select any dictionary to userName;--授予 查询 任何字典
grant select any table to CSRC;
GRANT DELETE ANY TABLE TO "CSRC";
GRANT INSERT ANY TABLE TO "CSRC";
GRANT UPDATE ANY TABLE TO "CSRC";
GRANT EXECUTE ANY PROCEDURE TO "CSRC";
创建用户
create user userName identified by password;
创建用户 userName,密码为 password[@more@]2
给用户授权
grant dba to userName; --授予DBA权限
grant unlimited tablespace to userName;--授予不限制的表空间
grant select any table to userName; --授予查询任何表
grant select any dictionary to userName;--授予 查询 任何字典
3
撤权:
revoke 权限 ... from 用户名 ;
revoke 权限 ... from 用户名 ;
4
数据库安装完成后,有两个系统级的用户 :
1) system 默认密码为 :manager
2) sys 默认密码为 :change_on_install
1) system 默认密码为 :manager
2) sys 默认密码为 :change_on_install
例子:
create user CSRC identified by CSRC default tablespace CSRC
temporary tablespace CSRCTEMP quota unlimited on CSRC;
temporary tablespace CSRCTEMP quota unlimited on CSRC;
grant connect, dba to CSRC;
grant select any table to CSRC;
GRANT DELETE ANY TABLE TO "CSRC";
GRANT INSERT ANY TABLE TO "CSRC";
GRANT UPDATE ANY TABLE TO "CSRC";
GRANT EXECUTE ANY PROCEDURE TO "CSRC";
创建用户后,就需要grant相应的权限.
如建表:grant create table to username
还有,对表空间时候权也需要grant
如:alter user username quota unlimited on tablespace name
如果直接grant resource ,则隐含的赋予了他表空间无限配额,很危险,一般使用quota
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/640706/viewspace-1047885/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/640706/viewspace-1047885/