Export and import some blob and clob fields in oracle

Source: Internet
Author: User

Today, I encountered A problem. In database A and database B, the table structure is the same. to export some records to table A of database B,
The problem is that two identical tables in the two databases contain BLOB and CLOB fields. After thinking about it, I found a method for the moment,
Of course, I do not know whether there are any better tools, that is, using the exp and IMP of oracle itself, the method is:

1 exp XXX/XXX @ XXXX tables = (xxxx) file = c: \ xxx. dmp
Query = "where birthday> = to_date ('1970. 100', 'yyyy-mm-dd ')"

This is on the WINDOWS platform. For other platforms, note the double quotation marks escape:
Exp ..... Query = \ "where col1 \ <1000 \"
Exp ..... Query = \ "where col1 \ <'000000 ′\"


Or simply write it in a TXT file.
First, create a 1.txt file:

 

Tables = employee

File = f:/exp. dmp
Query = "where birthday> = to_date ('1970. 100', 'yyyy-mm-dd ')"


Then:

Exp user/user @ bsrun parfile1_1.txt


2 IMP, note that when importing, use the ignore = yes parameter to append records to the original table, which is very simple.

 

This article is from "jackyrong"
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.