2013-12-08 56 views
1

美好的一天,每個人!Original exp utility - 只想導出shema的表格,觸發器和序列

我需要做的只是表及其觸發器和序列的備份。但我找不到正確的方法。我查看了exp實用程序的參數,但我只找到了TRIGGER參數。但是我找不到包含序列和排除過程,函數和包的參數。

我發現查詢參數,所以也許where語句可以幫助我,但我不明白它是如何工作的,因爲cos語句疊加在所有表上。

我怎麼只能導出表,序列和模式的觸發器?

我看着here,但沒有找到一個解決辦法。

回答

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/[email protected] schemas=SCOTT include=TABLE:"IN ('EMP', 'DEPT')" directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log 

expdp scott/[email protected] 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

相關問題