imp 00401 oracle12,oracle-exp&imp-016

本文详细介绍了如何使用Oracle数据库的exp和imp命令在CMD模式下进行数据的导出和导入。首先,以sys用户身份执行导出操作,指定.dmp文件的保存路径和导出类型,然后选择要导出的表。接着,进行数据的导入,同样以sys用户登录,指定导入文件,并选择要导入的用户和表,最终成功导入数据。
摘要由CSDN通过智能技术生成

数据的导出和导入

做逻辑备份将数据以.dmp的文件导出导入

cmd模式下

C:\Documents and Settings\Administrator>exp

Export: Release 10.1.0.2.0 - Production on Thu Aug 25 17:52:13 2011

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

--一般以sys用户做导出的操作

Username: sys as sysdba

Password:

Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production

With the Partitioning, OLAP and Data Mining options

Enter array fetch buffer size: 4096 >

--输入导出文件存放路径,但必须以.dmp文件保存

Export file: EXPDAT.DMP > e:\dbf\myexp.dmp

--导出的类别

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

Export table data (yes/no): yes > y

Compress extents (yes/no): yes >

Export done in WE8ISO8859P15 character set and AL16UTF16 NCHAR character set

server uses ZHS16GBK character set (possible charset conversion)

About to export specified tables via Conventional Path ...

--导出的文件

Table(T) or Partition(T:P) to be exported: (RETURN to quit) > hr.mydepartments

Current user changed to HR

. . exporting table                  MYDEPARTMENTS         27 rows exported

Table(T) or Partition(T:P) to be exported: (RETURN to quit) >

Export terminated successfully without warnings.

导入数据

C:\Documents and Settings\Administrator>imp

Import: Release 10.1.0.2.0 - Production on Thu Aug 25 18:02:38 2011

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

Username: sys as sysdba

Password:

Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production

With the Partitioning, OLAP and Data Mining options

--导入的文件

Import file: EXPDAT.DMP > e:\dbf\myexp.dmp

Enter insert buffer size (minimum is 8192) 30720>

Export file created by EXPORT:V10.01.00 via conventional path

import done in WE8ISO8859P15 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 > y

Import grants (yes/no): yes >

Import table data (yes/no): yes >

Import entire export file (yes/no): no >

Username: hr

--导入到hr

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: t

Enter table(T) or partition(T:P) name or . if done: mydepartments

Enter table(T) or partition(T:P) name or . if done: .

. importing SYS's objects into SYS

. importing HR's objects into HR

. . importing table                "MYDEPARTMENTS"         27 rows imported

IMP-00033: Warning: Table "T" not found in export file

Import terminated successfully with warnings.

C:\Documents and Settings\Administrator>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值