Example on Data Pump EXPDP IMPDP Parfile Option

Advantages of using parfile expdp impdp
  1. You can hide the passwords from the command prompt by putting the password in the parfile. Otherwise if you mention the password in the command prompt, it will show up in the ps –ef command.
  2. The length of the command which you can type in the Operating system command line is limited. You cannot type a very lengthy expdp / impdp command with more number of arguments. In this situation you can create a parameter file(parfile) and run with the datapump.
See One Example
$ cat exp.par
userid=scott/tiger
job_name=query_export
query=scott.emp:"WHERE ENAME in ('JAMES', 'TURNER')"
tables=scott.emp
directory=EXP_DIR
dumpfile=QUERY_EXP.dmp
logfile=QUERY_EXP.log

$ expdp parfile=exp.par

Export: Release 11.2.0.2.0 - Production on Thu May 24 03:07:53 2012

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
Starting "SCOTT"."QUERY_EXPORT":  scott/******** parfile=exp.par
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "SCOTT"."EMP"                             8.093 KB       2 rows
Master table "SCOTT"."QUERY_EXPORT" successfully loaded/unloaded
******************************************************************************
Dump file set for SCOTT.QUERY_EXPORT is:
  /dbfs_direct/FS1/QUERY_EXP.dmp
Job "SCOTT"."QUERY_EXPORT" successfully completed at 03:08:04


DBA Tips Data Pump Reference

0 comments:

Post a Comment

 

dba topics. Copyright 2011-16 All Rights Reserved | Site Map | Contact | Disclaimer | Google