【Oracle】将单表数据导入导出

注意以下操作在dos窗口里进行,不是sqlplus。

【单表导出】

命令:

exp luna/1234@orcl file=c:\temp\123.dump tables=(test05);

其中luna是用户名,1234是密码,orcl是服务名,test05是表名

执行情况:

C:\WINDOWS\System32>exp luna/1234@orcl file=c:\temp\123.dump tables=(test05);

Export: Release 11.2.0.1.0 - Production on 星期二 3月 8 15:34:35 2022

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.


连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集

即将导出指定的表通过常规路径...
. . 正在导出表                          TEST05导出了      568728 行
EXP-00011: LUNA.; 不存在
导出成功终止, 但出现警告。

 

【数据导入】

注意要把目标表test05先删除。

命令:

imp luna/1234@orcl file=c:\temp\123.dump full=y

执行情况:

C:\WINDOWS\System32>imp luna/1234@orcl file=c:\temp\123.dump full=y

Import: Release 11.2.0.1.0 - Production on 星期二 3月 8 15:38:21 2022

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.


连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

经由常规路径由 EXPORT:V11.02.00 创建的导出文件
已经完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的导入
. 正在将 LUNA 的对象导入到 LUNA
. 正在将 LUNA 的对象导入到 LUNA
. . 正在导入表                        "TEST05"导入了      568728 行
成功终止导入, 没有出现警告。

 

END

posted @ 2022-03-08 15:45  逆火狂飙  阅读(511)  评论(3)    收藏  举报
生当作人杰 死亦为鬼雄 至今思项羽 不肯过江东