Oracle Backup (exp, EXPDP)
--Export Tables by user
EXPDP Bdcdj/[email protected] SCHEMAS=BDCDJ directory=a dumpfile=bdcdj.dmp
--Export table by table name
EXPDP Scott/[email protected] tables=emp,dept dumpfile=expdp.dmp directory=dpdata1;
--Export Tables by query criteria
EXPDP Scott/[email protected] directory=dpdata1 dumpfile=expdp.dmp tables=emp query= ' WHERE deptno=20 ';
--Export tables by table space
EXPDP System/manager directory=dpdata1 dumpfile=tablespace.dmp tablespaces=temp,example;
--Guide the entire database
EXPDP System/manager directory=dpdata1 dumpfile=full.dmp full=y;
--Normal backup
Exp Bdcdj/[email protected] file=e:\bdcdj.dmp OWNER=BDCDJ
--Normal backup single sheet
Exp System/[email protected] file=d:\daochu.dmp tables= (table1,table2)
--------------------------------------------------------------------------------------------------------------- -------
Oracle Restore (IMP, IMPDP)
--Import Table
IMPDP Sde/[email protected] SCHEMAS=BDCDJ directory=a dumpfile=bdcdj.dmp
--Import Table space
IMPDP System/manager directory=dpdata1 dumpfile=tablespace.dmp tablespaces=example;
--Import Database
IMPDP System/manager directory=dump_dir dumpfile=full.dmp full=y;
--Append Data
IMPDP system/manager directory=dpdata1 dumpfile=expdp.dmp schemas=system table_exists_action
--Change the owner of the table
IMPDP system/manager directory=dpdata1 dumpfile=expdp.dmp tables=scott.dept remap_schema=scott:system;
--Restore a single table
Imp sde/[email protected] file=e:\xx.dmp tables= table name
Imp sde/[email protected] file=e:\sde_t_xtsz.dmp Tables=t_xtsz
--Normal restore
Imp sde/[email protected] file=e:\nb\sde.dmp fromuser=sde touser=sde buffer=99999999 log= ' E:\nb\sde.log '
--2 Import the table table1 in D:\daochu.dmp
Imp system/[email protected] file=d:\daochu.dmp tables= (table1)
Note: This is what I use at work. This is usually the usual backup restore. I hope we have a reference for you. Note The buffer=99999999 is due to the large case of the imported database file. To prevent the loss of data. If fewer tables are found at restore time. My suggestion is to restore the empty template library again. This will all be restored.
Methods for Oracle Backup (EXPDP, exp) and restore (imp, IMPDP)