oracle DB exp & import
查看exp imp 命令的帮助
set nls_lang=simplified chinese_china.zhs16gbk
exp help=y
imp help=y
windows 下
set oracle_sid=oradb
上面这句其实可以不要,要的话,在数据库本机 下面可以用' / as sysdba'代替,
exp userid='sys/密码@oradb as sysdba' file=oradb1.dmp,oradb2.dmp,oradb3.dmp log=exp.log full=y rows=y filesize=5G feedback=1000 grants=y
linux 下,主要是单引号的处理
export oracle_sid=oradb
exp userid=\'sys/密码@oradb as sysdba\' file=oradb1.dmp,oradb2.dmp,oradb3.dmp log=exp.log full=y rows=y feedback=1000 grants=y
imp userid=\'sys/密码@oradb as sysdba\' file=oradb1.dmp,oradb2.dmp,oradb3.dmp log=imp.log full=y rows=y feedback=1000 grants=y
按表空间导出导入
exp userid='sys/密码@oradb as sysdba' tablespaces=ORADB_DATA file=oradb1.dmp,oradb2.dmp log=exp.log rows=y filesize=5G feedback=1000 grants=y
imp userid='sys/密码@oradb as sysdba' tablespaces=ORADB_DATA file=oradb1.dmp,oradb2.dmp log=exp.log rows=y filesize=5G feedback=1000 grants=y
按用户导出导入
exp userid='sys/密码@oradb as sysdba' owner=zhang file=oradb1.dmp filesize=1G feedback=1000 log=exp.log
imp userid='sys/密码@oradb as sysdba' fromuser =zhang touser =zhang file=oradb1.dmp log=imp1.log