expdp工具导出的步骤:
1、创建DIRECTORY
[oraarp@arpdb-n1 ~]$ mkdir -p /arp/oraarp/expbackup
SQL>create directory expbk as '/arp/oraarp/expbackup';
2、授权
SQL>grant read,write on directory expbk to arp;
--查看目录及权限
SQL>SELECT privilege, directory_name, DIRECTORY_PATH FROM user_tab_privs t, all_directories d
WHERE t.table_name(+) = d.directory_name ORDER BY 2, 1;
3、执行导出
SQL>expdp arp/arp schemas=arp directory=expbk dumpfile =arp20150415_1624.dmp logfile=arp20150415_1624.log;
impdp工具导入的步骤:
1.创建DIRECTORY
[oraarp@arpdb-n1 ~]$ mkdir -p /arp/oraarp/expbackup
SQL>create directory expbk as '/arp/oraarp/expbackup';
[root@localhost oraarp]# chown -R oraarp:oinstall expbackup/
2.授权
SQL>grant read,write on directory expbk to arp;
SQL>grant read,write on directory expbk to conow;(其他用户)
3.impdp工具导入
转换schema
[oraarp@arpdb-n1 ~]$impdp conow/conow directory=expbk dumpfile =arp20150415_1624.dmp logfile=arp20150415_1624.log remap_schema=arp:conow
直接导入
[oraarp@arpdb-n1 ~]$impdp arp/arp7101 DIRECTORY=expbk DUMPFILE=arp20150320.dmp logfile=arp20150320.log