Two methods of Oracle database Export and Oracle Import data (Oracle Import Export data) _oracle

Source: Internet
Author: User

Method One: Use the Pl/sql Developer tool to export:
Menu bar---->tools---->export Tables, the following figure, set the relevant parameters can be:

Method Two: Use CMD's Operation command to export, the details are as follows:
The 1:g:\oracle\product\10.1.0\client_1\network\admin directory has a Tnsname.ora file that reads as follows:

Copy Code code as follows:

Cmstar =
(DESCRIPTION =
(Address_list =
(address = (PROTOCOL = TCP) (HOST = 172.18.13.200) (PORT = 1521))
)
(Connect_data =
(service_name = Cmstar)
)
)

Where: Cmstar is the database name, host is the IP address, so you can follow the example above to manually add a data recording connection.

2: Use cmd to enter the command line
Input: tnsping Cmstar
is to test whether 172.18.13.200 is connected successfully

3: Import and Export, as follows:
Data export:
1 completely export database test, user Name System Password Manager exported to D:\daochu.dmp
Exp System/manager@test file=d:\daochu.dmp full=y
2 Exporting a table from the system user in the database to the SYS user
Expsystem/manager@testfile=d:\daochu.dmpowner= (System,sys)
3 Export the table table1, table2 in the database
Expsystem/manager@testfile=d:\daochu.dmptables= (Table1,table2)
4 Export the fields in the table table1 in the database filed1 with the data beginning with "00"
expsystem/manager@testfile=d:\daochu.dmptables= (table1) query=\ "Wherefiled1like ' 0% '"

The above is the common export, for compression I do not care, with WinZip DMP file can be very good compression.
But it's okay to add compress=y to the command behind it.

Import of data

1 Import the data from D:\DAOCHU.DMP into the test database.
Impsystem/manager@testfile=d:\daochu.dmp
There may be something wrong with it, because some tables already exist, and then it complains, and the table is not imported.
Just add ignore=y to the back.

2 Import the table table1 in D:\daochu.dmp
impsystem/manager@testfile=d:\daochu.dmptables= (table1)

Note: Exporting DMP data requires a user with permission to export the table, otherwise it cannot be exported.

Pl/sql Developer is the primary tool for importing or exporting databases in an Oracle database, this article mainly introduces the process of importing and exporting databases using Pl/sql developer, and describes some of the considerations when importing or exporting, and then we introduce them.

Export step:

1 Tools->export The User Object selection option to export the. sql file.

2 Tools->export tables-> Oracle export Selection option exports. dmp files.

Import Step:

Note: It is a good idea to delete the previous table before importing, except to import another database.
1 tools->import tables->sql inserts import. SQL file.
2 tools->import talbes->oracle Import and then imports DMP file.

Some notes:

Tools->export User Objects exports the build table statement, including the storage structure.
Tools->export tables contain three ways to export, three ways to export the table structure and data, as follows:
Oracle Export
SQL Insert
Pl/sql Developer

The first

is exported to the. dmp file format,. dmp files are binary, Cross-platform, can also include permissions, the efficiency is very good, the most widely used.
The second is exported as a. sql file, available as a text editor, but not as efficient as the first, which is suitable for small amounts of data import and export. It is particularly important to note that the table cannot have large characters (Blob,clob,long) and, if so, prompts that it cannot be exported (prompted as follows: table contains one or more long columns cannot export in SQL Format,user Pl/sql developer format instead).
The third is exported to the. Pde format,. PDE is a pl/sql developer own file format that can only be imported with Pl/sql developer and cannot be viewed with the editor.

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.