Query Parameter in Oracle Datapump

Опубликовано: 04 Октябрь 2024
на канале: Parag Mahalle
2,101
74

Hello Friends
Today, In this video I used to show you
How to Used Data pump Query Parameter.
In Query Parameter we can take export backup using particular query.
Suppose iwant to take a export backup of EMP table but in this table i want to take backup only department no 20.
so it is possible .

please watch this video and subscribe

In Some Methods i am showing you.

Method 1: (Using Parameter File)
------------------------------------------------------------
1. Create Table Test. (Create table scott.test as select * from scott.emp;)

2. Create Par file.
------------------------------------------------------------
directory=dump
dumpfile=d1.dmp
tables='SCOTT . TEST'
query=TEST:"WHERE deptno=20"
----------------------------------------------------------------
Save this file test.par
---------------------------------------------------------------
3. Go to Command Prompt
Export
expdp system/admin parfile='/u01/app/parag/test.par'

 Import
impdp system/admin directory=dump dumpfile=d1.dmp tables='SCOTT . TEST'
-------------------------------------------------------------------------------------
Method 2:
------------------------------------------------------------
1. Create Table Test. (Create table scott.test as select * from scott.emp;)
2. Go to Command Prompt
Export
expdp system/admin directory=dump dumpfile=d2.dmp tables='SCOTT . TEST '
query=TEST:\"WHERE deptno=20\"

 Import
impdp system/admin directory=dump dumpfile=d2.dmp tables='SCOTT . TEST '
-----------------------------------------------------------------------------------------------------------