?
Solved

How to create an Oracle database dump, based on certain conditions

Posted on 2011-03-02
3
Medium Priority
?
302 Views
Last Modified: 2012-05-11
Hi,

I need to create a dump of a database, based on certain criteria.

I only want certain data in the database,  not all, for example " where no=9", that is all the data that should be included in certain tables, and in others for example "where nom=9".

Is this poosible?

Please advise.
0
Comment
Question by:Lalla Belle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 15

Expert Comment

by:Aaron Shilo
ID: 35016228
hi

use datapump with the QUERY option to filter data from the exported table
0
 
LVL 15

Expert Comment

by:Aaron Shilo
ID: 35016237
0
 
LVL 12

Accepted Solution

by:
Praveen Kumar Chandrashekatr earned 2000 total points
ID: 35016344
hi,

please let us know which version of database you are using.

if it is 10g you can use expdp which is a Server based tool
Before starting data pump you have to create directory as user ‘sys’ and grant ‘sys’ read/write privileges:

connect system/manager@o10f
create directory <directory_name> as '<Directory_Location>';
grant read,write on directory <directory_name>  to <username>;
cross check using below query.
select * from dba_directories;

Execute the expdb
> expdp hr/hr parfile=emp_query.par

The contents of the emp_query.par file are as follows:

QUERY=employees:'"WHERE department_id > 10 AND salary > 10000"'
NOLOGFILE=y
DIRECTORY=<Directory_name>
DUMPFILE=exp1.dmp

for more info check this link.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/dp_export.htm#BEHHDHFE
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question