2,在生产环境上导出用户数据 命令: exp \‘system/syspl as sysdba\‘ owner=PLAS buffer=10240000 FILE=/tmp/PLAS_20141113.DMP
执行过程: [oracle@localhost ~]$ exp \‘system/syspl as sysdba\‘ owner=PLAS buffer=10240000 FILE=/tmp/PLAS_20141113.DMP
Export: Release 11.2.0.1.0 - Production on Thu Nov 13 19:32:52 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, Oracle Label Security, OLAP, Data Mining, Oracle Database Vault and Real Application Testing option Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
About to export specified users ... . exporting pre-schema procedural objects and actions . exporting foreign function library names for user PLAS . exporting PUBLIC type synonyms . exporting private type synonyms . exporting object type definitions for user PLAS ............ . exporting synonyms . exporting views . exporting stored procedures . exporting operators . exporting referential integrity constraints . exporting triggers . exporting indextypes . exporting bitmap, functional and extensible indexes . exporting posttables actions . exporting materialized views . exporting snapshot logs . exporting job queues . exporting refresh groups and children . exporting dimensions . exporting post-schema procedural objects and actions . exporting statistics Export terminated successfully without warnings.‘
3,在测试环境导入数据 3.1,先备份测试环境的数据 命令: exp ‘sys/tesyspd@MP_EX as sysdba‘ owner=PLAS buffer=10240000 FILE="F:\TEST-PLAS_EX-1114.DMP" 执行过程: C:\Documents and Settings\Administrator>exp ‘sys/tesyspd@MP_EX as sysdba‘ owner=PLAS buffer=10240000 FILE="F:\TEST-PLAS_EX-1114.DMP"
Export: Release 10.2.0.1.0 - Production on 星期四 11月 13 20:25:26 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engin e options 已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集
导入报错,是因为 linux /unix 转义字符,需要在上面加上转义符号,比如\‘,修改成如下命令即可: exp \‘system/syspl as sysdba\‘ owner=PLAS buffer=10240000 FILE=/tmp/PLAS_20141113.DMP
4.2,Windows下导入报错
C:\Documents and Settings\Administrator> imp ‘sys/tesyspd@MP_TEST as sysdba‘ BUFFER=10240000 FILE=D:\oracle\imp\PLAS_20141113.DMP FROMUSER=PLAS TOUSER=PLAS
Import: Release 10.2.0.1.0 - Production on 星期四 11月 13 20:53:02 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engin e options