oracle对表空间进行操作

来源:互联网 发布:mac解压软件哪个好 编辑:程序博客网 时间:2024/05/17 23:09

1.更改数据文件大小

ALTER DATABASE  DATAFILE 'filename' resize  大小;


2.向表空间添加数据文件

alter  tablespace  表空间名  add datafile 'filename' size  10  autoextend on;


3.表空间只读

alter tablespace  表空间名  readonly;


4.删除表空间

drop  tablespace  表空间名  including  contents;


5.创建用户

create  user  用户名  identified  by  密码   default  tablespace  表空间名;


6.修改用户密码

alter  user   用户名  identified  by  密码;


7.修改用户表管理

alter  user  用户名  default   tablespace  表空间名;


8.锁定用户

alter  user  用户名  account  lock;


9.解锁用户

alter  user  用户名  account  unlock;