MarioNote

December 9, 2009

Oracle Data Import / Export command (imp, exp) samples

Filed under: Database,Linux,Oracle,Software Development — mariojump @ 2:59 pm
Tags: , , , ,

There are occasions we need to export or import data from/to Oracle.

These are sample command line inputs to do so.  The database can be local (localhost, 127.0.0.1) or remote server.

$ exp db_username1/password_of_username1@127.0.0.1 TABLES=(db_username1.%) FILE=exportfile1.dat exportfile2.dat exportfile3.dat exportfile4.dat FILESIZE=1024MB INDEXES=n LOG=logfile.log

$ imp system/password_of_system@127.0.0.1 FROMUSER=(db_username) TOUSER=(maybe_another_db_username) FILE=./exportfile1.dat INDEXES=n GRANTS=y STATISTICS=RECALCULATE LOG=importlog.log

Advertisements

Create a free website or blog at WordPress.com.