OracleÊý¾Ý¿âµÄ±¸·ÝÓë»Ö¸´
OracleÊý¾Ý¿âÓÐÈýÖÖ±ê×¼µÄ±¸·Ý·½·¨£¬ËüÃÇ·Ö±ðÊǵ¼³ö£¯µ¼È루EXP/IMP£©¡¢Èȱ¸·ÝºÍÀ䱸·Ý¡£µ¼³ö±¸¼þÊÇÒ»ÖÖÂß¼±¸·Ý£¬À䱸·ÝºÍÈȱ¸·ÝÊÇÎïÀí±¸·Ý¡£
Ò»¡¢ µ¼³ö£¯µ¼È루Export£¯Import£©
ÀûÓÃExport¿É½«Êý¾Ý´ÓÊý¾Ý¿âÖÐÌáÈ¡³öÀ´£¬ÀûÓÃImportÔò¿É½«ÌáÈ¡³öÀ´µÄÊý¾ÝËͻص½OracleÊý¾Ý¿âÖÐÈ¥¡£
£±¡¢ ¼òµ¥µ¼³öÊý¾Ý£¨Export£©ºÍµ¼ÈëÊý¾Ý£¨Import£©:
OracleÖ§³ÖÈýÖÖ·½Ê½ÀàÐ͵ÄÊä³ö£º
£¨£±£©¡¢±í·½Ê½£¨T·½Ê½£©£¬½«Ö¸¶¨±íµÄÊý¾Ýµ¼³ö¡£
£¨£²£©¡¢Óû§·½Ê½£¨U·½Ê½£©£¬½«Ö¸¶¨Óû§µÄËùÓжÔÏó¼°Êý¾Ýµ¼³ö¡£
£¨£³£©¡¢È«¿â·½Ê½£¨Full·½Ê½£©£¬ñ©Êý¾Ý¿âÖеÄËùÓжÔÏóµ¼³ö¡£
Êý¾Ýµ¼È루Import£©µÄ¹ý³ÌÊÇÊý¾Ýµ¼³ö£¨Export£©µÄÄæ¹ý³Ì£¬·Ö±ð½«Êý¾ÝÎļþµ¼ÈëÊý¾Ý¿âºÍ½«Êý¾Ý¿âÊý¾Ýµ¼³öµ½Êý¾ÝÎļþ¡£
£²¡¢ ÔöÁ¿µ¼³ö£¯µ¼Èë:
ÔöÁ¿µ¼³öÊÇÒ»ÖÖ³£ÓõÄÊý¾Ý±¸·Ý·½·¨£¬ËüÖ»ÄܶÔÕû¸öÊý¾Ý¿âÀ´ÊµÊ©£¬²¢ÇÒ±ØÐë×÷ΪSYSTEMÀ´µ¼³ö¡£ÔÚ½øÐдËÖÖµ¼³öʱ£¬ÏµÍ³²»ÒªÇó»Ø´ðÈκÎÎÊÌâ¡£µ¼³öÎļþÃûȱʡΪexport.dmp£¬Èç¹û²»Ï£Íû×Ô¼ºµÄÊä³öÎļþ¶¨ÃûΪexport.dmp£¬±ØÐëÔÚÃüÁîÐÐÖÐÖ¸³öÒªÓõÄÎļþÃû¡£
ÔöÁ¿µ¼³ö°üÀ¨ÈýÖÖÀàÐÍ£º
£¨£±£©¡¢“ÍêÈ«”ÔöÁ¿µ¼³ö£¨Complete£©¼´±¸·ÝÈý¸öÊý¾Ý¿â£¬±ÈÈç:exp system/manager inctype=complete file=040731.dmp¡£
£¨£²£©¡¢“ÔöÁ¿ÐÍ”ÔöÁ¿µ¼³ö±¸·ÝÉÏÒ»´Î±¸·Ýºó¸Ä±äµÄÊý¾Ý£¬±ÈÈç:exp system/manager inctype=incremental file=040731.dmp¡£
£¨£³£©¡¢“ÀÛ»ýÐÍ”ÔöÁ¿µ¼³öÀÛ¼ÆÐ͵¼³ö·½Ê½Êǵ¼³ö×ÔÉϴΓÍêÈ«”µ¼³öÖ®ºóÊý¾Ý¿âÖб仯Á˵ÄÐÅÏ¢¡£±ÈÈ磺exp system/manager inctype=cumulative file=040731.dmp¡£
Êý¾Ý¿â¹ÜÀíÔ±¿ÉÒÔÅŶ¨Ò»¸ö±¸·ÝÈÕ³Ì±í£¬ÓÃÊý¾Ýµ¼³öµÄÈý¸ö²»Í¬·½Ê½ºÏÀí¸ßЧµÄÍê³É¡£
±ÈÈçÊý¾Ý¿âµÄ±»·âÈÎÎñ¿ÉÒÔ×öÈçÏ°²ÅÅ£º
ÐÇÆÚÒ»£ºÍêÈ«±¸·Ý£¨A£© ÐÇÆÚ¶þ£ºÔöÁ¿µ¼³ö£¨B£© ÐÇÆÚÈý£ºÔöÁ¿µ¼³ö£¨C£©
ÐÇÆÚËÄ£ºÔöÁ¿µ¼³ö£¨D£© ÐÇÆÚÎ壺ÀۼƵ¼³ö£¨E£© ÐÇÆÚÁù£ºÔöÁ¿µ¼³ö£¨F£©
ÐÇÆÚÈÕ£ºÔöÁ¿µ¼³ö£¨G£©¡£
Èç¹ûÔÚÐÇÆÚÈÕ£¬Êý¾Ý¿âÔâµ½ÒâÍâÆÆ»µ£¬Êý¾Ý¿â¹ÜÀíÔ±¿É°´Ò»Ï²½ÖèÀ´»Ø¸´Êý¾Ý¿â£º
µÚÒ»²½£ºÓÃÃüÁîCREATE DATABASEÖØÐÂÉú³ÉÊý¾Ý¿â½á¹¹£»
µÚ¶þ²½£º´´½¨Ò»¸ö×ã¹»´óµÄ¸½¼Ó»Ø¹ö£»
µÚÈý²½£ºÍêÈ«ÔöÁ¿µ¼ÈëA£ºimp system/manager inctype=RESTORE FULL=y FILE=A
µÚËIJ½£ºÀÛ¼ÆÔöÁ¿µ¼ÈëE£ºimp system/manager inctype=RESTORE FULL=Y FILE=E
µÚÎå²½£º×î½üÔöÁ¿µ¼ÈëF£ºimp system/manager inctype=RESTORE FULL=Y FILE=F
¶þ¡¢ À䱸·Ý
À䱸·Ý·¢
Ïà¹ØÎĵµ£º
֮ǰ¿ª·¢OracleÒ»°ãÊÇʹÓÃPL/SQL Developer»òÕßÊÇTOAD£¬ÓÉÓÚÏÖÔÚ¹«Ë¾¶Ô°æȨÎÊÌâ¿´µÃ±È½ÏÖØ£¬ËùÒÔÎÒÒ²Ö»ÄܶÔÕâЩÊìϤµÄ¿ª·¢¹¤¾ß˵Éù°Ý°ÝÁË£¡ÔÚOracle¹Ù·½ÍøÕ¾Õ¾¿´µ½ÁËOracleÒѾÓÐÁËÒ»¸öOracle SQL Developer£¬²¢ÇÒÊÇÃâ·ÑµÄ£¡
ÒÔÏÂÊÇOracle¹Ù·½¶ÔOracle SQL DeveloperµÄ½éÉÜ
³ÌÐò´úÂë
orac ......
dc-test2<oracle>sqlplus /nolog
SQL*Plus: Release 10.2.0.4.0 - Production on Thu Feb 25 22:44:25 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
SQL> conn / as sysdba
Connected.
SQL> define
DEFINE _DATE = ......
PL/SQLÊǶÔOracleÊý¾Ý¿â½øÐвÙ×÷µÄÒ»ÖÖ¹ý³ÌÐÔ±à³ÌÓïÑÔ£¬Ëü¿ÉÒÔÔÚSQL * plusÖÐÖ´ÐУ¬Ò²¿ÉÒÔǶÈëµ½JAVA»òÕßC++ÖС£Æä»ù±¾×é³ÉΪ£º
DECLARE
...
BEGIN
...
EXCEPTION
...
END
¿ÉÓÃÀ´½«¶ÔÊý¾Ý¿âµÄ¸÷ÖÖ²Ù×÷·âװΪһ¸ö´úÂë¿é£¬ÎªÁ˼ÓÇ¿¿ÉÖØÓÃÐÔ£¬»¹¿É½«Öظ´ÐÔ´úÂëд³Éº¯ÊýÓë´æ´¢¹ý³Ì£¬Ó ......
OracleÈÕÆÚº¯Êý¼¯½õ(Ò»)
Ò»¡¢ ³£ÓÃÈÕÆÚÊý¾Ý¸ñʽ
1.Y»òYY»òYYY ÄêµÄ×îºóһ룬Á½Î»»òÈýλ
SQL> Select to_char(sysdate,'Y') from dual;
TO_CHAR(SYSDATE,'Y')
--------------------
7
SQL> Select to_char(sysdate,'YY') from dual;
TO_CHAR(SYSDATE,'YY')
---------------------
07
SQL> Select to_ch ......
1£®OracleΪ¿Í»§¶Ë¿ªÆô»á»°ÓÐÁ½ÖÖ·½Ê½£º¹²Ïí·þÎñºÍרÓ÷þÎñ¡£ÔÚרÓ÷þÎñÇé¿öÏ£¬¼àÌýÆ÷ΪÁ¬½ÓÇëÇó´´½¨Ð½ø³Ì£¨Unix»·¾³ÏÂÊÇProcess£¬WindowsÏÂÎÒÏëÓ¦¸ÃÊÇThread°É£©£»¹²Ïí·þÎñÇé¿öÏ£¬¼àÌýÆ÷½«¿Í»§ÇëÇ󽻸øDispatcher£¬ÓÉDispatcher°²ÅŶà¿Í»§µÄ×÷Òµ¡£SQL ServerÔÚĬÈÏÇé¿öÏÂ×Ô¶¯Îª¿Í»§¶ËÁ¬½Ó´´½¨Ị̈߳¬µ±Óзdz£¶àµÄ¿Í ......