当前位置:Gxlcms > mysql > 用户

用户

时间:2021-07-01 10:21:17 帮助过:27人阅读

1 删除用户 drop user BILLINGDB cascade; 2 创建用户 CREATE USER BILLINGDB IDENTIFIED BY BILLINGDB DEFAULT TABLESPACE XXXX TEMPORARY TABLESPACE TEMPXXX; GRANT CONNECT, RESOURCE, DBA TO BILLINGDB; select 'grant select on '||owner||'.'||object

1 删除用户
drop user BILLINGDB cascade;

2 创建用户
CREATE USER BILLINGDB IDENTIFIED BY BILLINGDB DEFAULT TABLESPACE XXXX TEMPORARY TABLESPACE TEMPXXX;
GRANT CONNECT, RESOURCE, DBA TO BILLINGDB;
select 'grant select on '||owner||'.'||object_name|| ' to user'
from dba_objects
where object_type='TABLE' and owner='USERDB';

3 查看用户当前存在的会话session
select s.sid, s.serial# from v$session s where upper(username)=upper('billingdb');

4 修改用户密码
alter user cbpdb1 identified by cbpdb1;

人气教程排行