Solved

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

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle encryption 12 70
Database Design Dilemma 6 71
minium over 4 numeric columns for each row in oracle 2 52
oracle sql developer + get hour from datetime field 2 22
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to recover a database from a user managed backup

739 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