数据导入导出操作

A、 以oracle用户登录企业版DB服务器,执行以下命令导出ims用户对象及数据
oracle@linux:~> exp

Export: Release 11.1.0.7.0 - Production on Thu Feb 7 06:41:52 2013

Copyright (c) 1982, 2007, Oracle.  All rights reserved.
          
Username: sys/oracle as sysdba

Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing option
Enter array fetch buffer size: 4096 >    //回车

Export file: expdat.dmp > enterprise_ims.dmp    //回车

(1)E(ntire database), (2)U(sers), or (3)T(ables): (2)U >    //回车

Export grants (yes/no): yes >   //回车

Export table data (yes/no): yes >   //回车

Compress extents (yes/no): yes >   //回车

Export done in AL32UTF8 character set and AL16UTF16 NCHAR character set
server uses ZHS16GBK character set (possible charset conversion)  //此处不要回车,等待

About to export specified users ...
User to be exported: (RETURN to quit) > ims   //回车
User to be exported: (RETURN to quit) >   //回车

…..(自动导出过程)

Export terminated successfully with warnings.

导出完成


导入操作:

oracle@linux:~> imp

Import: Release 11.1.0.7.0 - Production on Thu Feb 7 07:02:19 2013

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

Username: sys/oracle as sysdba

Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing option

Import file: expdat.dmp > enterprise_ims.dmp   //回车

Enter insert buffer size (minimum is 8192) 30720>   //回车

Export file created by EXPORT:V11.01.00 via conventional path
import done in AL32UTF8 character set and AL16UTF16 NCHAR character set
import server uses ZHS16GBK character set (possible charset conversion)  //此处不要回车,等待
List contents of import file only (yes/no): no >  //回车

Ignore create error due to object existence (yes/no): no > yes    //回车

Import grants (yes/no): yes >  //回车

Import table data (yes/no): yes >  //回车

Import entire export file (yes/no): no >   //回车
Username:ims

Enter table(T) or partition(T:P) names. Null list means all tables for user
Enter table(T) or partition(T:P) name or . if done:  //回车

…(自动导入过程)

Import terminated successfully with warnings.

导入完成

猜你喜欢

转载自dq1216.iteye.com/blog/1772884