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
µÚÎå²½£º
Ïà¹ØÎĵµ£º
1.Ê×ÏÈÐèÒª½¨Á¢plan table,·ñÔò²»ÄÜʹÓÃ
½¨Á¢·½·¨£º
$oracle\rdbms\adminÏÂÓиö
utlxplan.sql
ÆäÄÚÈÝΪ:
create table PLAN_TABLE (
statement_id varchar2(30),
timestamp date,
remarks varchar2(80),
operat ......
1.1.1 OracleÎﻯÊÓͼ¼ò½é
1. ÎﻯÊÓͼ˵Ã÷
ÎﻯÊÓͼ (Materialized View)£¬ÔÚÒÔÇ°µÄOracle°æ±¾ÖгÆΪ¿ìÕÕ(Snapshot)¡£Oracle µÄÎﻯÊÓͼÌṩÁËÇ¿´óµÄ¹¦ÄÜ£¬¿ÉÒÔÓÃÓÚÔ¤ÏȼÆËã²¢±£´æ±íÁ¬½Ó»ò¾Û¼¯µÈºÄʱ½Ï¶àµÄ²Ù×÷µÄ½á¹û ......
˵µ½Èí½âÎö£¨soft prase£©ºÍÓ²½âÎö£¨hard prase£©£¬¾Í²»Äܲ»ËµÒ»ÏÂOracle¶ÔsqlµÄ´¦Àí¹ý³Ì¡£µ±Äã·¢³öÒ»ÌõsqlÓï¾ä½»¸¶Oracle£¬ÔÚÖ´ÐкͻñÈ¡½á¹ûÇ°£¬Oracle¶Ô´Ësql½«½øÐм¸¸ö²½ÖèµÄ´¦Àí¹ý³Ì£º
1¡¢Óï·¨¼ì²é£¨syntax check£©
¼ì²é´ËsqlµÄƴдÊÇ·ñÓï ......
×î½üÏîÄ¿½ø¶È±È½Ï»ºÂý£¬³õ²½Ñо¿ÁËÒ»ÏÂOracleµÄ´æ´¢¹ý³Ì£¬½«´úÂëÌù³öÀ´¡£
Ê×ÏÈÏÈÌù³öÀ´OracleµÄ·ÖÒ³·ÖÒ³´æ´¢¹ý³Ì´úÂë°É¡£
1.ÕâÊÇ°üµÄ´úÂë
create or replace package DB_Oper is
-- Author : LIUBING
-- Created : 2009-10-28 15:01:30
-- Purpose : ²âÊÔOracleµ ......
ΪÁËÈ·¶¨±í¿Õ¼äÖаüº¬ÄÇЩÄÚÈÝ£¬ÔËÐУº
select owner,segment_name,segment_type
from dba_segments
where tablespace_name='<name of tablespace>'
²éѯ±í¿Õ¼ä°üº¬¶àÉÙÊý¾ÝÎļþ¡£
select file_name, tablespace_name
from dba_data_files
where tablespace_name ='<name of t ......