首页 > Linux操作系统 > Linux操作系统 > [原创] expdp 杂记一箩筐
---全库expdp
oracle@dbatest1:/data01 #expdp system/password full=y parallel=4 directory=dumpdir dumpfile=fulldb%U.dump filesize=50m
---限定条件导出
oracle@dbatest1:/data01 #expdp yxyup/password dumpfile=yxyupq%U.dump directory=dumpdir filesize=2m tables=test01 query= \"where object_id \< 500 \"
---只导出yxyup这个用户下的view和table
oracle@dbatest1:/data01 #expdp yxyup/password directory=dumpdir dumpfile=yxyup.dump schemas = yxyup include=view include=table
---从导出的dump文件中生成sql脚本
oracle@dbatest1:/data01 #impdp yxyup/password directory=dumpdir dumpfile=yxyup.dump sqlfile=yxyup.sql
---没有这种对象,偏要导出这类对象时出错,如下
YXYUP@dbatest>create view v_test01 as select * from test01;
View created.
oracle@dbatest1:/data01 #expdp yxyup/password directory=dumpdir dumpfile=yxyup.dump schemas = yxyup include=view
Export: Release 10.2.0.3.0 - Production on Thursday, 28 August, 2008 15:55:40
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-31641: unable to create dump file "/data01/yxyup.dump"
ORA-27038: created file already exists
Additional information: 1
oracle@dbatest1:/data01 #expdp yxyup/password directory=dumpdir dumpfile=yxyup.dump schemas = yxyup include=view
Export: Release 10.2.0.3.0 - Production on Thursday, 28 August, 2008 15:55:45
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
Starting "YXYUP"."SYS_EXPORT_SCHEMA_04": yxyup/******** directory=dumpdir dumpfile=yxyup.dump schemas = yxyup include=view
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 0 KB
Processing object type SCHEMA_EXPORT/VIEW/VIEW
Master table "YXYUP"."SYS_EXPORT_SCHEMA_04" successfully loaded/unloaded
******************************************************************************
Dump file set for YXYUP.SYS_EXPORT_SCHEMA_04 is:
/data01/yxyup.dump
Job "YXYUP"."SYS_EXPORT_SCHEMA_04" successfully completed at 15:55:50
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7364032/viewspace-438683/ ,如需转载,请注明出处,否则将追究法律责任。