欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

用户

程序员文章站 2022-04-16 19:29:39
...

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;