//创建临时表空间
create temporary tablespace IDC_TEMP
tempfile 'E:\Program\Oracle11g\tablespace\IDC_TEMP.dbf'
size 50m
autoextend on
next 50m maxsize 2048m extent management local;
//创建数据表空间
create tablespace IDC_DATA
logging datafile 'E:\Program\Oracle11g\tablespace\IDC_DATA.dbf'
size 50m
autoextend on
next 50m maxsize 2048m
extent management local;
//删除表空间
drop tablespace IDC_DATA including contents and datafiles;
drop tablespace IDC_TEMP including contents and datafiles;
//创建用户并制定表空间
create user peng identified by peng
default tablespace IDC_DATA
temporary tablespace IDC_TEMP;
//删除用户
drop user peng cascade;
//给用户授予权限,没有create session 权限就不能登陆
grant connect, resource,create session,create table, dba to peng;
revoke unlimited tablespace from peng;
//撤销权限
revoke connect, resource,create session,create table from peng;
create user peng identified by peng default tablespace IDC_DATA temporary tablespace IDC_TEMP;
grant connect, resource,create session,create table, dba to peng;