exp/imp 按用户/全库 导表结构
(2011-03-29 17:43:14)
标签:
杂谈 |
分类: Oracle学习 |
exp导出表结构,不导出表数据。
版本是从9.2.0.1 到10.2.0.1,正常情况下,数据从低版本迁移导高版本,一定要用低版本的exp程序导出,否则会有问题。
也就是说这里要用9i的client端导出, 用10g的imp导入,经确认造作步骤没有什么问题。
用exp命令导出表结构,不导出表数据。只需在命令行里加一个参数rows=n即可。表示不导出表数据。
exp username/pwd@sid file=d:\data\bak.dmp owner=(user) rows=n
scp
xxxx:/tmp/waplat.dmp /tmp
imp username/pwd@sid file=/tmp/exp.exp fromuser=fromuser touser=touser log=/tmp/log.log
exp system/xx full=y rows=n file=/tmp/full.exp
log=/tmp/full.log
imp system/xx full=y file=/tmp/full.exp ignore=y
log=/tmp/full.log
---这个会按照原数据库的文件大小去创建新数据库的文件,所以一定要提前将相关的表空间建好!!!!
[oracle@localhost ~]$ exp mass/xx owner=(mass)
rows=n file=/tmp/mass.exp log=/tmp/mass.log
Export: Release 9.2.0.5.0 - Production on Sat Feb 12 13:55:04 2011
Copyright (c) 1982, 2002, Oracle Corporation. All
rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.5.0 - Production
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
Note: table data (rows) will not be exported
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user MASS
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user MASS
About to export MASS's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export MASS's tables via Conventional Path ...
. . exporting table
CDML_BLOCK
. . exporting table
CDML_BLOCK_OBJECT
. . exporting table
CDML_BOOK_TOP
. . exporting table
CDML_COMMENT
. . exporting table
CDML_LOGS
. . exporting table
CDML_MESSAGE_BOARD
. . exporting table
CDML_MO_LOGS
. . exporting table
CDML_OPERATION
. . exporting table
CDML_OPERATION_TEMPLATE
. . exporting table
CDML_PAGE
. . exporting table
CDML_PAGE_BLOCK
. . exporting table
CDML_PAGE_TEMPLATE
. . exporting table
CDML_PROJECT
. . exporting table
CDML_SERVICE
. . exporting table
CDML_SMS_ORDER
. . exporting table
版本是从9.2.0.1 到10.2.0.1,正常情况下,数据从低版本迁移导高版本,一定要用低版本的exp程序导出,否则会有问题。
也就是说这里要用9i的client端导出, 用10g的imp导入,经确认造作步骤没有什么问题。
用exp命令导出表结构,不导出表数据。只需在命令行里加一个参数rows=n即可。表示不导出表数据。
exp username/pwd@sid file=d:\data\bak.dmp owner=(user) rows=n
scp
imp username/pwd@sid file=/tmp/exp.exp fromuser=fromuser touser=touser log=/tmp/log.log
exp system/xx
imp system/xx
---这个会按照原数据库的文件大小去创建新数据库的文件,所以一定要提前将相关的表空间建好!!!!
[oracle@localhost ~]$ exp mass/xx
Export: Release 9.2.0.5.0 - Production on Sat Feb 12 13:55:04 2011
Copyright (c) 1982, 2002, Oracle Corporation.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.5.0 - Production
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
Note: table data (rows) will not be exported
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user MASS
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user MASS
About to export MASS's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export MASS's tables via Conventional Path ...
. . exporting table
. . exporting table
. . exporting table
. . exporting table
. . exporting table
. . exporting table
. . exporting table
. . exporting table
. . exporting table
. . exporting table
. . exporting table
. . exporting table
. . exporting table
. . exporting table
. . exporting table
. . exporting table