oracle数据库表的导出与导入 笔记
2010-03-29 12:08
246 查看
导出篇
linux-t9ub:~ # su - oracle
loracle@linux-t9ub:~> ls
Desktop Documents afiedt.buf dmp expdat.dmp gx190906261212.dmp log oracle sh software
oracle@linux-t9ub:~> cd dmp
oracle@linux-t9ub:~/dmp> ls
gx090624.dmp gx0906260900.dmp gx090628.dmp gx090630.dmp gx090703.dmp gx090705.tar.gz gx090708.dmp gx70090619.dmp
gx090625.dmp gx090627.dmp gx090629.dmp gx090701.dmp gx090704.dmp gx090706.dmp gx090709.dmp sys090629.dmp
gx090626.dmp gx0906271400.dmp gx090629.tar.gz gx090702.dmp gx090705.dmp gx090707.dmp gx190906260035.dmp sys090706.dmp
oracle@linux-t9ub:~/dmp> pwd
/oracle/dmp
oracle@linux-t9ub:~/dmp> exp gx/gx file=expdat_jzwx.dmp tables=SJY_DAT_SN_JZWX_JZWX grants=y;
注释:导出所有表可用:exp gx/gx file=expdat_jzwx.dmp grants=y;
Export: Release 10.2.0.1.0 - Production on 星期五 7月 10 11:07:35 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集
即将导出指定的表通过常规路径…
. . 正在导出表 SJY_DAT_SN_JZWX_JZWX导出了 1240 行
成功终止导出, 没有出现警告。
oracle@linux-t9ub:~/dmp>
导入篇
[root@localhost ~]# su - oracle
-bash-3.00$ ls
CreateData.sh expdatgx_70_20090115.dmp flash_recovery_area
admin expdatgx_70_20090121.dmp gx_88_090526.log
afiedt.buf expdatgx_70_20090203.dmp insertdata.sql
arhiva expdatgx_70_20090210.dmp log
dmp expdatgx_70_20090211.dmp lost+found
expdatgx20081128.dmp expdatgx_70_200902111.dmp old
expdatgx20081202.dmp expdatgx_70_20090212.dmp oraInventory
expdatgx20081219.dmp expdatgx_70_20090223.dmp oracle
expdatgx_70_20081220.dmp expdatgx_70_20090228.dmp oradata
expdatgx_70_20090102.dmp expdatgx_70_20090301.dmp sh
expdatgx_70_200901021.dmp expdatgx_70_20090309.dmp sjy_create_tables.sql
expdatgx_70_20090105.dmp expdatgx_70_20090322.dmp
-bash-3.00$ cd dmp
-bash-3.00$ sqlplus gx/gx
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jul 10 11:24:44 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> drop table SJY_DAT_SN_JZWX_JZWX;
Table dropped.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
-bash-3.00$ imp gx/gx file=expdat_jzwx.dmp grants=y;
注:导入整个dmp文件需要加FULL=Y参数 还可以用fromuser参数指定要导入哪个用户下的表,touser指定导入到哪个用户表空间下面
Import: Release 10.2.0.1.0 - Production on Fri Jul 10 11:26:30 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export file created by EXPORT:V10.02.01 via conventional path
import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses ZHS16GBK character set (possible charset conversion)
export client uses ZHS16GBK character set (possible charset conversion)
. importing GX’s objects into GX
. importing GX’s objects into GX
. . importing table “SJY_DAT_SN_JZWX_JZWX” 1240 rows imported
Import terminated successfully without warnings.
数据泵:
查询directory:select * from dba_directories
将文件上传到directory的服务器目录
impdp system/********@192.168.1.230:1521/moepoc directory=bak_dir dumpfile=dci.dmp schemas=DCI
这个就行
linux-t9ub:~ # su - oracle
loracle@linux-t9ub:~> ls
Desktop Documents afiedt.buf dmp expdat.dmp gx190906261212.dmp log oracle sh software
oracle@linux-t9ub:~> cd dmp
oracle@linux-t9ub:~/dmp> ls
gx090624.dmp gx0906260900.dmp gx090628.dmp gx090630.dmp gx090703.dmp gx090705.tar.gz gx090708.dmp gx70090619.dmp
gx090625.dmp gx090627.dmp gx090629.dmp gx090701.dmp gx090704.dmp gx090706.dmp gx090709.dmp sys090629.dmp
gx090626.dmp gx0906271400.dmp gx090629.tar.gz gx090702.dmp gx090705.dmp gx090707.dmp gx190906260035.dmp sys090706.dmp
oracle@linux-t9ub:~/dmp> pwd
/oracle/dmp
oracle@linux-t9ub:~/dmp> exp gx/gx file=expdat_jzwx.dmp tables=SJY_DAT_SN_JZWX_JZWX grants=y;
注释:导出所有表可用:exp gx/gx file=expdat_jzwx.dmp grants=y;
Export: Release 10.2.0.1.0 - Production on 星期五 7月 10 11:07:35 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集
即将导出指定的表通过常规路径…
. . 正在导出表 SJY_DAT_SN_JZWX_JZWX导出了 1240 行
成功终止导出, 没有出现警告。
oracle@linux-t9ub:~/dmp>
导入篇
[root@localhost ~]# su - oracle
-bash-3.00$ ls
CreateData.sh expdatgx_70_20090115.dmp flash_recovery_area
admin expdatgx_70_20090121.dmp gx_88_090526.log
afiedt.buf expdatgx_70_20090203.dmp insertdata.sql
arhiva expdatgx_70_20090210.dmp log
dmp expdatgx_70_20090211.dmp lost+found
expdatgx20081128.dmp expdatgx_70_200902111.dmp old
expdatgx20081202.dmp expdatgx_70_20090212.dmp oraInventory
expdatgx20081219.dmp expdatgx_70_20090223.dmp oracle
expdatgx_70_20081220.dmp expdatgx_70_20090228.dmp oradata
expdatgx_70_20090102.dmp expdatgx_70_20090301.dmp sh
expdatgx_70_200901021.dmp expdatgx_70_20090309.dmp sjy_create_tables.sql
expdatgx_70_20090105.dmp expdatgx_70_20090322.dmp
-bash-3.00$ cd dmp
-bash-3.00$ sqlplus gx/gx
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jul 10 11:24:44 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> drop table SJY_DAT_SN_JZWX_JZWX;
Table dropped.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
-bash-3.00$ imp gx/gx file=expdat_jzwx.dmp grants=y;
注:导入整个dmp文件需要加FULL=Y参数 还可以用fromuser参数指定要导入哪个用户下的表,touser指定导入到哪个用户表空间下面
Import: Release 10.2.0.1.0 - Production on Fri Jul 10 11:26:30 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export file created by EXPORT:V10.02.01 via conventional path
import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses ZHS16GBK character set (possible charset conversion)
export client uses ZHS16GBK character set (possible charset conversion)
. importing GX’s objects into GX
. importing GX’s objects into GX
. . importing table “SJY_DAT_SN_JZWX_JZWX” 1240 rows imported
Import terminated successfully without warnings.
数据泵:
查询directory:select * from dba_directories
将文件上传到directory的服务器目录
impdp system/********@192.168.1.230:1521/moepoc directory=bak_dir dumpfile=dci.dmp schemas=DCI
这个就行
相关文章推荐
- Oracle数据库管理(韩顺平视频学习笔记摘)导入导出备份恢复
- MongoDB学习笔记(5)--数据导入导出mongoexport
- MySQL数据库操作(导入导出、备份数据库)--Ubuntu小笔记
- ORACLE数据库在导入导出时序列不一致的问题
- oracle数据库的导入、导出、创建用户、授权
- oracle数据库命令行导入导出
- dmp文件导入导出oracle数据库命令
- 用Oracle导入导出工具实现Oracle数据库移植
- Oracle数据库导入导出命令总结
- oracle数据库导入导出命令!
- Oracle数据库的导入导出
- oracle数据库的导入 导出实例
- oracle数据库的导入导出(imp/exp)
- 利用PLSQL Developer导入导出Oracle数据库表结构
- Oracle数据库导出(exp)导入(imp)说明
- MySQL 数据库表操作和数据导入导出方式总结笔记
- oracle数据库导入导出
- PuTTY使用笔记:登录设置的批量备份导出/导入
- PuTTY使用笔记:登录设置的批量备份导出/导入 (copied)
- oracle数据库导入导出