远程导出所需要的Oracle数据库的数据:
需要先在tnsnames.ora里建立97readdb的选项,与建立dblink前的配置准备工作一样,不需要建立dblink,而且导出时用的是远程Oracle的账户和密码。
exp导出时保存到本地Oracle(或者Oracle客户端)所在的硬盘上。
远程导出:
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
exp scott/guantiger@97readdb owner=scott file=/data/rman_backup/expscott.dmp log=/data/rman_backup/logscott.log;
本地或者远程导入(更换表空间):
imp scott/guantiger file=/data/rman_backup/expscott.dmp log=/data/rman_backup/logscott02.log fromuser=scott touser=scott tablespaces=testtbs;
imp scott/guantiger@99sms file=/data/rman_backup/expscott.dmp log=/data/rman_backup/logscott02.log fromuser=scott touser=scott tablespaces=testtbs;