OracleÊý¾Ýµ¼Èëµ¼³öimp/exp¾ÍÏ൱ÓÚoracleÊý¾Ý»¹ÔÓ뱸·Ý¡£expÃüÁî¿ÉÒÔ°ÑÊý¾Ý´ÓÔ¶³ÌÊý¾Ý¿â·þÎñÆ÷µ¼³öµ½±¾µØµÄdmpÎļþ£¬impÃüÁî¿ÉÒÔ°ÑdmpÎļþ´Ó±¾µØµ¼Èëµ½Ô¶´¦µÄÊý¾Ý¿â·þÎñÆ÷ÖС£ ÀûÓÃÕâ¸ö¹¦ÄÜ¿ÉÒÔ¹¹½¨Á½¸öÏàͬµÄÊý¾Ý¿â£¬Ò»¸öÓÃÀ´²âÊÔ£¬Ò»¸öÓÃÀ´ÕýʽʹÓá£
Ö´Ðл·¾³£º¿ÉÒÔÔÚSQLPLUS.EXE»òÕßDOS£¨ÃüÁîÐУ©ÖÐÖ´ÐУ¬
DOSÖпÉÒÔÖ´ÐÐʱÓÉÓÚ ÔÚoracle 8i ÖÐ °²×°Ä¿Â¼ora81BIN±»ÉèÖÃΪȫ¾Ö·¾¶£¬
¸ÃĿ¼ÏÂÓÐEXP.EXEÓëIMP.EXEÎļþ±»ÓÃÀ´Ö´Ðе¼Èëµ¼³ö¡£
oracleÓÃjava±àд£¬SQLPLUS.EXE¡¢EXP.EXE¡¢IMP.EXEÕâÁ½¸öÎļþÓпÉÄÜÊDZ»°ü×°ºóµÄÀàÎļþ¡£
SQLPLUS.EXEµ÷ÓÃEXP.EXE¡¢IMP.EXEËù°ü¹üµÄÀ࣬Íê³Éµ¼Èëµ¼³ö¹¦ÄÜ¡£
ÏÂÃæ½éÉܵÄÊǵ¼Èëµ¼³öµÄʵÀý¡£
Êý¾Ýµ¼³ö£º
1 ½«Êý¾Ý¿âTESTÍêÈ«µ¼³ö,Óû§Ãûsystem ÃÜÂëmanager µ¼³öµ½D:daochu.dmpÖÐ
exp system/manager@TEST file=d:daochu.dmp full=y
2 ½«Êý¾Ý¿âÖÐsystemÓû§ÓësysÓû§µÄ±íµ¼³ö
exp system/manager@TEST file=d:daochu.dmp owner=(system,sys)
3 ½«Êý¾Ý¿âÖеıíinner_notify¡¢notify_staff_relatµ¼³ö
exp aichannel/aichannel@TESTDB2 file= d:datanewsmgnt.dmp tables=(inner_notify,notify_staff_relat)
4 ½«Êý¾Ý¿âÖеıítable1ÖеÄ×Ö¶Îfiled1ÒÔ"00"´òÍ·µÄÊý¾Ýµ¼³ö
exp system/manager@TEST file=d:daochu.dmp tables=(table1) query=" where filed1 like '00%'"
ÉÏÃæÊdz£Óõĵ¼³ö£¬¶ÔÓÚѹËõ£¬¼ÈÓÃwinzip°ÑdmpÎļþ¿ÉÒԺܺõÄѹËõ¡£
Ò²¿ÉÒÔÔÚÉÏÃæÃüÁîºóÃæ ¼ÓÉÏ compress=y À´ÊµÏÖ¡£
Êý¾ÝµÄµ¼Èë
1 ½«D:daochu.dmp ÖеÄÊý¾Ýµ¼Èë TESTÊý¾Ý¿âÖС£
imp system/manager@TEST file=d:daochu.dmp
imp aichannel/aichannel@HUST full=y file=file= d:datanewsmgnt.dmp ignore=y
ÉÏÃæ¿ÉÄÜÓеãÎÊÌ⣬ÒòΪÓеıíÒѾ´æÔÚ£¬È»ºóËü¾Í±¨´í£¬¶Ô¸Ã±í¾Í²»½øÐе¼Èë¡£
ÔÚºóÃæ¼ÓÉÏ ignore=y ¾Í¿ÉÒÔÁË¡£
2 ½«d:daochu.dmpÖеıítable1 µ¼Èë
imp system/manager@TEST file=d:daochu.dmp tables=(table1)
»ù±¾ÉÏÉÏÃæµÄµ¼Èëµ¼³ö¹»ÓÃÁË¡£²»ÉÙÇé¿öÒªÏÈÊǽ«±í³¹µ×ɾ³ý£¬È»ºóµ¼Èë¡£
×¢Ò⣺
²Ù×÷ÕßÒªÓÐ×ã¹»µÄȨÏÞ£¬È¨ÏÞ²»¹»Ëü»áÌáʾ¡£
Êý¾Ý¿âʱ¿ÉÒÔÁ¬Éϵġ£¿ÉÒÔÓÃtnsping TEST À´»ñµÃÊý¾Ý¿âTESTÄÜ·ñÁ¬ÉÏ¡£
¸½Â¼Ò»£º
¸øÓû§Ôö¼Óµ¼ÈëÊý¾ÝȨÏ޵IJÙ×÷
µÚÒ»,Æô¶¯sql*puls
µÚ¶þ£¬ÒÔsystem/managerµÇ½
µÚÈý£¬create user Óû§Ãû IDENTIFIED BY ÃÜÂë £¨Èç¹ûÒѾ´´½¨¹ýÓû§£¬Õâ²½¿ÉÒÔÊ¡ÂÔ£©
µÚËÄ£¬GRANT CREATE USER,DROP USER,ALTER USER ,CREATE ANY VIEW ,
DROP ANY VIEW,EXP_FULL_DATABASE,IMP_FULL_DATABASE,
DBA,CONNECT,RESOURCE,CREATE SESSION TO Óû§Ãû×Ö
µÚÎå, ÔËÐÐ-cmd-½øÈëdmpÎļþËùÔÚµÄĿ¼,
imp userid=system/manager full=y file=*.dmp
»òÕß imp userid=system/manager full=y file=filename.dmp
Ö´ÐÐʾÀý:
F:WorkOracle_Databackup>imp userid=test/test full=y file=inner_notify.dmp
ÆÁÄ»ÏÔʾ
Import: Release 8.1.7.0.0 - Production on ÐÇÆÚËÄ 2ÔÂ 16 16:50:05 2006
(c) Copyright 2000 Oracle Corporation. All rights reserved.
Á¬½Óµ½: Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
With the Partitioning option
JServer Release 8.1.7.0.0 - Production
¾Óɳ£¹æ·¾¶µ¼³öÓÉEXPORT:V08.01.07´´½¨µÄÎļþ
ÒѾÍê³ÉZHS16GBK×Ö·û¼¯ºÍZHS16GBK NCHAR ×Ö·û¼¯Öеĵ¼Èë
µ¼³ö·þÎñÆ÷ʹÓÃUTF8 NCHAR ×Ö·û¼¯ (¿ÉÄܵÄncharsetת»»)
. ÕýÔÚ½«AICHANNELµÄ¶ÔÏóµ¼Èëµ½ AICHANNEL
. . ÕýÔÚµ¼Èë±í "INNER_NOTIFY" 4Ðб»µ¼Èë
×¼±¸ÆôÓÃÔ¼ÊøÌõ¼þ...
³É¹¦ÖÕÖ¹µ¼È룬µ«³öÏÖ¾¯¸æ¡£
¸½Â¼¶þ£º
Oracle ²»ÔÊÐíÖ±½Ó¸Ä±ä±íµÄÓµÓÐÕß, ÀûÓÃExport/Import¿ÉÒÔ´ïµ½ÕâһĿµÄ.
ÏȽ¨Á¢import9.par,
È»ºó£¬Ê¹ÓÃʱÃüÁîÈçÏ£ºimp parfile=/filepath/import9.par
Àý import9.par ÄÚÈÝÈçÏ£º
FROMUSER=TGPMS
TOUSER=TGPMS2 £¨×¢£º°Ñ±íµÄÓµÓÐÕßÓÉFROMUSER¸ÄΪTOUSER£¬FROMUSERºÍTOUSERµÄÓû§¿ÉÒÔ²»Í¬£©
ROWS=Y
INDEXES=Y
GRANTS=Y
CONSTRAINTS=Y
BUFFER=409600
file==/backup/ctgpc_20030623.dmp
log==/backup/import_20030623.log
ÓÚ 2006-11-02 17:42:12·¢±í:
:0)1