Re: Selective export

From: Ian Cary <Ian.Cary_at_ons.gsi.gov.uk>
Date: Mon, 9 May 2011 12:46:24 +0100
Message-ID: <OF34AACDBA.771A281C-ON8025788B.00407DDF-8025788B.0040ADDD_at_ons.gsi.gov.uk>



If you can use datapump you can use something like this;

expdp system directory=home dumpfile=test.dmp tables=scott.emp,scott.dept query=scott.emp:'"where empno = 7369"',scott.dept:'"where deptno =10"'

where home is an oracle directory you have already created with the create dorectory command.

Cheers,

Ian

|---------+----------------------------->

| | abhishek.gurung_at_ho|
| | tmail.com |
| | Sent by: |
| | oracle-l-bounce_at_fr|
| | eelists.org |
| | |
| | |
| | 09/05/2011 11:16 |
| | Please respond to |
| | abhishek.gurung |
| | |
|---------+-----------------------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| | | | To: nigel.cl.thomas_at_googlemail.com, oracle-l_at_freelists.org | | cc: | | Subject: RE: Selective export | | | | | >--------------------------------------------------------------------------------------------------------------------------------------------------|

Hi

Thanks for your reply.
What I want is like this
I need selected data from three tables not whole tables e.g

select * from emp where empid = 1
select * from dept where deptid = 2
select * from countries where countryid = 3

Regards
Abhishek
Date: Mon, 9 May 2011 08:09:45 +0100
Subject: Re: Selective export
From: nigel.cl.thomas_at_googlemail.com
To: abhishek.gurung_at_hotmail.com
CC: oracle-l_at_freelists.org

(Taken from http://wiki.oracle.com/page/Oracle+export+and+import+)

       To export specific tables to disk:

  • Login to server which has an Oracle client exp SYSTEM/password FILE=expdat.dmp TABLES=(scott.emp,hr.countries) -the above command uses two users : scott and hr exp <user>/<password> FILE=scott.dmp TABLES=(emp,dept) the above is only for one user

Note that in first case user doesn't have to be SYSTEM, but does need access to the tables being exported.

HTH Nigel

On 9 May 2011 07:50, Abhishek Gurung <abhishek.gurung_at_hotmail.com> wrote:

      Hi

      I want to export selective data from three tables in one dump.
      Can anyone suggest me how it can be done?
      If it is not possible can I combine the three dump files into one?

      Thankyou.

      Regards
      Abhishek


This email was received from the INTERNET and scanned by the Government Secure Intranet anti-virus service supplied by Cable&Wireless Worldwide in partnership with MessageLabs. (CCTM Certificate Number 2009/09/0052.) In case of problems, please call your organisation?x02019;s IT Helpdesk. Communications via the GSi may be automatically logged, monitored and/or recorded for legal purposes.

For the latest data on the economy and society consult National Statistics at http://www.ons.gov.uk


Please Note: Incoming and outgoing email messages are routinely monitored for compliance with our policy on the use of electronic communications


Legal Disclaimer : Any views expressed by the sender of this message are not necessarily those of the Office for National Statistics


The original of this email was scanned for viruses by the Government Secure Intranet virus scanning service supplied by Cable&Wireless Worldwide in partnership with MessageLabs. (CCTM Certificate Number 2009/09/0052.) On leaving the GSi this email was certified virus free. Communications via the GSi may be automatically logged, monitored and/or recorded for legal purposes.

--
http://www.freelists.org/webpage/oracle-l
Received on Mon May 09 2011 - 06:46:24 CDT

Original text of this message