expdp tjxtcgs/IP69#
[email protected] dumpfile=‘SCHEMAS_TJXTCGS_FILE%date:~,4%-%date:~5,2%-%date:~8,2%.dmp‘ logfile=‘PM_NOFILE%date:~,2%.log‘ SCHEMAS=TJXTCGS
exp tjXXXXs/0000 file=E:\oracle\oradata\orcl\dtj_2010_2005_dm001.dmp tables=dtj_2005_dm001,dtj_2006_dm001,dtj_2007_dm001,dtj_2008_dm001,dtj_2009_dm001,dtj_20010_dm001
xxxxxxxxxx
1
1
exp tjXXXXs/0000 file=E:\oracle\oradata\orcl\dtj_2010_2005_dm001.dmp tables=dtj_2005_dm001,dtj_2006_dm001,dtj_2007_dm001,dtj_2008_dm001,dtj_2009_dm001,dtj_20010_dm001
(1)表方式,将指定表的数据导出/导入。
导出:
导出一张或几张表:
exp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1,table2 exp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1,table2
xxxxxxxxxx
3
1
exp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1,table2
2
3
exp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1,table2
exp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1:tablespaces1,table2:tablespaces2 exp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1:tablespaces1,table2:tablespaces2
xxxxxxxxxx
3
1
exp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1:tablespaces1,table2:tablespaces2
2
3
exp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1:tablespaces1,table2:tablespaces2
$ exp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1 query=\”where col1=\’…\’ and col2 \<…\” $ exp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1 query=\”where col1=\’…\’ and col2 \<…\”
xxxxxxxxxx
5
1
$ exp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1 query=\”where col1=\’…\’
2
and col2 \<…\”
3
4
$ exp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1 query=\”where col1=\’…\’
5
and col2 \<…\”
$ imp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1,table2 fromuser=dbuser touser=dbuser2 commit=y ignore=y $ imp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1,table2 fromuser=dbuser touser=dbuser2 commit=y ignore=y
xxxxxxxxxx
3
1
$ imp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1,table2 fromuser=dbuser touser=dbuser2 commit=y ignore=y
2
3
$ imp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1,table2 fromuser=dbuser touser=dbuser2 commit=y ignore=y
$ imp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1:tablespaces1,table2:tablespaces2 fromuser=dbuser touser=dbuser2 commit=y ignore=y $ imp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1:tablespaces1,table2:tablespaces2 fromuser=dbuser touser=dbuser2 commit=y ignore=y
xxxxxxxxxx
3
1
$ imp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1:tablespaces1,table2:tablespaces2 fromuser=dbuser touser=dbuser2 commit=y ignore=y
2
3
$ imp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1:tablespaces1,table2:tablespaces2 fromuser=dbuser touser=dbuser2 commit=y ignore=y
$ exp user/pwd file=/dir/xxx.dmp log=xxx.log owner=(xx,yy) $ exp user/pwd file=/dir/xxx.dmp log=xxx.log owner=(xx,yy)
xxxxxxxxxx
3
1
$ exp user/pwd file=/dir/xxx.dmp log=xxx.log owner=(xx,yy)
2
3
$ exp user/pwd file=/dir/xxx.dmp log=xxx.log owner=(xx,yy)
只导出数据对象,不导出数据 (rows=n )
$ exp user/pwd file=/dir/xxx.dmp log=xxx.log owner=user rows=n
xxxxxxxxxx
1
1
$ exp user/pwd file=/dir/xxx.dmp log=xxx.log owner=user rows=n
imp user/pwd file=/dir/xxx.dmp log=xxx.log fromuser=dbuser touser=dbuser2 imp user/pwd file=/dir/xxx.dmp log=xxx.log fromuser=dbuser touser=dbuser2
xxxxxxxxxx
3
1
imp user/pwd file=/dir/xxx.dmp log=xxx.log fromuser=dbuser touser=dbuser2
2
3
imp user/pwd file=/dir/xxx.dmp log=xxx.log fromuser=dbuser touser=dbuser2
exp user/pwd file=/dir/xxx.dmp log=xxx.log full=ycommit=y ignore=y exp user/pwd file=/dir/xxx.dmp log=xxx.log full=ycommit=y ignore=y
x
1
exp user/pwd file=/dir/xxx.dmp log=xxx.log full=ycommit=y ignore=y
2
3
exp user/pwd file=/dir/xxx.dmp log=xxx.log full=ycommit=y ignore=y
imp user/pwd file=/dir/xxx.dmp log=xxx.log fromuser=dbuser touser=dbuser2
1
imp user/pwd file=/dir/xxx.dmp log=xxx.log fromuser=dbuser touser=dbuser2