oracle exp export table structure:
exp username / pwd @sid File = D: \ db1.dmp owner = (username) rows = n;
the above command, remove the rows = n parameter, all of the tables will also export the data.
Parameters
Keyword Description (default) Keyword Description (default)
------------------------------------ --------------------------------------
USERID username / password FULL export entire file (N)
bUFFER data buffer size oWNER owner user name list
fILE output file (EXPDAT.DMP) tABLES list of table names
COMPRESS into a region (Y) RECORDLENGTH IO record length
GRANTS export permission (Y) INCTYPE incremental export type
iNDEXES export index (Y) the RECORD tracking incremental export (Y)
the dIRECT direct path (N) tRIGGERS export triggers (Y)
LOG screen output STATISTICS log file analysis object (the ESTIMATE)
ROWS export data lines (Y) PARFILE parameter file name
CONSISTENT cross table consistency CONSTRAINTS export constraints (the Y)
the FEEDBACK display progress every x (0)
FILESIZE each dump file the maximum size of the
SCN FLASHBACK_SCN for callback session snapshot
FLASHBACK_TIME to get closest to the specified time period the SCN
selection QUERY used to derive a subset of the table clause
pending (N) RESUMABLE when an error is encountered and space-related
RESUMABLE_NAME recoverable statement is used to identify a text string
latency RESUMABLE_TIMEOUT RESUMABLE of
TTS_FULL_CHECK perform full or partial inspection TTS correlation
listing tABLESPACES to export the tablespace
spatial metadata (N) TRANSPORT_TABLESPACE derived can be transmitted
TEMPLATE call mode deriving iAS the template name
Here comes create the table space and create a user:
- Create a table space armyoa
the Create TABLESPACE testoa
logging datafile 'D: \ the Oracle \ oradata \ orcl \ testoa.DBF'
size 32M 32M Maxsize the Next AUTOEXTEND ON 20480M extent local Management;
- create armyoa temporary table space
the Create the temporary tABLESPACE testoa_temp
tempfile 'D: \ the Oracle \ oradata \ orcl \ testoa_temp.DBF'
size 32M 32M Maxsize the Next AUTOEXTEND ON 20480M extent local Management;
the Create the User testoa
IDENTIFIED by testoa
default tABLESPACE testoa
the temporary tABLESPACE testoa_TEMP;
- Grant / Revoke Role privileges
Grant DBA to testoa;
Oracle introduced IMP:
IMP username / pwd @sid file = D: \ db1.dmp ignore = y full = y
parameters:
Keyword Description (default) Keyword Description (default)
--------------------- -------------------------------------------------- ---
USERID username / password FULL import entire file (N)
bUFFER data buffer size FROMUSER list of owner usernames
fILE input files (EXPDAT.DMP) TOUSER list of usernames
SHOW just list file contents (N) tABLES table name list
iGNORE ignore create errors (N) length RECORDLENGTH IO record
GRANTS import permissions (Y) INCTYPE incremental import type
iNDEXES import indexes (Y) COMMIT submitted array insert (N)
rOWS import data rows (Y) PARFILE parameter file name
LOG screen CONSTRAINTS output log file import limit (the Y)
DESTROY overwrite tablespace data file (N)
INDEXFILE table / index information into the specified file
SKIP_UNUSABLE_INDEXES skip unusable indexes Maintenance (N)
the FEEDBACK display progress every x (0)
TOID_NOVALIDATE skip authentication ID specified type
the maximum size of each dump file FILESIZE
STATISTICS always import precomputed statistics
hang RESUMABLE when an error is encountered and space-related (N)
RESUMABLE_NAME used to identify recoverable statement text string
RESUMABLE_TIMEOUT RESUMABLE waiting time
cOMPILE compile procedures, packages, and functions (Y)
the following keywords tablespaces only transmitted
spatial metadata (N) TRANSPORT_TABLESPACE introduced transmissible
tABLESPACES to be transmitted to the database table space
DATAFILES the data to be transmitted to the database files
the user has TTS_OWNERS transportable tablespace centralized data
exp username / pwd @sid File = D: \ db1.dmp owner = (username) rows = n;
the above command, remove the rows = n parameter, all of the tables will also export the data.
Parameters
Keyword Description (default) Keyword Description (default)
------------------------------------ --------------------------------------
USERID username / password FULL export entire file (N)
bUFFER data buffer size oWNER owner user name list
fILE output file (EXPDAT.DMP) tABLES list of table names
COMPRESS into a region (Y) RECORDLENGTH IO record length
GRANTS export permission (Y) INCTYPE incremental export type
iNDEXES export index (Y) the RECORD tracking incremental export (Y)
the dIRECT direct path (N) tRIGGERS export triggers (Y)
LOG screen output STATISTICS log file analysis object (the ESTIMATE)
ROWS export data lines (Y) PARFILE parameter file name
CONSISTENT cross table consistency CONSTRAINTS export constraints (the Y)
the FEEDBACK display progress every x (0)
FILESIZE each dump file the maximum size of the
SCN FLASHBACK_SCN for callback session snapshot
FLASHBACK_TIME to get closest to the specified time period the SCN
selection QUERY used to derive a subset of the table clause
pending (N) RESUMABLE when an error is encountered and space-related
RESUMABLE_NAME recoverable statement is used to identify a text string
latency RESUMABLE_TIMEOUT RESUMABLE of
TTS_FULL_CHECK perform full or partial inspection TTS correlation
listing tABLESPACES to export the tablespace
spatial metadata (N) TRANSPORT_TABLESPACE derived can be transmitted
TEMPLATE call mode deriving iAS the template name
Here comes create the table space and create a user:
- Create a table space armyoa
the Create TABLESPACE testoa
logging datafile 'D: \ the Oracle \ oradata \ orcl \ testoa.DBF'
size 32M 32M Maxsize the Next AUTOEXTEND ON 20480M extent local Management;
- create armyoa temporary table space
the Create the temporary tABLESPACE testoa_temp
tempfile 'D: \ the Oracle \ oradata \ orcl \ testoa_temp.DBF'
size 32M 32M Maxsize the Next AUTOEXTEND ON 20480M extent local Management;
the Create the User testoa
IDENTIFIED by testoa
default tABLESPACE testoa
the temporary tABLESPACE testoa_TEMP;
- Grant / Revoke Role privileges
Grant DBA to testoa;
Oracle introduced IMP:
IMP username / pwd @sid file = D: \ db1.dmp ignore = y full = y
parameters:
Keyword Description (default) Keyword Description (default)
--------------------- -------------------------------------------------- ---
USERID username / password FULL import entire file (N)
bUFFER data buffer size FROMUSER list of owner usernames
fILE input files (EXPDAT.DMP) TOUSER list of usernames
SHOW just list file contents (N) tABLES table name list
iGNORE ignore create errors (N) length RECORDLENGTH IO record
GRANTS import permissions (Y) INCTYPE incremental import type
iNDEXES import indexes (Y) COMMIT submitted array insert (N)
rOWS import data rows (Y) PARFILE parameter file name
LOG screen CONSTRAINTS output log file import limit (the Y)
DESTROY overwrite tablespace data file (N)
INDEXFILE table / index information into the specified file
SKIP_UNUSABLE_INDEXES skip unusable indexes Maintenance (N)
the FEEDBACK display progress every x (0)
TOID_NOVALIDATE skip authentication ID specified type
the maximum size of each dump file FILESIZE
STATISTICS always import precomputed statistics
hang RESUMABLE when an error is encountered and space-related (N)
RESUMABLE_NAME used to identify recoverable statement text string
RESUMABLE_TIMEOUT RESUMABLE waiting time
cOMPILE compile procedures, packages, and functions (Y)
the following keywords tablespaces only transmitted
spatial metadata (N) TRANSPORT_TABLESPACE introduced transmissible
tABLESPACES to be transmitted to the database table space
DATAFILES the data to be transmitted to the database files
the user has TTS_OWNERS transportable tablespace centralized data
Reproduced in: https: //my.oschina.net/u/2552902/blog/543901