Vous êtes sur la page 1sur 2

Exp Imp These tools are used to transfer data from one oracle database to another oracle database.

You Export tool to export data from source database, and Import tool to load data into the target database. When you export tables from source datab ase export tool will extracts the tables and puts it into the dump file. This d ump file is transferred to the target database. At the target database the Impor t tool will copy the data from dump file to the target database. From Ver. 10g Oracle is recommending to use Data Pump Export and Import tools, w hich are enhanced versions of original Export and Import tools. The export dump file contains objects in the following order: Type definitions Table definitions Table data Table indexes Integrity constraints, views, procedures, and triggers Bitmap, function-based, and domain indexes When you import the tables the import tool will perform the actions in the follo wing order, new tables are created, data is imported and indexes are built, trig gers are imported, integrity constraints are enabled on the new tables, and any bitmap, function-based, and/or domain indexes are built. This sequence prevents data from being rejected due to the order in which tables are imported. This seq uence also prevents redundant triggers from firing twice on the same data Invoking Export and Import You can run Export and Import tool in two modes Command Line Mode Interactive Mode When you just type exp or imp at o/s prompt it will run in interactive mode i.e. these tools will prompt you for all the necessary input. If you supply command line arguments when calling exp or imp then it will run in command line mode.

Command Line Parameters of Export tool You can control how Export runs by entering the EXP command followed by various arguments. To specify parameters, you use keywords: Format: EXP KEYWORD=value or KEYWORD=(value1,value2,...,valueN) Example: EXP SCOTT/TIGER GRANTS=Y TABLES=(EMP,DEPT,MGR) or TABLES=(T1:P1,T1:P2), if T1 is partitioned table Keyword Description (Default) -------------------------------------------------------------USERID username/password BUFFER size of data buffer FILE COMPRESS GRANTS output files (EXPDAT.DMP) import into one extent (Y) export grants (Y)

INDEXES DIRECT LOG ROWS

export indexes (Y) direct path (N) log file of screen output export data rows (Y)

CONSISTENT cross-table consistency(N) FULL export entire file (N) OWNER list of owner usernames TABLES list of table names RECORDLENGTH length of IO record INCTYPE incremental export type RECORD track incr. export (Y) TRIGGERS export triggers (Y) STATISTICS analyze objects (ESTIMATE) PARFILE parameter filename CONSTRAINTS export constraints (Y) OBJECT_CONSISTENT transaction set to read only during object export (N) FEEDBACK display progress every x rows (0) FILESIZE maximum size of each dump file FLASHBACK_SCN SCN used to set session snapshot back to FLASHBACK_TIME time used to get the SCN closest to the specified time QUERY select clause used to export a subset of a table RESUMABLE suspend when a space related error is encountere d(N) RESUMABLE_NAME text string used to identify resumable statement RESUMABLE_TIMEOUT wait time for RESUMABLE TTS_FULL_CHECK perform full or partial dependency check for TTS TABLESPACES list of tablespaces to export TRANSPORT_TABLESPACE export transportable tablespace metadata (N) TEMPLATE template name which invokes iAS mode export The Export and Import tools support four modes of operation ? ? ? ? FULL OWNER TABLES TABLESPACE :Exports all the objects in all schemas :Exports objects only belonging to the given OWNER :Exports Individual Tables :Export all objects located in a given TABLESPACE.

Vous aimerez peut-être aussi