Oracleæ°æ®å¯¼å
¥å¯¼åºimp/expå°±ç¸å½äºoracleæ°æ®è¿åä¸å¤ä»½ãexpå½ä»¤å¯ä»¥ææ°æ®ä»è¿ç¨æ°æ®åºæå¡å¨å¯¼åºå°æ¬å°çdmpæ件ï¼impå½
令å¯ä»¥ædmpæ件ä»æ¬å°å¯¼å
¥å°è¿å¤çæ°æ®åºæå¡å¨ä¸ã å©ç¨è¿ä¸ªåè½å¯ä»¥æ建两个ç¸åçæ°æ®åºï¼ä¸ä¸ªç¨æ¥æµè¯ï¼ä¸ä¸ªç¨æ¥æ£å¼ä½¿ç¨ã
ããæ§è¡ç¯å¢ï¼å¯ä»¥å¨SQLPLUS.EXEæè
DOSï¼å½ä»¤è¡ï¼ä¸æ§è¡ï¼
ããDOSä¸å¯ä»¥æ§è¡æ¶ç±äº å¨oracle 8i ä¸ å®è£
ç®å½\ora81\BIN被设置为å
¨å±è·¯å¾ï¼
ãã该ç®å½ä¸æEXP.EXEä¸IMP.EXEæ件被ç¨æ¥æ§è¡å¯¼å
¥å¯¼åºã
ããoracleç¨javaç¼åï¼SQLPLUS.EXEãEXP.EXEãIMP.EXEè¿ä¸¤ä¸ªæ件æå¯è½æ¯è¢«å
è£
åçç±»æ件ã
ãã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:\data\newsmgnt.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%'\"
ãã
ãã ä¸é¢æ¯å¸¸ç¨ç导åºï¼å¯¹äºå缩ï¼æ¢ç¨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:\data\newsmgnt.dmp ignore=y
ãã ä¸é¢å¯è½æç¹é®é¢ï¼å 为æç表已ç»åå¨ï¼ç¶åå®å°±æ¥éï¼å¯¹è¯¥è¡¨å°±ä¸è¿è¡å¯¼å
¥ã
ãã å¨åé¢å ä¸ ignore=y å°±å¯ä»¥äºã
ãã2 å°d:\daochu.dmpä¸ç表table1 导å
¥
ããimp system/manager@TEST file=d:\daochu.dmp tables=(table1)
ããåºæ¬ä¸ä¸é¢ç导å
¥å¯¼åºå¤ç¨äºãä¸å°æ
åµè¦å
æ¯å°è¡¨å½»åºå é¤ï¼ç¶å导å
¥ã
ãã注æï¼
ããæä½è
è¦æ足å¤çæéï¼æéä¸å¤å®ä¼æ示ã
ããæ°æ®åºæ¶å¯ä»¥è¿ä¸çãå¯ä»¥ç¨tnsping TEST æ¥è·å¾æ°æ®åºTESTè½å¦è¿ä¸ã
ããéå½ä¸ï¼
ããç»ç¨æ·å¢å 导å
¥æ°æ®æéçæä½
ãã第ä¸,å¯å¨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:\Work\Oracle_Data\backup>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
温馨提示:答案为网友推荐,仅供参考