Common Oracle exp tools

Source: Internet
Author: User

The following is an introduction to Oracle exp, a commonly used data export tool EXP. We all know that Oracle EXP is a tool for the client, which can be used on the Oracle client and the Oracle server. When using the EXP tool on the Oracle client, it must contain a connection string;

When using the EXP tool on the Oracle server, strings are not allowed. Export includes three modes: export table, export scheme, and export database.

1) Export the table

To export a table, you can use the EXP tool to store the structure and data of one or more TABLES in the OS file. to export a table, you can use the TABLES option.

Normal users can export all tables of their own solutions. However, to export tables of other schemes, this user must have the EXP_FULL_DATABASE role or DBA role. In addition, when you export a table, all indexes, triggers, and constraints of the corresponding table are exported by default. The following uses the SYSTEM user to export the SCOTT. DEPT table as an example:

 
 
  1. exp system/Oracle@charge TABLE=scott.dept,scott.emp FILE=tab1.dmp 

2) Export Solution

The export scheme is to use Oracle EXP tool to store all the object records in one or more schemes to the OS file, and the export table is completed using the OWNER option.

Normal users can export their own solutions. However, to export other solutions, the user must have the DBA role or the EXP_FULL_DATABASE role. If you want to export all objects in your own scheme, you can leave the OWNER option Unspecified. The following uses the SYSTEM user to export all objects in the SCOTT scheme as an example. The example is as follows:

 
 
  1. exp system/Oracle@charge OWNER=scott FILE=schemal.dmp 

The above is the command line method for data export. The EXP tool can also export data in interactive mode.

1) Export table Interaction Mode)

 
 
  1. [Oracle@ora-asm3 dbs]$ exp 

Export: Release 10.2.0.1.0-Production on Monday June 16 16:24:26 2008

 
 
  1. Copyright (c) 1982, 2005, Oracle. All rights reserved. 

Username: charge enter user name

Password: enter the Password

 
 
  1. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production  
  2. With the Partitioning, OLAP and Data Mining options  

Enter array fetch buffer size: 4096> input buffer size, which can be customized by default. If the data file is large, we recommend that you set a larger value.

Export file: expdat. dmp> charge01.dmp: Enter the exported file name, which must use the ". dmp" file as the extension.

(2) U (sers), or (3) T (ables): (2) U> t input and export type. The default value is the user, that is, the scheme. Enter t here, export table

Export table data (yes/no): yes> whether to Export data in the table. If NO is selected, the table structure is exported.

Compress extents (yes/no): yes> whether to Compress data

 
 
  1. Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set  
  2. About to export specified tables via Conventional Path ...  

Table (T) or Partition (T: P) to be exported: (RETURN to quit)> clients input Table name

Start exporting clients table data

 
 
  1. . . exporting table CLIENTS 10 rows exported 

Table (T) or Partition (T: P) to be exported: (RETURN to quit)> if no data is to be exported, press enter to exit.

 
 
  1. Export terminated successfully without warnings. 

A message is displayed, indicating that the export is successful. No alarm is triggered.
2) Export the scheme interaction method)

 
 
  1. [Oracle@ora-asm3 dbs]$ exp 

Export: Release 10.2.0.1.0-Production on Monday June 16 16:23:47 2008

 
 
  1. Copyright (c) 1982, 2005, Oracle. All rights reserved. 

Username: charge enter user name

Password: enter the Password

 
 
  1. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production  
  2. With the Partitioning, OLAP and Data Mining options  

Enter array fetch buffer size: 4096> input buffer size, which can be customized by default. If the data file is large, we recommend that you set a larger value.

Export file: expdat. dmp> charge. dmp: Enter the exported file name, which must use ". dmp" as the extension.

(2) U (sers), or (3) T (ables): (2) U> u input and export type, the default is the user solution), you can press enter directly, you can also enter u.

Export grants (yes/no): yes> Import Permission

Export table data (yes/no): yes> whether to Export data in the table. If NO is selected, the table structure is exported.

Compress extents (yes/no): yes> whether to Compress data

 
 
  1. Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set  
  2. . exporting pre-schema procedural objects and actions  
  3. . exporting foreign function library names for user CHARGE  
  4. . exporting PUBLIC type synonyms  
  5. . exporting private type synonyms  
  6. . exporting object type definitions for user CHARGE  
  7. About to export CHARGE's objects ...  
  8. . exporting database links  
  9. . exporting sequence numbers  
  10. . exporting cluster definitions  
  11. . about to export CHARGE's tables via Conventional Path ...  
  12. . . exporting table BALANCE 0 rows exported  
  13. . . exporting table BALANCEFINISHED 0 rows exported  
  14. ………………  
  15. . exporting synonyms  
  16. . exporting views  
  17. . exporting stored procedures  
  18. . exporting operators  
  19. . exporting referential integrity constraints  
  20. . exporting triggers  
  21. . exporting indextypes  
  22. . exporting bitmap, functional and extensible indexes  
  23. . exporting posttables actions  
  24. . exporting materialized views  
  25. . exporting snapshot logs  
  26. . exporting job queues  
  27. . exporting refresh groups and children  
  28. . exporting dimensions  
  29. . exporting post-schema procedural objects and actions  
  30. . exporting statistics  
  31. Export terminated successfully without warnings.  

A message is displayed, indicating that the export is successful. No alarm is triggered.

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.