Operating on Specific Objects Using EXPDP
Ever had a need to export only certain procedures from one user to be recreated in a different database or user? Unlike the traditional export utility,Data Pump allows you to export only a particular type of object. For instance, the following command lets you export only procedures, and nothing else--no tables, views, or even functions:
expdp ananda/iclaim directory=DPDATA1 dumpfile=expprocs.dmp include=PROCEDURE
To export only a few specific objects--say, function FUNC1 and procedure PROC1--you could use
expdp ananda/iclaim directory=DPDATA1 dumpfile=expprocs.dmp include=PROCEDURE:"='PROC1'",FUNCTION:"='FUNC1'"
This dumpfile serves as a backup of the sources. You can even use it to create DDL scripts to be used later. A special parameter called SQLFILE allows the creation of the DDL script file.
impdp ananda/iclaim directory=DPDATA1 dumpfile=expprocs.dmp sqlfile=procs.sql
This instruction creates a file named procs.sql in the directory specified by DPDATA1, containing the scripts of the objects inside the export
dumpfile. This approach helps you create the sources quickly in another schema.
Using the parameter INCLUDE allows you to define objects to be included or excluded from the dumpfile. You can use the clause
INCLUDE=TABLE:"LIKE 'TAB%'" to export only those tables whose name start with TAB. Similarly, you could use the construct
INCLUDE=TABLE:"NOT LIKE 'TAB%'" to exclude all tables starting with TAB. Alternatively you can use the EXCLUDE parameter to exclude
specific objects.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/38542/viewspace-1002066/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Using Morphia to map Java objects in MongoDBJavaObjectMongoDB
- Export a DataSet to Microsoft Excel without using the COM objectsExportROSExcelObject
- Import Data From MS Excel to DataSet without using COM ObjectsImportExcelObject
- operating-system structuresStruct
- 【檢視】oracle 資料字典檢視之 DBA_OBJECTS / ALL_OBJECTS / USER_OBJECTS(OBJ)OracleObject
- 一張圖看懂CSS cascade, specific, importance, inheritanceCSSImport
- Oracle dba_objects和all_objects 最大的區別OracleObject
- Checking operating system version FailedAI
- 淺談Associated ObjectsObject
- Destroying Window ObjectsObject
- create objects inmemory optionsObject
- Naming Database ObjectsDatabaseObject
- Checking operating system version Failed 續AI
- Oracle expdpOracle
- zend_objects_store_putObject
- Objects as Points 論文總結Object
- PDO--PHP Data ObjectsPHPObject
- row cache objects latch研究Object
- Cost objects in SAP R/3Object
- Program Units and Referenced Objects (244)Object
- WPF Custom control and display binding and specific data
- Write Your Own Operating System Tutorial(1) (轉)
- Write Your Own Operating System Tutorial(2) (轉)
- Write Your Own Operating System Tutorial(4) (轉)
- Write Your Own Operating System Tutorial(3) (轉)
- Write Your Own Operating System Tutorial(5) (轉)
- Write Your Own Operating System Tutorial(6) (轉)
- Write Your Own Operating System Tutorial(7) (轉)
- DB2 PL/SQL How much reorganisations are recommended on a specific schemaDB2SQL
- 2.3.2 Application Common ObjectsAPPObject
- 2.1.3.3 Container Data Objects in a CDBAIObject
- Latch: Row Cache Objects (One bug?)Object
- Business Objects Query Builder – Part IIObjectUI
- Convert Array of Objects to Data TableObject
- Create CLR objects CS.sqlObjectSQL
- Accessing Frequently Used Dictionary ObjectsObject
- Introduction to Schema Objects (153)Object
- impdp/expdp 示例