Upload
ezequielmora
View
58
Download
8
Embed Size (px)
Citation preview
11/11/11 ORACLE-BASE - Oracle Database 10g Data Pump
1/5www.oracle-base.com/articles/10g/OracleDataPump10g.php
Home Articles Scripts Forums Blog Certification Misc Search About Printer Friendly
Search
Oracle 8i | Oracle 9i | Oracle 10g | Oracle 11g | Oracle 12c | Miscellaneous | PL/SQL | SQL | Oracle RAC | Oracle Apps | Linux
Home » Articles » 10g » Here
Oracle Data Pump in Oracle Database 10g
Oracle Data Pump is a newer, faster and more flexible alternative to the "exp" and "imp" utilities used in previousOracle versions. In addition to basic import and export functionality data pump provides a PL/SQL API and support forexternal tables.
Getting StartedTable Exports/ImportsSchema Exports/ImportsDatabase Exports/ImportsINCLUDE and EXCLUDENetwork Exports/Imports (NETWORK_LINK)Miscellaneous InformationData Pump APIExternal TablesHelp
expdpimpdp
Related articles.
Data Pump Enhancements in Oracle Database 11g Release 1
Getting Started
For the examples to work we must first unlock the SCOTT account and create a directory object it can access. The directory object is only a pointer to a physical directory,creating it does not actually create the physical directory on the file system.
C O N N / A S S Y S D B AA L T E R U S E R s c o t t I D E N T I F I E D B Y t i g e r A C C O U N T U N L O C K ;
C R E A T E O R R E P L A C E D I R E C T O R Y t e s t _ d i r A S ' / u 0 1 / a p p / o r a c l e / o r a d a t a / ' ;G R A N T R E A D , W R I T E O N D I R E C T O R Y t e s t _ d i r T O s c o t t ;
Table Exports/Imports
The T A B L E S parameter is used to specify the tables that are to be exported. The following is an example of the table export and import syntax.
e x p d p s c o t t / t i g e r @ d b 1 0 g t a b l e s = E M P , D E P T d i r e c t o r y = T E S T _ D I R d u m p f i l e = E M P _ D E P T . d m p l o g f i l e = e x p d p E M P _ D E P T . l o g
i m p d p s c o t t / t i g e r @ d b 1 0 g t a b l e s = E M P , D E P T d i r e c t o r y = T E S T _ D I R d u m p f i l e = E M P _ D E P T . d m p l o g f i l e = i m p d p E M P _ D E P T . l o g
For example output files see expdpEMP_DEPT.log and impdpEMP_DEPT.log.
The T A B L E _ E X I S T S _ A C T I O N = A P P E N D parameter allows data to be imported into existing tables.
Schema Exports/Imports
The O W N E R parameter of exp has been replaced by the S C H E M A S parameter which is used to specify the schemas to be exported. The following is an example of the schema
export and import syntax.
e x p d p s c o t t / t i g e r @ d b 1 0 g s c h e m a s = S C O T T d i r e c t o r y = T E S T _ D I R d u m p f i l e = S C O T T . d m p l o g f i l e = e x p d p S C O T T . l o g
i m p d p s c o t t / t i g e r @ d b 1 0 g s c h e m a s = S C O T T d i r e c t o r y = T E S T _ D I R d u m p f i l e = S C O T T . d m p l o g f i l e = i m p d p S C O T T . l o g
For example output files see expdpSCOTT.log and impdpSCOTT.log.
Database Exports/Imports
The F U L L parameter indicates that a complete database export is required. The following is an example of the full database export and import syntax.
e x p d p s y s t e m / p a s s w o r d @ d b 1 0 g f u l l = Y d i r e c t o r y = T E S T _ D I R d u m p f i l e = D B 1 0 G . d m p l o g f i l e = e x p d p D B 1 0 G . l o g
i m p d p s y s t e m / p a s s w o r d @ d b 1 0 g f u l l = Y d i r e c t o r y = T E S T _ D I R d u m p f i l e = D B 1 0 G . d m p l o g f i l e = i m p d p D B 1 0 G . l o g
For an example output file see expdpDB10G.log.
INCLUDE and EXCLUDE
The I N C L U D E and E X C L U D E parameters can be used to limit the export/import to specific objects. When the I N C L U D E parameter is used, only those objects specified by it will
be included in the export/import. When the E X C L U D E 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.
I N C L U D E = o b j e c t _ t y p e [ : n a m e _ c l a u s e ] [ , . . . ]E X C L U D E = o b j e c t _ t y p e [ : n a m e _ c l a u s e ] [ , . . . ]
The following code shows how they can be used as command line parameters.
e x p d p s c o t t / t i g e r @ d b 1 0 g s c h e m a s = S C O T T i n c l u d e = T A B L E : " I N ( ' E M P ' , ' D E P T ' ) " d i r e c t o r y = T E S T _ D I R d u m p f i l e = S C O T T . d m p l o g f i l e = e x p d p S C O T T . l o g
e x p d p s c o t t / t i g e r @ d b 1 0 g s c h e m a s = S C O T T e x c l u d e = T A B L E : " = ' B O N U S ' " d i r e c t o r y = T E S T _ D I R d u m p f i l e = S C O T T . d m p l o g f i l e = e x p d p S C O T T . l o g
Ads by Google Oracle 10G R3 Oracle Oracle PL SQL Oracle Job UK
11/11/11 ORACLE-BASE - Oracle Database 10g Data Pump
2/5www.oracle-base.com/articles/10g/OracleDataPump10g.php
e x p d p s c o t t / t i g e r @ d b 1 0 g s c h e m a s = S C O T T e x c l u d e = T A B L E : " = ' B O N U S ' " d i r e c t o r y = T E S T _ D I R d u m p f i l e = S C O T T . d m p l o g f i l e = e x p d p S C O T T . l o g
If the parameter is used from the command line, depending on your OS, the special characters in the clause may need to be escaped, as follows. Because of this, it is easier touse a parameter file.
i n c l u d e = T A B L E : \ " I N \ ( \ ' E M P \ ' , \ ' D E P T \ ' \ ) \ "
A single import/export can include multiple references to the parameters, so to export tables, views and some packages we could use either of the following approaches.
I N C L U D E = T A B L E , V I E W , P A C K A G E : " L I K E ' % A P I ' "
o r
I N C L U D E = T A B L EI N C L U D E = V I E WI N C L U D E = P A C K A G E : " L I K E ' % A P I ' "
Network Exports/Imports (NETWORK_LINK)
The N E T W O R K _ L I N K parameter identifies a database link to be used as the source for a network export/import. The following database link will be used to demonstrate its use.
C O N N / A S S Y S D B AG R A N T C R E A T E D A T A B A S E L I N K T O t e s t ;
C O N N t e s t / t e s tC R E A T E D A T A B A S E L I N K r e m o t e _ s c o t t C O N N E C T T O s c o t t I D E N T I F I E D B Y t i g e r U S I N G ' D E V ' ;
In the case of exports, the N E T W O R K _ L I N K parameter identifies the database link pointing to the source server. The objects are exported from the source server in the normal
manner, but written to a directory object on the local server, rather than one on the source server. Both the local and remote users require the E X P _ F U L L _ D A T A B A S E role
granted to them.
e x p d p t e s t / t e s t @ d b 1 0 g t a b l e s = S C O T T . E M P n e t w o r k _ l i n k = R E M O T E _ S C O T T d i r e c t o r y = T E S T _ D I R d u m p f i l e = E M P . d m p l o g f i l e = e x p d p E M P . l o g
For imports, the N E T W O R K _ L I N K parameter also identifies the database link pointing to the source server. The difference here is the objects are imported directly from the
source into the local server without being written to a dump file. Although there is no need for a D U M P F I L E parameter, a directory object is still required for the logs associated
with the operation. Both the local and remote users require the I M P _ F U L L _ D A T A B A S E role granted to them.
i m p d p t e s t / t e s t @ d b 1 0 g t a b l e s = S C O T T . E M P n e t w o r k _ l i n k = R E M O T E _ S C O T T d i r e c t o r y = T E S T _ D I R l o g f i l e = i m p d p S C O T T . l o g r e m a p _ s c h e m a = S C O T T : T E S T
Miscellaneous Information
Unlike the original exp and imp utilities all data pump ".dmp" and ".log" files are created on the Oracle server, not the client machine.
All data pump actions are performed by multiple jobs (server processes not DBMS_JOB jobs). These jobs are controlled by a master control process which uses AdvancedQueuing. At runtime an advanced queue table, named after the job name, is created and used by the master control process. The table is dropped on completion of the datapump job. The job and the advanced queue can be named using the J O B _ N A M E parameter. Cancelling the client process does not stop the associated data pump job. Issuing
"ctrl+c" on the client during a job stops the client output and presents a command prompt. Typing "status" at this prompt allows you to monitor the current job.
E x p o r t > s t a t u s
J o b : S Y S _ E X P O R T _ F U L L _ 0 1 O p e r a t i o n : E X P O R T M o d e : F U L L S t a t e : E X E C U T I N G B y t e s P r o c e s s e d : 0 C u r r e n t P a r a l l e l i s m : 1 J o b E r r o r C o u n t : 0 D u m p F i l e : D : T E M P D B 1 0 G . D M P b y t e s w r i t t e n : 4 , 0 9 6
W o r k e r 1 S t a t u s : S t a t e : E X E C U T I N G O b j e c t S c h e m a : S Y S M A N O b j e c t N a m e : M G M T _ C O N T A I N E R _ C R E D _ A R R A Y O b j e c t T y p e : D A T A B A S E _ E X P O R T / S C H E M A / T Y P E / T Y P E _ S P E C C o m p l e t e d O b j e c t s : 2 6 1 T o t a l O b j e c t s : 2 6 1
Data pump performance can be improved by using the P A R A L L E L parameter. This should be used in conjunction with the "%U" wildcard in the D U M P F I L E parameter to allow
multiple dumpfiles to be created or read.
e x p d p s c o t t / t i g e r @ d b 1 0 g s c h e m a s = S C O T T d i r e c t o r y = T E S T _ D I R p a r a l l e l = 4 d u m p f i l e = S C O T T _ % U . d m p l o g f i l e = e x p d p S C O T T . l o g
The D B A _ D A T A P U M P _ J O B S view can be used to monitor the current jobs.
s y s t e m @ d b 1 0 g > s e l e c t * f r o m d b a _ d a t a p u m p _ j o b s ;
O W N E R _ N A M E J O B _ N A M E O P E R A T I O N- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -J O B _ M O D E S T A T E D E G R E E A T T A C H E D _ S E S S I O N S- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -S Y S T E M S Y S _ E X P O R T _ F U L L _ 0 1 E X P O R TF U L L E X E C U T I N G 1 1
Data Pump API
Along with the data pump utilities Oracle provide an PL/SQL API. The following is an example of how this API can be used to perform a schema export.
11/11/11 ORACLE-BASE - Oracle Database 10g Data Pump
3/5www.oracle-base.com/articles/10g/OracleDataPump10g.php
S E T S E R V E R O U T P U T O N S I Z E 1 0 0 0 0 0 0D E C L A R E l _ d p _ h a n d l e N U M B E R ; l _ l a s t _ j o b _ s t a t e V A R C H A R 2 ( 3 0 ) : = ' U N D E F I N E D ' ; l _ j o b _ s t a t e V A R C H A R 2 ( 3 0 ) : = ' U N D E F I N E D ' ; l _ s t s K U $ _ S T A T U S ;B E G I N l _ d p _ h a n d l e : = D B M S _ D A T A P U M P . o p e n ( o p e r a t i o n = > ' E X P O R T ' , j o b _ m o d e = > ' S C H E M A ' , r e m o t e _ l i n k = > N U L L , j o b _ n a m e = > ' E M P _ E X P O R T ' , v e r s i o n = > ' L A T E S T ' ) ;
D B M S _ D A T A P U M P . a d d _ f i l e ( h a n d l e = > l _ d p _ h a n d l e , f i l e n a m e = > ' S C O T T . d m p ' , d i r e c t o r y = > ' T E S T _ D I R ' ) ;
D B M S _ D A T A P U M P . a d d _ f i l e ( h a n d l e = > l _ d p _ h a n d l e , f i l e n a m e = > ' S C O T T . l o g ' , d i r e c t o r y = > ' T E S T _ D I R ' , f i l e t y p e = > D B M S _ D A T A P U M P . K U $ _ F I L E _ T Y P E _ L O G _ F I L E ) ;
D B M S _ D A T A P U M P . m e t a d a t a _ f i l t e r ( h a n d l e = > l _ d p _ h a n d l e , n a m e = > ' S C H E M A _ E X P R ' , v a l u e = > ' = ' ' S C O T T ' ' ' ) ;
D B M S _ D A T A P U M P . s t a r t _ j o b ( l _ d p _ h a n d l e ) ;
D B M S _ D A T A P U M P . d e t a c h ( l _ d p _ h a n d l e ) ;E N D ;/
Once the job has started the status can be checked using.
s y s t e m @ d b 1 0 g > s e l e c t * f r o m d b a _ d a t a p u m p _ j o b s ;
External Tables
Oracle have incorporated support for data pump technology into external tables. The ORACLE_DATAPUMP access driver can be used to unload data to data pump export filesand subsequently reload it. The unload of data occurs when the external table is created using the "AS" clause.
C R E A T E T A B L E e m p _ x t O R G A N I Z A T I O N E X T E R N A L ( T Y P E O R A C L E _ D A T A P U M P D E F A U L T D I R E C T O R Y t e s t _ d i r L O C A T I O N ( ' e m p _ x t . d m p ' ) ) A S S E L E C T * F R O M e m p ;
The data can then be queried using the following.
S E L E C T * F R O M e m p _ x t ;
The syntax to create the external table pointing to an existing file is similar, but without the "AS" clause.
D R O P T A B L E e m p _ x t ;
C R E A T E T A B L E e m p _ x t ( E M P N O N U M B E R ( 4 ) , E N A M E V A R C H A R 2 ( 1 0 ) , J O B V A R C H A R 2 ( 9 ) , M G R N U M B E R ( 4 ) , H I R E D A T E D A T E , S A L N U M B E R ( 7 , 2 ) , C O M M N U M B E R ( 7 , 2 ) , D E P T N O N U M B E R ( 2 ) ) O R G A N I Z A T I O N E X T E R N A L ( T Y P E O R A C L E _ D A T A P U M P D E F A U L T D I R E C T O R Y t e s t _ d i r L O C A T I O N ( ' e m p _ x t . d m p ' ) ) ;
S E L E C T * F R O M e m p _ x t ;
Help
The H E L P = Y option displays the available parameters.
expdp
e x p d p h e l p = y
E x p o r t : R e l e a s e 1 0 . 1 . 0 . 2 . 0 - P r o d u c t i o n o n T u e s d a y , 2 3 M a r c h , 2 0 0 4 8 : 3 3
C o p y r i g h t ( c ) 2 0 0 3 , O r a c l e . A l l r i g h t s r e s e r v e d .
T h e D a t a P u m p e x p o r t u t i l i t y p r o v i d e s a m e c h a n i s m f o r t r a n s f e r r i n g d a t a o b j e c t s
11/11/11 ORACLE-BASE - Oracle Database 10g Data Pump
4/5www.oracle-base.com/articles/10g/OracleDataPump10g.php
T h e D a t a P u m p e x p o r t u t i l i t y p r o v i d e s a m e c h a n i s m f o r t r a n s f e r r i n g d a t a o b j e c t sb e t w e e n O r a c l e d a t a b a s e s . T h e u t i l i t y i s i n v o k e d w i t h t h e f o l l o w i n g c o m m a n d :
E x a m p l e : e x p d p s c o t t / t i g e r D I R E C T O R Y = d m p d i r D U M P F I L E = s c o t t . d m p
Y o u c a n c o n t r o l h o w E x p o r t r u n s b y e n t e r i n g t h e ' e x p d p ' c o m m a n d f o l l o w e db y v a r i o u s p a r a m e t e r s . T o s p e c i f y p a r a m e t e r s , y o u u s e k e y w o r d s :
F o r m a t : e x p d p K E Y W O R D = v a l u e o r K E Y W O R D = ( v a l u e 1 , v a l u e 2 , . . . , v a l u e N ) E x a m p l e : e x p d p s c o t t / t i g e r D U M P F I L E = s c o t t . d m p D I R E C T O R Y = d m p d i r S C H E M A S = s c o t t o r T A B L E S = ( T 1 : P 1 , T 1 : P 2 ) , i f T 1 i s p a r t i t i o n e d t a b l e
U S E R I D m u s t b e t h e f i r s t p a r a m e t e r o n t h e c o m m a n d l i n e .
K e y w o r d D e s c r i p t i o n ( D e f a u l t )- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -A T T A C H A t t a c h t o e x i s t i n g j o b , e . g . A T T A C H [ = j o b n a m e ] .C O N T E N T S p e c i f i e s d a t a t o u n l o a d w h e r e t h e v a l i d k e y w o r d s a r e : ( A L L ) , D A T A _ O N L Y , a n d M E T A D A T A _ O N L Y .D I R E C T O R Y D i r e c t o r y o b j e c t t o b e u s e d f o r d u m p f i l e s a n d l o g f i l e s .D U M P F I L E L i s t o f d e s t i n a t i o n d u m p f i l e s ( e x p d a t . d m p ) , e . g . D U M P F I L E = s c o t t 1 . d m p , s c o t t 2 . d m p , d m p d i r : s c o t t 3 . d m p .E S T I M A T E C a l c u l a t e j o b e s t i m a t e s w h e r e t h e v a l i d k e y w o r d s a r e : ( B L O C K S ) a n d S T A T I S T I C S .E S T I M A T E _ O N L Y C a l c u l a t e j o b e s t i m a t e s w i t h o u t p e r f o r m i n g t h e e x p o r t .E X C L U D E E x c l u d e s p e c i f i c o b j e c t t y p e s , e . g . E X C L U D E = T A B L E : E M P .F I L E S I Z E S p e c i f y t h e s i z e o f e a c h d u m p f i l e i n u n i t s o f b y t e s .F L A S H B A C K _ S C N S C N u s e d t o s e t s e s s i o n s n a p s h o t b a c k t o .F L A S H B A C K _ T I M E T i m e u s e d t o g e t t h e S C N c l o s e s t t o t h e s p e c i f i e d t i m e .F U L L E x p o r t e n t i r e d a t a b a s e ( N ) .H E L P D i s p l a y H e l p m e s s a g e s ( N ) .I N C L U D E I n c l u d e s p e c i f i c o b j e c t t y p e s , e . g . I N C L U D E = T A B L E _ D A T A .J O B _ N A M E N a m e o f e x p o r t j o b t o c r e a t e .L O G F I L E L o g f i l e n a m e ( e x p o r t . l o g ) .N E T W O R K _ L I N K N a m e o f r e m o t e d a t a b a s e l i n k t o t h e s o u r c e s y s t e m .N O L O G F I L E D o n o t w r i t e l o g f i l e ( N ) .P A R A L L E L C h a n g e t h e n u m b e r o f a c t i v e w o r k e r s f o r c u r r e n t j o b .P A R F I L E S p e c i f y p a r a m e t e r f i l e .Q U E R Y P r e d i c a t e c l a u s e u s e d t o e x p o r t a s u b s e t o f a t a b l e .S C H E M A S L i s t o f s c h e m a s t o e x p o r t ( l o g i n s c h e m a ) .S T A T U S F r e q u e n c y ( s e c s ) j o b s t a t u s i s t o b e m o n i t o r e d w h e r e t h e d e f a u l t ( 0 ) w i l l s h o w n e w s t a t u s w h e n a v a i l a b l e .T A B L E S I d e n t i f i e s a l i s t o f t a b l e s t o e x p o r t - o n e s c h e m a o n l y .T A B L E S P A C E S I d e n t i f i e s a l i s t o f t a b l e s p a c e s t o e x p o r t .T R A N S P O R T _ F U L L _ C H E C K V e r i f y s t o r a g e s e g m e n t s o f a l l t a b l e s ( N ) .T R A N S P O R T _ T A B L E S P A C E S L i s t o f t a b l e s p a c e s f r o m w h i c h m e t a d a t a w i l l b e u n l o a d e d .V E R S I O N V e r s i o n o f o b j e c t s t o e x p o r t w h e r e v a l i d k e y w o r d s a r e : ( C O M P A T I B L E ) , L A T E S T , o r a n y v a l i d d a t a b a s e v e r s i o n .
T h e f o l l o w i n g c o m m a n d s a r e v a l i d w h i l e i n i n t e r a c t i v e m o d e .N o t e : a b b r e v i a t i o n s a r e a l l o w e d
C o m m a n d D e s c r i p t i o n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -A D D _ F I L E A d d d u m p f i l e t o d u m p f i l e s e t . A D D _ F I L E = d u m p f i l e - n a m eC O N T I N U E _ C L I E N T R e t u r n t o l o g g i n g m o d e . J o b w i l l b e r e - s t a r t e d i f i d l e .E X I T _ C L I E N T Q u i t c l i e n t s e s s i o n a n d l e a v e j o b r u n n i n g .H E L P S u m m a r i z e i n t e r a c t i v e c o m m a n d s .K I L L _ J O B D e t a c h a n d d e l e t e j o b .P A R A L L E L C h a n g e t h e n u m b e r o f a c t i v e w o r k e r s f o r c u r r e n t j o b . P A R A L L E L = .S T A R T _ J O B S t a r t / r e s u m e c u r r e n t j o b .S T A T U S F r e q u e n c y ( s e c s ) j o b s t a t u s i s t o b e m o n i t o r e d w h e r e t h e d e f a u l t ( 0 ) w i l l s h o w n e w s t a t u s w h e n a v a i l a b l e . S T A T U S = [ i n t e r v a l ]S T O P _ J O B O r d e r l y s h u t d o w n o f j o b e x e c u t i o n a n d e x i t s t h e c l i e n t . S T O P _ J O B = I M M E D I A T E p e r f o r m s a n i m m e d i a t e s h u t d o w n o f t h e D a t a P u m p j o b .
impdp
i m p d p h e l p = y
I m p o r t : R e l e a s e 1 0 . 1 . 0 . 2 . 0 - P r o d u c t i o n o n S a t u r d a y , 1 1 S e p t e m b e r , 2 0 0 4 1 7 : 2 2
C o p y r i g h t ( c ) 2 0 0 3 , O r a c l e . A l l r i g h t s r e s e r v e d .
T h e D a t a P u m p I m p o r t u t i l i t y p r o v i d e s a m e c h a n i s m f o r t r a n s f e r r i n g d a t a o b j e c t sb e t w e e n O r a c l e d a t a b a s e s . T h e u t i l i t y i s i n v o k e d w i t h t h e f o l l o w i n g c o m m a n d :
E x a m p l e : i m p d p s c o t t / t i g e r D I R E C T O R Y = d m p d i r D U M P F I L E = s c o t t . d m p
Y o u c a n c o n t r o l h o w I m p o r t r u n s b y e n t e r i n g t h e ' i m p d p ' c o m m a n d f o l l o w e db y v a r i o u s p a r a m e t e r s . T o s p e c i f y p a r a m e t e r s , y o u u s e k e y w o r d s :
F o r m a t : i m p d p K E Y W O R D = v a l u e o r K E Y W O R D = ( v a l u e 1 , v a l u e 2 , . . . , v a l u e N ) E x a m p l e : i m p d p s c o t t / t i g e r D I R E C T O R Y = d m p d i r D U M P F I L E = s c o t t . d m p
U S E R I D m u s t b e t h e f i r s t p a r a m e t e r o n t h e c o m m a n d l i n e .
K e y w o r d D e s c r i p t i o n ( D e f a u l t )- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -A T T A C H A t t a c h t o e x i s t i n g j o b , e . g . A T T A C H [ = j o b n a m e ] .C O N T E N T S p e c i f i e s d a t a t o l o a d w h e r e t h e v a l i d k e y w o r d s a r e :
( A L L ) , D A T A _ O N L Y , a n d M E T A D A T A _ O N L Y .
11/11/11 ORACLE-BASE - Oracle Database 10g Data Pump
5/5www.oracle-base.com/articles/10g/OracleDataPump10g.php
ERRO
Tweet 11 "
( A L L ) , D A T A _ O N L Y , a n d M E T A D A T A _ O N L Y .D I R E C T O R Y D i r e c t o r y o b j e c t t o b e u s e d f o r d u m p , l o g , a n d s q l f i l e s .D U M P F I L E L i s t o f d u m p f i l e s t o i m p o r t f r o m ( e x p d a t . d m p ) , e . g . D U M P F I L E = s c o t t 1 . d m p , s c o t t 2 . d m p , d m p d i r : s c o t t 3 . d m p .E S T I M A T E C a l c u l a t e j o b e s t i m a t e s w h e r e t h e v a l i d k e y w o r d s a r e : ( B L O C K S ) a n d S T A T I S T I C S .E X C L U D E E x c l u d e s p e c i f i c o b j e c t t y p e s , e . g . E X C L U D E = T A B L E : E M P .F L A S H B A C K _ S C N S C N u s e d t o s e t s e s s i o n s n a p s h o t b a c k t o .F L A S H B A C K _ T I M E T i m e u s e d t o g e t t h e S C N c l o s e s t t o t h e s p e c i f i e d t i m e .F U L L I m p o r t e v e r y t h i n g f r o m s o u r c e ( Y ) .H E L P D i s p l a y h e l p m e s s a g e s ( N ) .I N C L U D E I n c l u d e s p e c i f i c o b j e c t t y p e s , e . g . I N C L U D E = T A B L E _ D A T A .J O B _ N A M E N a m e o f i m p o r t j o b t o c r e a t e .L O G F I L E L o g f i l e n a m e ( i m p o r t . l o g ) .N E T W O R K _ L I N K N a m e o f r e m o t e d a t a b a s e l i n k t o t h e s o u r c e s y s t e m .N O L O G F I L E D o n o t w r i t e l o g f i l e .P A R A L L E L C h a n g e t h e n u m b e r o f a c t i v e w o r k e r s f o r c u r r e n t j o b .P A R F I L E S p e c i f y p a r a m e t e r f i l e .Q U E R Y P r e d i c a t e c l a u s e u s e d t o i m p o r t a s u b s e t o f a t a b l e .R E M A P _ D A T A F I L E R e d e f i n e d a t a f i l e r e f e r e n c e s i n a l l D D L s t a t e m e n t s .R E M A P _ S C H E M A O b j e c t s f r o m o n e s c h e m a a r e l o a d e d i n t o a n o t h e r s c h e m a .R E M A P _ T A B L E S P A C E T a b l e s p a c e o b j e c t a r e r e m a p p e d t o a n o t h e r t a b l e s p a c e .R E U S E _ D A T A F I L E S T a b l e s p a c e w i l l b e i n i t i a l i z e d i f i t a l r e a d y e x i s t s ( N ) .S C H E M A S L i s t o f s c h e m a s t o i m p o r t .S K I P _ U N U S A B L E _ I N D E X E S S k i p i n d e x e s t h a t w e r e s e t t o t h e I n d e x U n u s a b l e s t a t e .S Q L F I L E W r i t e a l l t h e S Q L D D L t o a s p e c i f i e d f i l e .S T A T U S F r e q u e n c y ( s e c s ) j o b s t a t u s i s t o b e m o n i t o r e d w h e r e t h e d e f a u l t ( 0 ) w i l l s h o w n e w s t a t u s w h e n a v a i l a b l e .S T R E A M S _ C O N F I G U R A T I O N E n a b l e t h e l o a d i n g o f S t r e a m s m e t a d a t aT A B L E _ E X I S T S _ A C T I O N A c t i o n t o t a k e i f i m p o r t e d o b j e c t a l r e a d y e x i s t s . V a l i d k e y w o r d s : ( S K I P ) , A P P E N D , R E P L A C E a n d T R U N C A T E .T A B L E S I d e n t i f i e s a l i s t o f t a b l e s t o i m p o r t .T A B L E S P A C E S I d e n t i f i e s a l i s t o f t a b l e s p a c e s t o i m p o r t .T R A N S F O R M M e t a d a t a t r a n s f o r m t o a p p l y ( Y / N ) t o s p e c i f i c o b j e c t s . V a l i d t r a n s f o r m k e y w o r d s : S E G M E N T _ A T T R I B U T E S a n d S T O R A G E . e x . T R A N S F O R M = S E G M E N T _ A T T R I B U T E S : N : T A B L E .T R A N S P O R T _ D A T A F I L E S L i s t o f d a t a f i l e s t o b e i m p o r t e d b y t r a n s p o r t a b l e m o d e .T R A N S P O R T _ F U L L _ C H E C K V e r i f y s t o r a g e s e g m e n t s o f a l l t a b l e s ( N ) .T R A N S P O R T _ T A B L E S P A C E S L i s t o f t a b l e s p a c e s f r o m w h i c h m e t a d a t a w i l l b e l o a d e d . O n l y v a l i d i n N E T W O R K _ L I N K m o d e i m p o r t o p e r a t i o n s .V E R S I O N V e r s i o n o f o b j e c t s t o e x p o r t w h e r e v a l i d k e y w o r d s a r e : ( C O M P A T I B L E ) , L A T E S T , o r a n y v a l i d d a t a b a s e v e r s i o n . O n l y v a l i d f o r N E T W O R K _ L I N K a n d S Q L F I L E .
T h e f o l l o w i n g c o m m a n d s a r e v a l i d w h i l e i n i n t e r a c t i v e m o d e .N o t e : a b b r e v i a t i o n s a r e a l l o w e d
C o m m a n d D e s c r i p t i o n ( D e f a u l t ) 1 1 g- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -C O N T I N U E _ C L I E N T R e t u r n t o l o g g i n g m o d e . J o b w i l l b e r e - s t a r t e d i f i d l e .E X I T _ C L I E N T Q u i t c l i e n t s e s s i o n a n d l e a v e j o b r u n n i n g .H E L P S u m m a r i z e i n t e r a c t i v e c o m m a n d s .K I L L _ J O B D e t a c h a n d d e l e t e j o b .P A R A L L E L C h a n g e t h e n u m b e r o f a c t i v e w o r k e r s f o r c u r r e n t j o b . P A R A L L E L = .S T A R T _ J O B S t a r t / r e s u m e c u r r e n t j o b . S T A R T _ J O B = S K I P _ C U R R E N T w i l l s t a r t t h e j o b a f t e r s k i p p i n g a n y a c t i o n w h i c h w a s i n p r o g r e s s w h e n j o b w a s s t o p p e d .S T A T U S F r e q u e n c y ( s e c s ) j o b s t a t u s i s t o b e m o n i t o r e d w h e r e t h e d e f a u l t ( 0 ) w i l l s h o w n e w s t a t u s w h e n a v a i l a b l e . S T A T U S = [ i n t e r v a l ]S T O P _ J O B O r d e r l y s h u t d o w n o f j o b e x e c u t i o n a n d e x i t s t h e c l i e n t . S T O P _ J O B = I M M E D I A T E p e r f o r m s a n i m m e d i a t e s h u t d o w n o f t h e D a t a P u m p j o b .
For more information see:
Oracle Database Utilities 10g Release 1 (10.1)Data Pump Enhancements in Oracle Database 11g Release 1
Hope this helps. Regards Tim...
Back to the Top.
24 comments, read/add them...
Home | Articles | Scripts | Forums | Blog | Certification | Misc | Search | About
Copyright & Disclaimer
HTML CSS