This article represent how can use data pump with PARAFILE.
1. Create file with extension .par (Parameter File) in any directory like.
I have created in (D:\app\) name DATA_PUMP.par
2. Give parameter value. Like
My file contain this value
DIRECTORY=DATA_DIR
DUMPFILE=RND_TABLE.dmp
LOGFILE=RND_TABLE.log
TABLES=RND.DEPT,RND.EMP
3. Now execute with data pump. Like
C:\Users\rajib.pradhan>expdp "'/ as sysdba'" parfile=D:\app\DATA_PUMP.par
Export: Release 11.2.0.1.0 - Production on Fri Aug 15 00:10:45 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYS"."SYS_EXPORT_TABLE_01": "/******** AS SYSDBA" parfile=D:\app\DATA_PUMP.par
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 41.06 MB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/STATISTICS/ TABLE_STATISTICS
. . exported "RND"."EMP" 35.00 MB 524288 rows
. . exported "RND"."DEPT" 7.023 KB 28 rows
Master table "SYS"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
****************************** ****************************** ******************
Dump file set for SYS.SYS_EXPORT_TABLE_01 is:
D:\DUMP\RND_TABLE.DMP
Job "SYS"."SYS_EXPORT_TABLE_01" successfully completed at 00:11:43
C:\Users\rajib.pradhan>
========================================================
With Where Condition
DIRECTORY=DATA_DIR
DUMPFILE=RND_TABLE_QUERY.dmp
LOGFILE=RND_TABLE_QUERY.log
TABLES=RND.DEPT,RND.EMP
QUERY=RND.EMP:"WHERE DEPARTMENT_ID !=50 ORDER BY EMPLOYEE_ID"
C:\Users\rajib.pradhan>expdp "'/ as sysdba'" parfile=D:\app\DATA_PUMP.par
Export: Release 11.2.0.1.0 - Production on Fri Aug 15 00:37:18 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYS"."SYS_EXPORT_TABLE_01": "/******** AS SYSDBA" parfile=D:\app\DATA_PUMP.par
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 41.06 MB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "RND"."EMP" 9.265 KB 0 rows
. . exported "RND"."DEPT" 7.023 KB 28 rows
Master table "SYS"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYS.SYS_EXPORT_TABLE_01 is:
D:\DUMP\RND_TABLE_QUERY.DMP
Job "SYS"."SYS_EXPORT_TABLE_01" successfully completed at 00:37:35
No comments:
Post a Comment