1、表的导入导出。
exp system/manager@ORCL file="/opt/oracle/daochu.dmp" tables=(table1,table2)
在Linux系统下,请在/opt/oracle/product/bin目录下执行这些命令,因为在这个目录下存在imp/exp。
imp system/manager@ORCL file="/opt/oracle/daochu.dmp" tables=(table1,table2) ignore=y;
上面可能有点问题,因为有的表已经存在,然后它就报错,对该表就不进行导入。在后面加上 ignore=y 就可以了。
2、将数据库完全导出。
imp system/manager@ORCL buffer=64000 file="/opt/oracle/fullDB.dmp" ignore=y
exp system/manager@ORCL file="/opt/oracle/fullDB.dmp" full=y
3、使用exp/imp出现乱码的问题,解决方法。
--服务器
select userenv('language') from dual;
--设置更改:ALTER DATABASE character set "SIMPLIFIED CHINESE_CHINA.ZHS16GBK";
--客户端
--echo $NLS_LANG
--设置export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"