美好的一天,大家!
我只需要备份表及其触发器和序列。但我找不到正确的方法。我查看了exp实用程序的参数,但我只找到了TRIGGER参数。但我找不到包含序列和排除过程,函数和包的参数。
我找到了查询参数,所以也许where
语句可以帮助我,但我不明白它是如何工作的,因为cos where语句叠加在所有表上。
如何只导出架构的表,序列和触发器?
我看了here,但没有找到解决方案。
答案 0 :(得分:2)
旧的'exp'实用程序确实提供了许多选项,并且只能备份表和触发器(不是序列或任何其他类型的对象)。
请使用高级' expdp '(数据泵)以获得更好的选择。您可以使用“ INCLUDE或EXCLUDE ”对象切换来实现目标。
INCLUDE and EXCLUDE
The INCLUDE and EXCLUDE parameters can be used to limit the export/import to specific objects. When the INCLUDE parameter is used, only those objects specified by it will be included in the export/import. When the EXCLUDE parameter is used, all objects except those specified by it will be included in the export/import. The two parameters are mutually exclusive, so use the parameter that requires the least entries to give you the result you require. The basic syntax for both parameters is the same.
INCLUDE=object_type[:name_clause] [, ...]
EXCLUDE=object_type[:name_clause] [, ...]
The following code shows how they can be used as command line parameters.
expdp scott/tiger@db10g schemas=SCOTT include=TABLE:"IN ('EMP', 'DEPT')" directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log
expdp scott/tiger@db10g schemas=SCOTT exclude=TABLE:"= 'BONUS'" directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log
请查看更多详情......
http://www.oracle-base.com/articles/10g/oracle-data-pump-10g.php#IncludeExclude