无法删除用户
select username,sid,serial# from v$session;
alter system kill session'9,4';
drop user a cascade;//删除用户以及用户表空间下所有对象
drop tablespace CW01 including contents and datafiles;
离线数据文件
alter database datafile 'd:/datafile/cw01.dfb' offline drop;
创建表空间
create tablespace cw01 datafile 'D:\oradata\oradb\CW01.DBF' size 30000M autoextend on next 50M maxsize UNLIMITED;
create tablespace cw02 datafile 'D:\oradata\CW02.DBF' size 3000M autoextend on next 50M maxsize UNLIMITED;
为表空间增加数据文件
ALTER TABLESPACE cw02 ADD DATAFILE 'D:\oradata\CW0201.DBF' SIZE 30000M autoextend on next 50M maxsize UNLIMITED;
数据恢复:
-----数据泵恢复建立目录(此目录存放备份文件)----
create directory dire as 'D:\11数据备份';
GRANT READ,WRITE ON DIRECTORY dire TO zhang;
------恢复语句(以下例子的服务名是ORCL、备份文件名shuju.DMP,如不同,请修改)--------
impdp zhangsan/123@ORCL directory=zdire dumpfile=shuju.DMP logfile=shuju.txt;