一、创建日志文件
touch /home/oracle/log/Test.log
二、登录数据库
sqlplus / as sysdba
三、查询看一下是否已经存在
#查询所有用户
SELECT * FROM ALL_USERS;
#查询表空间
select name from v$tablespace;
#删除表空间
DROP TABLESPACE Test INCLUDING CONTENTS AND DATAFILES;
#删除用户
drop user Test cascade;
四、创建授权
#创建数据表空间
create tablespace Test datafile ‘/data/oracle/Test .dbf’ size 10M autoextend on;
#创建用户并指定表空间
create user Test identified by Test default tablespace Test ;
#为已存在用户指定表空间
alter user Test default tablespace Test ;
#给用户授予权限
grant dba to Test;
#退出数据库
exit;
五、导入
imp Test/Test@127.0.0.1:1521/orcl file=/home/oracle/Test.dmp log =/home/oracle/log/Test.log full=y;