Oracle Database - Export Utility (exp)

Card Puncher Data Processing

About

Client Export utility.

See Oracle Database - Import (imp)

Modes

The Export utility supports four modes of operation:

Full

Full: Exports a full database. Only users with the EXP_FULL_DATABASE role can use this mode.

The FULL parameter specifies this mode.

Tablespace

Tablespace : Enables a privileged user to move a set of tablespaces from one Oracle database to another.

The TRANSPORT_TABLESPACE parameter specifies this mode.

User

user: Enables you to export all objects that belong to you (such as tables, grants, indexes, and procedures). A privileged user importing in user mode can import all objects in the schemas of a specified set of users.

The OWNER parameter specifies this mode in Export.

Example: Export all objects of a user

exp user/pwd@connectionString DIRECT=Y LOG=myLog.LOG OWNER=myUser FILE=myFile.dat 

In Oracle9 and higher, the Export utility always exports user data, including Unicode data, in the character sets of the Export server. (Character sets are specified at database creation.)

Then:

imp FILE=scheman FROMUSER=scheman TOUSER=scheman 

Example of Generations:

SELECT 'expdp SYSTEM/oracle ' ||
    'DUMPFILE=' || username || '_' || to_char(sysdate,'YYYYMMDD_HH24MI') || '.dmp ' ||
    'DIRECTORY=DPDIR ' ||
    'PARALLEL=' || cpuCount || ' ' ||
    'LOGFILE=' || username || '_' || to_char(sysdate,'YYYYMMDD_HH24MI') || '.log ' ||
    'schemas=' || username SQL
FROM 
dba_users users,
(select value as cpuCount from v$parameter where upper(name) = 'CPU_COUNT') cpu

Table

Table: Enables you to export specific tables and partitions. A privileged user can qualify the tables by specifying the schema that contains them. For any table for which a schema name is not specified, Export defaults to the exporter's schema name.

The TABLES parameter specifies this mode.

NLS Considerations

In Oracle9 and higher, most data is automaticaly exported in the character set of the database that is exported. The only exception to that, is that data-dictionary information is exported in the character set that is set in the NLS_LANG environment variable when making the export.

In pre-Oracle9 export, ALL data is exported in the character set that is set in the NLS_LANG environment variable when making the export.

set NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
exp user/pwd@connectionString DIRECT=Y LOG=myLog.LOG OWNER=myUser FILE=myFile.dat 

see Old Exp/Imp (not datapump) and NLS Considerations (Doc ID 15095.1)

Help

exp help=y

Documentation





Discover More
Card Puncher Data Processing
Oracle Database

Documentation about the Oracle database
Data Pump Sqldeveloper
Oracle Database - Data Pump - (Export|Import) Utilities

Oracle Data Pump works with the file system of the database whereas Export and Import utilities works with the client file system. Since Oracle Database 10g, Oracle Data Pump enables movement of data...
Card Puncher Data Processing
Oracle Database - Import (imp)

Import utility that can work on a remote computer (not on the server as ). See The Export utility always exports user data, including Unicode data, in the character sets of the Export server....



Share this page:
Follow us:
Task Runner