8/9/13

Using Oracle 10g DATA PUMP Utility

Oracle DBA Learn Oracle 11g Database Admin step by step

DATA PUMP Utility
Oracle Database Administration Learn Oracle 11g database administration step by step Oracle DBA Interview Questions Frequently asked Oracle DBA Interview Questions Download Oracle 11g Software Links for downloading Oracle 11g software Installation guides for installing Oracle under Linux, Solaris

Oracle SQL Tutorial for Oracle SQL

Oracle DBA Interview Questions Most asked Oracle DBA Interview Questions.
Technical 60 Questions Backup & Recovery 42 Questions Unix For Oracle DBA 20 Questions

Download Oracle 11g Software Links to Download Oracle 11g for Linux, Windows etc.

Starting with Oracle 10g, Oracle has introduced an enhanced version of EXPORT and IMPORT utility known as DATA PUMP. Data Pump is similar to EXPORT and IMPORT utility but it has many advantages. Some of the advantages are: Most Data Pump export and import operations occur on the Oracle database server. i.e. all the dump files are created in the server even if you run the Data Pump utility from client machine. This results in increased performance because data is not transferred through network.

You can Stop and Re-Start export and import jobs. This is particularly useful if you have started an export or import job and after some time you want to do some other urgent work.

The ability to detach from and reattach to long-running jobs without affecting the job itself. This allows DBAs and other operations personnel to monitor jobs from multiple locations.

The ability to estimate how much space an export job would consume, without actually performing the export

Support for an interactive-command mode that allows monitoring of and interaction with ongoing jobs

Using Data Pump Export Utility
To Use Data Pump, DBA has to create a directory in Server Machine and create a Directory Object in the database mapping to the directory created in the file system. The following example creates a directory in the filesystem and creates a directory object in the database and grants privileges on the Directory Object to the SCOTT user. $ m k d i rm y _ d u m p _ d i r $ s q l p l u s E n t e rU s e r : /a ss y s d b a S Q L > c r e a t ed i r e c t o r yd a t a _ p u m p _ d i ra s‘ / u 0 1 / o r a c l e / m y _ d u m p _ d i r ’ ; Now grant access on this directory object to SCOTT user S Q L >g r a n tr e a d , w r i t eo nd i r e c t o r yd a t a _ p u m p _ d i rt os c o t t ;
www.oracle-dba-online.com/data_pump_utility.htm 1/3

dmp and so on. CONSTRAINTS.oracle-dba-online.tbs_6 Excluding and Including Objects during Export You can exclude objects while performing a export by using EXCLUDE option of Data Pump utility.com/data_pump_utility. it will export only those tables of Scott’s schema whose name starts with “A” Similarly you can also exclude INDEXES. full02. $ e x p d ps c o t t / t i g e rD I R E C T O R Y = d a t a _ p u m p _ d i rD U M P F I L E = s c o t t _ s c h e m a .8/9/13 Using Oracle 10g DATA PUMP Utility Example of Exporting a Full Database To Export Full Database. and hence export will fail. A L I Exporting Individual Tables using Data Pump Export You can use Data Pump Export utility to export individual tables. Similarly you can also INCLUDE option to only export certain objects like this $ e x p d ps c o t t / t i g e rD I R E C T O R Y = d a t a _ p u m p _ d i rD U M P F I L E = s c o t t _ s c h e m a . For example you are exporting a schema and don’t want to export tables whose name starts with “A” then you can type the following command $ e x p d ps c o t t / t i g e rD I R E C T O R Y = d a t a _ p u m p _ d i rD U M P F I L E = s c o t t _ s c h e m a .t b s _ 6 The above will export all the objects located in tbs_4. In this situation you can create multiple dump files by typing the following command $ e x p d p s c o t t / t i g e rF U L L = yD I R E C T O R Y = d a t a _ p u m p _ d i rD U M P F I L E = f u l l % U . the following will export only those rows of employees tables whose salary is above 10000 and whose dept id is 10. d m p S C H E M A S = S C O T TI N C L U D E = T A B L E : ” l i k e‘ A % ’ ” This is opposite of EXCLUDE option i. l o gJ O B _ N A M E = m y f u l l J o b This will create multiple dump files named full01. If you want to export objects of multiple schemas you can specify the following command $ e x p d ps c o t t / t i g e rD I R E C T O R Y = d a t a _ p u m p _ d i rD U M P F I L E = s c o t t _ s c h e m a . full03. d m p S C H E M A S = S C O T T You can omit SCHEMAS since the default mode of Data Pump export is SCHEMAS only.htm 2/3 . d m p S C H E M A S = S C O T T . d m p T A B L E S = e m p l o y e e s .dmp in the directory on the server /u01/oracle/my_dump_dir In some cases where the Database is in Terabytes the above command will not feasible since the dump file size will be larger than the operating system limit. www.dmp.dmp. d m p F I L E S I Z E = 5 G L O G F I L E = m y f u l l e x p . GRANTS. d m p S C H E M A S = S C O T TE X C L U D E = T A B L E : ” l i k e‘ A % ’ ” Then all tables in Scott’s Schema whose name starts with “A “ will not be exported. Example of Exporting a Schema To export all the objects of SCOTT’S schema you can run the following export data pump command.t b s _ 5 .e. d e p a r t m e n t s E x p o r t i n gT a b l e sl o c a t e di naT a b l e s p a c e If you want to export tables located in a particular tablespace you can type the following command $ e x p d ph r / h rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = t b s . For Example. d m p T A B L E S P A C E S = t b s _ 4 . H R . l o gJ O B _ N A M E = m y f u l l J o b The above command will export the full database and it will create the dump file full. SCHEMA Using Query to Filter Rows during Export You can use QUERY option to export only required rows. give the following command $ e x p d p s c o t t / t i g e rF U L L = yD I R E C T O R Y = d a t a _ p u m p _ d i rD U M P F I L E = f u l l . The FILESIZE parameter specifies how much larger the dump file should be.tbs_5. j o b s . The following example shows the syntax to export tables $ e x p d ph r / h rD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = t a b l e s . d m p L O G F I L E = m y f u l l e x p . USER.

Convert Foxpro to MSSQL. you can suspend it.8/9/13 Using Oracle 10g DATA PUMP Utility e x p d ph r / h rQ U E R Y = e m p : ' " W H E R Ed e p t _ i d>1 0A N Ds a l>1 0 0 0 0 " ' N O L O G F I L E = yD I R E C T O R Y = d p u m p _ d i r 1D U M P F I L E = e x p 1 . d m p Suspending and Resuming Export Jobs (Attaching and Re-Attaching to the Jobs) You can suspend running export jobs and later on resume these jobs or kill these jobs using Data Pump Export.com/data_pump_utility. he can issue the C O N T I N U E _ C L I E N Tcommand to resume logging mode and restart the m y f u l l j o bjob. the user has locked his/her cabin. You can start a job in one client machine and then. Convert MS Access to MySQL. Convert Foxpro to MySQL. d m pL O G F I L E = m y f u l l e x p . After finishing his other work. Then he presses CTRL+C to enter into interactive mode. Search Web www. or you can restart the job from another client machine. the DBA wants to stop this job temporarily.oracle-dba-online. and processing status is output to the client. Convert CSV to MySQL. For Example. Convert MS Access to Oracle . Convert CSV to Oracle www. Afterwards when your work has been finished you can continue the job from the same client. Convert MS Access to MSSQL.htm 3/3 . where you stopped the job. suppose a DBA starts a full database export by typing the following command at one client machine CLNT1 by typing the following command $ e x p d ps c o t t / t i g e r @ m y d bF U L L = yD I R E C T O R Y = d a t a _ p u m p _ d i r D U M P F I L E = f u l l . Convert MSSQL to Oracle. Then he will get the Export> prompt where he can type interactive commands Now he wants to stop this export job so he will type the following command E x p o r t >S T O P _ J O B = I M M E D I A T E A r ey o us u r ey o uw i s ht os t o pt h i sj o b( [ y ] / n ) :y The job is placed in a stopped state and exits the client.com Forms Data Loader: Tool to load data into Oracle Applications using Macros and Forms Playback Useful Links: The Best Data Conversion Tools Convert MS SQL to MySQL. the DBA wants to resume the export job and the client machine from where he actually started the job is locked because. E x p o r t >C O N T I N U E _ C L I E N T A message is displayed that the job has been reopened.oracle-dba-online. if because of some work. l o gJ O B _ N A M E = m y f u l l J o b After some time. So now the DBA will go to another client machine and he reattach to the job by typing the following command $ e x p d ph r / h r @ m y d bA T T A C H = m y f u l l j o b After the job status is displayed. if he doesn’t want to continue with the export job. Note: After reattaching to the Job a DBA can also kill the job by typing KILL_JOB.

Sign up to vote on this title
UsefulNot useful