您的位置:首页 > 其它

关于创建用户的小记

2012-03-20 20:45 183 查看
 
只有DBA用户才可以创建用户

举一个创建一般用户的基本选项:

create user user_name

identified by  password

default tablespace tablespace_name

temporary teblespace temp_tablespace_name

quota 100M on tablespace_name

quota 50M on temp_tablespace_name

password expire

最后一行意义为第一次登陆就得修改密码。另外注意在做临时表空间限额的时候不能在默认的临时表空间做,只能是自定义的临时表空间。

检查刚才创建用户的情况(dba_users)

select  username,default_tablespace,temporary_tablespace,created

from dba_users

where username='USER_NAME'

修改用户在表空间上的配额

alter  user  user_name

quota 20M on tablespace_name

如果取消在某个表空间的限额就quota  0  on tablespace_name ;但是如果该用户已经在此表空间上使用了一定的空间,那么原来的空间将继续使用;

删除某个用户

drop  user  user_name [CASCADE]

 

查看概要文件: select  * from  dba_profiles ;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  user
相关文章推荐