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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ObjectsObject
- operating-system structuresStruct
- Is programming an Operating System so hard?
- COMP3230 Principles of Operating Systems
- WPF Custom control and display binding and specific data
- 2.3.2 Application Common ObjectsAPPObject
- zend_objects_store_putObject
- 2.3.2.1 Creation of Application Common ObjectsAPPObject
- 2.1.3.3 Container Data Objects in a CDBAIObject
- expdp query用法
- 5-Overview-Understanding Kubernetes ObjectsViewObject
- 2.2.5 Overview of Common and Local Objects in a CDBViewObject
- Objects as Points 論文總結Object
- MySQL 索引優化 Using where, Using filesortMySql索引優化
- MySQL explain結果Extra中"Using Index"與"Using where; Using index"區別MySqlAIIndex
- Operating Systems: Principles and Practice 2nd ed. Edition
- How to redirect to a specific web page after sign out from Entra IDWeb
- expdp一個例子
- 2.3.2.3 Data-Linked Application Common ObjectsAPPObject
- 2.3.2.2 Metadata-Linked Application Common ObjectsAPPObject
- 好用的java.util.Objects類JavaObject
- 淺談 Objective-C Associated ObjectsObject
- mysql 啟動錯誤(InnoDB: Operating system error number 13 )MySqlError
- String interpolation using $
- using的用法
- Using hints for PostgresqlSQL
- Using mysqldump for backupsMySql
- MySQL 之 USINGMySql
- ECE 4122/6122 OpenGL with OBJ files and Multiple ObjectsObject
- 你要知道的 - Spread Operator for objects 技巧Object
- 你要知道的 – Spread Operator for objects 技巧Object
- jscalpel A small feature library that makes it easier to manipulate objectsJSObject
- 分享APP專用密碼app-specific password配置過程APP密碼
- 正常終止expdp作業
- expdp報錯ORA-39181
- 批量按使用者expdp
- expdp+compression效能測試
- MGTSC 212 using ExcelExcel
- Dictionary application using SwingAPP