exp/imp of oracle data processing

Oracle export/import data method 1

exp/imp tool:
1 Completely export database oracle01, DBA: sys, password: 123456; user name Scott password 123456 is exported to D:\emp.dmp

exp sys/123456@oracle01 file=d:\emp.dmp full=y

(exp user/[email protected]/orcl10g file=F:/fileSys.dmplog=F:/fileSys.log statistics=none tables=table01,table02,table03)
Parameters:
BUFFER size of data buffer
OWNER owner username List
rows=y export and import with data; rows=n export and import without data, only export table structure.
INDEXES Export index (Y)
GRANTS Export authority (Y)
TABLES List of table names
FILE Output file (EMP.DMP) location and file name
FULL Export entire file (N)
QUERY Clause for a subset of the selected export table

Full database export:
exp sys/123456 file=d:\full.dmp full=y
user export:
exp scott/123456 file=d:\scott.dmp OWNER=scott
user single table export:
exp scott/123456 file=d:\scott.dmp OWNER =scott tables=(emp)
exp scott/tiger tables=emp query=\"where job=\'salesman\' andsal\<1600\" file=/directory/scott2.dmp
Description: Add the query conditions for exporting emp in exp, job='salesman' and sal<1600

, import the whole library:
imp sys/123456 file=d:\full.dmp full=y
User mode:
IMP Scott/123456 BUFFER=64000 FILE=C:/scott.DMP FROMUSER=Scott TOUSER=Scott
so that all objects for user scott are imported into the file. The FROMUSER and TOUSER parameters must be specified so that the data
table schema can be imported:
EXP Scott/123456 BUFFER=64000 FILE=C:/emp.DMP OWNER=Scott TABLES=(emp)
The table emp of user Scott is imported.

The meaning of the Ignore parameter in Oracle's Exp/imp is:
if the parameter ignore=y is used, the data content in the exp file will be imported.
If the table has a unique keyword constraint, the unqualified conditions will not be imported
. If the table does not have a unique key Constraints of words will cause duplicate records
Explanation:
When a table (test) already exists in the database to be imported, if the table does not have a unique constraint, then add the parameter ignore=y when importing, and the data will be completely imported to the table, and no error is reported.
When the table already has unique constraints, especially the constraints of the primary key, only the records that do not exist in the primary key will be imported during the import. There will be warnings during the import process.
Using this principle, an incremental import can be done.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325168279&siteId=291194637