1.导入语句
(1)全导入:imp 用户名/密码@实例名 full=y file=数据库备份文件路径 ignore=y;
(2)单表导入:imp username/password@ip:port/servername file="E:\dmppath.dmp" tables=(emp) ignore=y;
(3)只导入表结构:imp username/password@ip:port/servername file="E:\dmppath.dmp" fromuser=from_username touser=to_username rows=n;
(4)只导入数据:imp username/password@ip:port/servername file="E:\dmppath.dmp" fromuser=c##from_username touser=to_username statistics=none ignore=y;
(5)更改表空间和用户导入:impdp username/password@ip:port/servername directory=DATA_DIR dumpfile=example.DMP REMAP_SCHEMA=olduser:newuser remap_tablespace=oldtablespace:newtablespace,EXAMPLE_TEMP:newtablespace_temp
2.备份语句
exp username/password@ip:port/servername file="备份文件的路径" full=y ignore=y;