一、对表空间的操作
1、--查看表空间存放位置 select file_name from dba_data_files; 2、--创建表空间 创建表空间名称为tableName,表空间文件存放路径为:D:\APP\USER\ORADATA\ORCL\tableName.dbf,表空间的大小200m,自动增长,每次增长20m create tablespace tableName datafile 'D:\APP\USER\ORADATA\ORCL\tableName.dbf' size 200m autoextend on next 20m; 3、--删除表空间 drop tablespace tableName including contents and datafiles;
二、对用户的操作
--创建用户
create user style identified by style --创建用户名style默认密码style
default tablespace style --默认表空间style
temporary tablespace temp; --默认临时表空间temp
--删除用户
drop user style cascade;
三、权限
--给用户style授权 grant dba to style; --授予管理员权限 grant connect to style; --授予连接权限 grant resource to style; --授予开发人员权限 --删除权限 revoke connect to 用户名; --授权表的权限给别的用户 grant alter,delete,update,insert,select on 表名 to 用户名;