把一个服务器的数据库导入到另一台服务器中

例如用户名mmc,密码mmc,数据库实例 MMC
 
1、服务器1 上执行exp mmc/mmc@localhost:1521/MMC file=导出的文件名.dmp
2、服务器2 上执行sftp oracle@服务器2的ip 输入密码
3、get 导出的文件名.dmp
4、bye 退出sftp
5、select 'drop table' || table_name';' from cat where table_type='TABLE'
6、复制查询结果,执行
7、exp mmc/mmc@localhost:1521/MMC file=导出的文件名.dmp

posted @ 2019-05-21 10:46  芒果有毒  阅读(1339)  评论(0编辑  收藏  举报