oracle 用户:创建并指定表空间、授权,连接用户,删除用户,修改,解锁,加锁、

 

oracle用户解锁

alter user scott account unlock;

alter user scott account lock;

oracle用户修改密码

alter user scott identified by 123;

alter user scott identified by syj default tablespace student quota 1M ON system

SQL> passw
更改 SCOTT 的口令
旧口令:
新口令:
重新键入新口令:
口令已更改

 

 删除用户:例如创建了一个用户 A,要删除它可以这样做
connect sys/密码 as sysdba;
drop user A cascade;//--删除用户,不能删除已经连接的用户;cascade级联删除该用户的所有对象
注:授权还有:create any procedure,select any dictionary(登陆oem需要),select any table等.

--查看用户 

select * from dba_user;

--select * from all_users --查看系统所有用户

--select * from user_users --查看当前用户

显示当前连接用户:show user;

--创建用户,指定用户名,密码,表空间,临时表空间
create user xjgs2 identified by xjgs2 default tablespace xjgs2 temporary tablespace xjgs2_temp;

2.查看用户系统权限:
select * from user_sys_privs;

--显示已经被授予的全部对象特权,要查syj用户对象权限可以在后面加上 where grantee='SYJ'

--SELECT*FROM sys.dba_tab_privs where grantee='SYJ'
--给用户授予权限
grant connect,resource to xjgs2;

grant dba to xjgs2;

grant select ,insert(sno,cno),update on sscc to syj --为用户对象付特权

--GRANT CREATE USER,ALTER USER,DROP USER TO syj WITH ADMIN OPTION

--取消syj用户权限和对象特权

revoke CREATE USER,ALTER USER,DROP USER from syj ;

revoke dba from xjgs2;--撤销dba权限从xjgs2用户;

posted on 2013-03-19 19:13  世界之大追梦者  阅读(322)  评论(0编辑  收藏  举报

导航