imp 导入以及换用户报错

数据库导入操作:
SQL> create user user identified by passwd;
SQL> create tablespace user datafile '/data/oracle/oradata/orcl/user.dbf' size 10G;
//单引号

SQL> alter user user default tablespace user;
SQL> grant create session,create table,create view,create sequence,resource,connect,unlimited tablespace to user;
SQL> create directory daoru as '/data/oracle/oraclesetup';
SQL> grant read,write on directory daoru to tumi20190420;

impdp user/passwd directory=daoru dumpfile=daoru.dmp logfile=daoru.log

 

 

修改表空间大小

alter database datafile '/data/oracle/oradata/orcl/user.dbf' resize 20G; 

授权

GRANT IMP_FULL_DATABASE to user;

 

替换表和tablesspace:

impdp newuser/passwd directory=daoru dumpfile=newdaoru.dmp logfile=newdaoru.log remap_schema=newuser:olduser remap_tablespace=newuser:olduser

 

posted @ 2019-04-28 12:49  huakai201  阅读(756)  评论(0编辑  收藏  举报