ORACLE导库脚本
数据库导库(10g)
set NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK
exp OLD_USER/password@IP/KYY file=D:/OLD_USER.dmp
imp NEW_USER/password@IP/KYY file=D:/OLD_USER.dmp fromuser=OLD_USER touser=NEW_USER
数据库导库(11g)
–查看创建的表空间目录
select * from dba_directories;
–导出
expdp OLD_USER/password@IP/KYY directory=TEST dumpfile=OLD_USER_DATA.dmp
D:EXP/OLD_USER_DATA.dmp
–按用户导入(可以将用户信息直接导入,即如果用户信息不存在的情况下也可以直接导入)
impdp NEW_USER/password@IP/KYY dumpfile=OLD_USER_DATA.dmp directory=TEST
数据库导库(11g)
select * from dba_directories;
expdp OLD_USER/password@IP/KYY directory=TEMP_EXP dumpfile=OLD_USER_DATA.dmp logfile=OLD_USER.log schemas=OLD_USER
impdp NEW_USER/password@IP/KYY directory=TEST dumpfile=OLD_USER_DATA.dmp logfile=NEW_USER.log schemas=NEW_USER