wsxxz 发表于 2018-9-23 06:35:53

Oracle exp/imp导出导入工具的使用

一. 导出工具 exp1. 它是操作系统下一个可执行的文件存放目录/ORACLE_HOME/bin  exp导出工具将数据库中数据备份压缩成一个二进制系统文件.可以在不同OS间迁移
  它有三种模式:
  a.用户模式: 导出用户所有对象以及对象中的数据;
  b.表模式: 导出用户所有表或者指定的表;
  c.整个数据库: 导出数据库中所有对象。
  2. 导出工具exp交互式命令行方式的使用的例子
  $exp test/test123@appdb

  Enter array fetch buffer>  Export file: expdat.dmp > m.dmp生成导出的文件名
  (1)E(ntire database), (2)U(sers), or (3)T(ables): (2)U > 3
  Export table data (yes/no): yes > 回车
  Compress extents (yes/no): yes > 回车
  Export done in ZHS16GBK character set and ZHS16GBK NCHAR character set
  About to export specified tables via Conventional Path ...
  Table(T) or Partition(T:P) to be exported: (RETURN to quit) > cmamenu要导出的表名
  . . exporting table                        CMAMENU       4336 rows exported
  Table(T) or Partition(T:P) to be exported: (RETURN to quit) >要导出的表名n
  Table(T) or Partition(T:P) to be exported: (RETURN to quit) > 回车
  Export terminated successfully without warnings.
  3. 导出工具exp非交互式命令行方式的例子
  $exp scott/tiger tables=(emp,dept) file=/directory/scott.dmp grants=y
  说明:把scott用户里两个表emp,dept导出到文件/directory/scott.dmp
  $exp scott/tiger tables=emp query=\"where job=\'salesman\' and sal\
页: [1]
查看完整版本: Oracle exp/imp导出导入工具的使用