sqlplus / as sysdba
sql> spool on;--开始出力spoollog
sql> spool C:\tablespace\temp.lst--指定spool log位置
sql> select * from all_users;--查看用户
USERNAME USER_ID CREATED
------------------------------ ---------- --------
AOAN 95 16-06-27
......
sql> drop useraoan cascade;--删除用户
sql> DROP TABLESPACE tablespace_name INCLUDING CONTENTS AND DATAFILES;--删除用户aoan的表空间
sql> create tablespace TABSP1 datafile'C:\tablespace\TABSP1.dbf' size 10240m autoextend on;--创建表空间
sql> create user aoan identified by hoan default tablespace TABSP1;--创建用户关联表空间TABSP1
sql> grant dba to aoan;
sql>connect aoan/hoan;
sql>select username,default_tablespace from user_users;--查看用户及关联的表空间。
USERNAME DEFAULT_TABLESPACE
------------------------------ ------------------------------
AOAN TABSP1
sql> spool off;--关闭spoollog
sql>exit;
C:\Users>cd C:\liu\localtest
C:\liu\localtest>imp aoan/aoan fromuser=AOAN touser=AOAN file=a230010d01f.dmp LOG=import_aoan.log ignore=y--导入dump