用户名: USERNAME
创建用户create user USERNAME identified by PASSWORD;
建directorycreate or replace directory test_dir as '/home/oracle/test_dir';
grant read, write on directory test_dir to USERNAME;
这是在linux服务器上,请确保有/home/oracle/test_dir文件夹,并且有权限
创建表空间select name from v$tempfile;
create temporary tablespace TEST_TMP tempfile '/oracle/app/oradata/CRM/TEST_TMP.bdf' size 100m reuse autoextend on next 20m maxsize unlimited;
select name from v$datafile;
create tablespace TEST_1 datafile '/oracle/app/oradata/CRM/TEST_1.dbf' size 100M reuse autoextend on next 40M maxsize unlimited default storage(initial 128k next 128k minextents 2 maxextents unlimited);
create tablespace INDEX_TEST datafile '/oracle/app/oradata/CRM/INDEX_TEST.dbf' size 100M reuse autoextend on next 40M maxsize unlimited default storage(initial 128k next 128k minextents 2 maxextents unlimited);
''里的路径是根据select的结果查询到的,可能跟我的不一样,请注意
赋予权限alter user USERNAME default tablespace TEST_1;
grant dba to USERNAME;
grant connect,resource to USERNAME;
grant select any table to USERNAME;
grant delete any table to USERNAME;
grant update any table to USERNAME;
grant insert any table to USERNAME;
导入命令impdp USERNAME/PASSWORD DIRECTORY=test_dir CONTENT=ALL DUMPFILE=your.dmp logfile=your.log remap_schema=原来的用户名:USERNAME