Oracle Database Import and Export and service

Source: Internet
Author: User
Execution environment: it can be executed in sqlplus. EXE or DoS (command line,
When dos can be executed, the \ ora81 \ bin installation directory in Oracle 8i is set to a global path,
The exp. EXE and imp. EXE files in this directory are used for import and export.
Oracle is written in Java. I think the sqlplus. EXE, exp. EXE, and imp. EXE files are packaged class files.
Sqlplus. EXE calls exp. EXE and imp. EXE to complete the import and export functions.

The following describes the Import and Export instances. You can import and export instances to the Import and Export instances, because the import and export operations are very simple.

Data Import:
1. import data from D: \ daochu. dmp to the test database.
IMP system/manager @ test file = D: \ daochu. dmp
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 following statement imports the user qhmis backed up by Oracle on disk C to the user qhmis database.
IMP qhmis/qhmis @ qhmis file = 'C: qhmis20060224.dmp 'ignore = n grants = y full = y

data export:
exp qhmis/qhmis @ qhmis file = 'd: \ backup \ qhmis \ qhmis20060526.dmp 'grants = y full = n
1. Export the database test completely. Use the User Name System Password Manager to D: \ daochu.
exp system/manager @ test file = D: \ daochu in DMP. 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 tables Table1 and Table2 in the database
exp system/manager @ test file = D: \ daochu. DMP tables = (Table1, table2)
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 '000000' \"
This is a common export method. You can use WinZip to compress the DMP file, however, you can add compress = y after the preceding command.

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.