Solved

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

Posted on 2011-03-02
3
301 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 500 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
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.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

726 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