oracle µ¼Èë/³öÃüÁî
µ¼Èë IMP
Oracle µÄµ¼ÈëʵÓóÌÐò (Import utility) ÔÊÐí´ÓÊý¾Ý¿âÌáÈ¡Êý¾Ý£¬²¢ÇÒ½«Êý¾ÝдÈë²Ù×÷ϵͳÎļþ¡£ imp ʹÓõĻù±¾¸ñʽ£º imp[username[/password[@service]]] £¬ÒÔÏÂÀý¾Ù imp ³£ÓÃÓ÷¨¡£
1. »ñÈ¡°ïÖú
imp help=y
2. µ¼ÈëÒ»¸öÍêÕûÊý¾Ý¿â
imp system/manager file=bible_db log=dible_db full=y ignore=y
3. µ¼ÈëÒ»¸ö»òÒ»×éÖ¸¶¨Óû§ËùÊôµÄÈ«²¿±í¡¢Ë÷ÒýºÍÆäËû¶ÔÏó
imp system/manager file=seapark log=seapark fromuser=seapark imp
system/manager file=seapark log=seapark fromuser=(seapark,amy,amyc,harold)
4. ½«Ò»¸öÓû§ËùÊôµÄÊý¾Ýµ¼ÈëÁíÒ»¸öÓû§
imp system/manager file=tank log=tank fromuser=seapark touser=seapark_copy
imp system/manager file=tank log=tank fromuser=(seapark,amy)
touser=(seapark1, amy1)
5. µ¼ÈëÒ»¸ö±í
imp system/manager file=tank log=tank fromuser=seapark TABLES=(a,b)
6. ´Ó¶à¸öÎļþµ¼Èë
imp system/manager file=(paycheck_1,paycheck_2,paycheck_3,paycheck_4)
log=paycheck, filesize=1G full=y
7. ʹÓòÎÊýÎļþ
imp system/manager parfile=bible_tables.par
bible_tables.par ²ÎÊýÎļþ£º
#Import the sample tables used for the Oracle8i Database Administrator's
Bible. fromuser=seapark touser=seapark_copy file=seapark log=seapark_import
8. ÔöÁ¿µ¼Èë
imp system./manager inctype= RECTORE FULL=Y FILE=A
Oracle imp/exp
C:Documents and Settingsadministrator>exp help=y
Export: Release 9.2.0.1.0 - Production on ÐÇÆÚÈý 7 ÔÂ 28 17:04:43 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
ͨ¹ýÊäÈë EXP ÃüÁîºÍÓû§Ãû / ¿ÚÁÄú¿ÉÒÔ
ºó½ÓÓû§Ãû / ¿ÚÁîµÄÃüÁî :
Àý³Ì : EXP SCOTT/TIGER
»òÕߣ¬ÄúÒ²¿ÉÒÔͨ¹ýÊäÈë¸úÓи÷ÖÖ²ÎÊýµÄ EXP ÃüÁîÀ´¿ØÖÆ “ µ¼³ö ”
°´ÕÕ²»Í¬²ÎÊý¡£ÒªÖ¸¶¨²ÎÊý£¬Äú¿ÉÒÔʹÓùؼü×Ö :
¸ñʽ : EXP KEYWORD=value »ò KEYWORD=(value1,value2,...,valueN)
Àý³Ì : EXP SCOTT/TIGER GRANTS=Y TABLES=(EMP,DEPT,MGR)
»ò TABLES=(T1: P1,T1: P2) £¬Èç¹û T1 ÊÇ·ÖÇø±í
USERID ±ØÐëÊÇÃüÁîÐÐÖеĵÚÒ»¸ö²ÎÊý¡£
¹Ø¼ü×Ö ËµÃ÷ ( ĬÈÏ
Ïà¹ØÎĵµ£º
°ÑÊý¾Ý´ÓÒ»¸ö±í¸´ÖƵ½ÁíÒ»¸ö±í£¬²åÈëÐÂÊý¾Ý»òÌæ»»µôÀÏÊý¾ÝÊÇÿһ¸öORACLE DBA¶¼»á¾³£Åöµ½µÄÎÊÌâ¡£ÔÚORACLE9iÒÔÇ°µÄÄê´ú£¬ÎÒÃÇÒªÏȲéÕÒÊÇ·ñ´æÔÚÀÏÊý¾Ý£¬Èç¹ûÓÐÓÃUPDATEÌæ»»£¬·ñÔòÓÃINSERTÓï¾ä²åÈ룬Æä¼äÉÙ²»ÁË»¹ÓÐһЩ±ê¼Ç±äÁ¿µÈµÈ£¬·±ËöµÄºÜ¡£ÏÖÔÚORACLE9iרΪÕâÖÖÇé¿öÌṩÁËMERGEÓï¾ä£¬Ê¹ÕâÒ»¹¤×÷±äµÃÒì³£ÇáËÉ£¬
MERGEÓï ......
ÔÚOracleÊý¾ÝµÄ´æ´¢ÖУ¬¿ÉÒÔ°Ñ´æ´¢¿Õ¼äÏëÏóΪһ¸öË®¿â£¬Êý¾ÝÏëÏóΪˮ¿âÖеÄË®¡£Ë®¿âÖеÄË®µÄλÖÃÓÐÒ»ÌõÏß½Ð×öˮλÏߣ¬ÔÚOracleÖУ¬ÕâÌõÏß±»³ÆΪ¸ßˮλÏߣ¨High-warter mark, HWM£©¡£ÔÚÊý¾Ý¿â±í¸Õ½¨Á¢µÄʱºò£¬ÓÉÓÚûÓÐÈκÎÊý¾Ý£¬ËùÒÔÕâ¸öʱºòˮλÏßÊǿյģ¬Ò²¾ÍÊÇ˵HWMΪ×îµÍÖµ¡£µ±²åÈëÁËÊý¾ÝÒԺ󣬸ßˮλÏ߾ͻáÉÏÕÇ£¬µ«ÊÇÕâ ......
ÔÚ¹úÄÚÍâÐí¶àOracle DBAÕ¾µãÉÏ£¬Óкܶà²éÕÒ±íÖеÚn¸ö×î´óÖµµÄС¼¼ÇÉ£¬ÕâЩÓï¾äȷʵÏ൱ÇÉÃËüÃǶ¼¶À±Ùõ辶µØÓõ½ÁËOracle±íÖеÄÒ»¸öα×ֶΓlevel”¡£µ«ÊÇÔںܶàÇé¿öÏ£¬Õâ¸öÓï¾ä±ä³ÉÁË ÃÀÀöµÄÏÝÚå¡£Èç¹ûÄãÏëÖªµÀΪʲô£¬²¢ÔõÑùÈƹýËü£¬ÇëÌýÎÒµÀÀ´£¡
Ñо¿Á˼¸Ì죬ÎÒ·¢ÏÖÒ»ÖÖÑÜÉúËã·¨£¬¼´ÕÒ³öµÚn¸öºÍµÚm¸ö×î´óÖ ......
truncate,delete,dropµÄÒìͬµã
×¢Òâ:ÕâÀï˵µÄdeleteÊÇÖ¸²»´øwhere×Ó¾äµÄdeleteÓï¾ä
Ïàͬµã:truncateºÍ²»´øwhere×Ó¾äµÄdelete, ÒÔ¼°drop¶¼»áɾ³ý±íÄÚµÄÊý¾Ý
²»Í¬µã:
1. truncateºÍ deleteֻɾ³ýÊý¾Ý²»É¾³ý±íµÄ½á¹¹(¶¨Òå)
dropÓï¾ä½«É¾³ý±íµÄ½á¹¹±»ÒÀÀµµÄÔ¼Êø(constrain),´¥·¢Æ÷(trigger),Ë÷Òý(index); ÒÀÀµÓÚ¸Ã±íµ ......