Oracle PL/SQL Developer import and export data

Source: Internet
Author: User

I encountered a lot of trouble when I recently used Oracle to import and export data! Then I carefully studied the oracle database and summarized several command methods for import and export for future reference.

Data export:

1. Export the database test completely, and the user name system password manager is exported to d:/daochu. dmp.

Exp system/manager @ test file = d:/daochu. dmp full = y

2. Export the tables of system users and sys users in the database

Exp system/manager @ test file = d:/daochu. dmp owner = (system, sys)

3. Export the inner_policy and policy_staff_relat tables in the database.

Exp aichannel/aichannel @ testdb2 file = d:/data/newsmgnt. dmp tables = (inner_policy, policy_staff_relat)

4. Export the data with the field filed1 in table 1 in the database starting with "00"

Exp system/manager @ test file = d:/daochu. dmp tables = (table1) query =/"where filed1 like 00% /"

The above is a commonly used export. For compression, you can use winzip to compress the dmp file. You can also add compress = y to the command above.

Data Import:

1. import data from d:/daochu. dmp to the test database.

Imp system/manager @ test file = d:/daochu. dmp imp aichannel/aichannel @ hust full = y file = d:/data/newsmgnt. dmp ignore = y

The above may be a problem, because some tables already exist, and then it will report an error, the table will not be imported. Add ignore = y to the end.

2. Import table 1 in d:/daochu. dmp

Imp system/manager @ test file = d:/daochu. dmp tables = (table1)

The preceding import and export operations are sufficient. In many cases, you must first completely delete the table and then import it.

Note: If the operator has sufficient permissions, a prompt is displayed. Databases can be connected. You can use tnsping test to obtain whether the database test can be connected.

The above records are only the most basic methods for importing and exporting oracle data. In actual applications, there are various factors that affect the Import and Export results. Therefore, you must use these basic commands flexibly, however, we also need to make overall plans for the entire oracle operating environment.

Related Article

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.