Monday, 24 March 2014

DataPump II



DataPump export using Schema mode:-

$expdp test2/tes2 dumpfile=test2.dmp logfile=test2.log schemas=test2;

**Table Level:-
$expdp test2/test2 dumpfile=test2.dmp logfile=test.log directory=dump_dir1 tables=emp,dep,bonu
$expdp system/manager dumpfile=test2.dmp logfile=test2.log directory=dump_dir1      tables=test2.emp,dep,bonu


$impdp test/test dumpfile=test2.dmp logfile=imp.dmp directory=dump_dir1 tables=emp,dep,bonus

**Schema Level:-
$expdp dumpfile=schemsa.dmp logfile=shesma.log directory=dump_dir1 schemas=test

$impdp system/manager dumpfile=schema.dmp logfile=imp.log directory=dump_dir1 remap_schema=test:test5

**Tablespace Level:-
$expdp system/manager dumpfile=ts.dmp logfile=expts.log tablespaces=test01 directory=dump_dir1

$impdp system/manager dumpfile=ts.dmp logfile=impts.log remap_tablespace=test01 directory=dump_dir1


Transportable Tablespace:-
Make the tablespace read only
sql>alter tablespace zee read only;

$expdp dumpfile=tts.dmp logfile=ttsh.log transport_tablespaces=zee directory=dump_dir2

copy datafiles to the location of database where you want to import Tablespace

$impdp dumpfile=tts.dmp logfile=imptts.log transport_datafiles='/oradata/oracle/db/test/zee01.dbf' directory=dump_dir2
File Size:-
The FILESIZE parameter is purely optional, and it specifies the size of the dump file in bytes by default. You may use bytes, kilobytes, megabytes, and gigabytes to specify the FILESIZE parameter. If you don’t specify this parameter, the dump file has no limits on its size. If you use the FILESIZE parameter by specifying, say 10MB, as the maximum dump file size, your export will stop if your dump file reaches its size limit, and you can restart it after correcting the problem.$expdp test2/test2 directory=dump_dir1 dumpfile=expdat1.dmp filesize= 100KB schemas=test2

Directory:- 
You can use multiple export directory for export
$expdp system/manager dumpfile=dump_dir1:schema.dmp,dump_dir2:shcmea2.dmp logfile=shema.log schemas=test
Exclude:-
$expdp test/test dumpfile=shcmea2.dmp logfile=shema.log schemas=test directory=dump_dir1 EXCLUDE=TABLE:\"LIKE\'EMP%\'\"

Compression:-
By default, all metadata is compressed before it’s written out to an export dump file. You can disable compression by specifying a value of NONE for the COMPRESSION parameter, as shown here
$expdp test2/test2 directory=dump_dir1 dumpfile=expdat1.dmp compression=none schemas=test2

CONTENT:-
By using the CONTENT parameter, you can filter what goes into the export dump file. The CONTENT
parameter can take three values:
ALL exports both table data and table and other object definitions (metadata).
DATA_ONLY exports only table rows.
METADATA_ONLY exports only metadata.
$expdp test/test dumpfile=shcmea2.dmp logfile=shema.log schemas=test directory=dump_dir1  content=metadata_only

No comments:

Post a Comment

Ask your Questions....