Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ORACLE EXPDP/IMPDP


ORACLE EXPDP/IMPDP
2010-01-22 17:07
µ÷ÓÃEXPDP
ʹÓÃEXPDP¹¤¾ßʱ,Æäת´¢ÎļþÖ»Äܱ»´æ·ÅÔÚDIRECTORY¶ÔÏó¶ÔÓ¦µÄOSĿ¼ÖÐ,¶ø
²»ÄÜÖ±½ÓÖ¸¶¨×ª´¢ÎļþËùÔÚµÄOSĿ¼.Òò´Ë,ʹÓÃEXPDP¹¤¾ßʱ,±ØÐëÊ×ÏȽ¨Á¢DIRECTORY¶ÔÏó.²¢ÇÒÐèҪΪÊý¾Ý¿âÓû§ÊÚÓèʹÓÃ
DIRECTORY¶ÔÏóȨÏÞ.
CREATE DIRECTORY dump dir AS ‘DUMP’;
GRANT READ, WIRTE ON DIRECTORY dump_dir TO
scott;
1,µ¼³ö±í
Expdp scott/tiger DIRECTORY=dump_dir
DUMPFILE=tab.dmp TABLES=dept,emp
2,µ¼³ö·½°¸
Expdp scott/tiger DIRECTORY=dump_dir
DUMPFILE=schema.dmp
SCHEMAS=system,scott
3.µ¼³ö±í¿Õ¼ä
Expdp system/manager DIRECTORY=dump_dir
DUMPFILE=tablespace.dmp
TABLESPACES=user01,user02
4,µ¼³öÊý¾Ý¿â
Expdp system/manager DIRECTORY=dump_dir
DUMPFILE=full.dmp FULL=Y
ʹÓÃIMPDP
IMPDPÃüÁîÐÐÑ¡ÏîÓëEXPDPÓкܶàÏàͬµÄ,²»Í¬µÄÓÐ:
1,REMAP_DATAFILE
¸ÃÑ¡ÏîÓÃÓÚ½«Ô´Êý¾ÝÎļþÃûת±äΪĿ±êÊý¾ÝÎļþÃû,ÔÚ²»Í¬Æ½Ì¨Ö®¼ä°áÒƱí¿Õ¼äʱ¿ÉÄÜÐèÒª¸ÃÑ¡
Ïî.
REMAP_DATAFIEL=source_datafie:target_datafile
2,REMAP_SCHEMA
¸ÃÑ¡ÏîÓÃÓÚ½«Ô´·½°¸µÄËùÓжÔÏó×°Ôص½Ä¿±ê·½°¸ÖÐ.
REMAP_SCHEMA=source_schema:target_schema
3,REMAP_TABLESPACE
½«Ô´±í¿Õ¼äµÄËùÓжÔÏóµ¼È뵽Ŀ±ê±í¿Õ¼äÖÐ
REMAP_TABLESPACE=source_tablespace:target:tablespace
4.REUSE_DATAFILES
¸ÃÑ¡ÏîÖ¸¶¨½¨Á¢±í¿Õ¼äʱÊÇ·ñ¸²¸ÇÒÑ´æÔÚµÄÊý¾ÝÎļþ.ĬÈÏΪN
REUSE_DATAFIELS={Y | N}
5.SKIP_UNUSABLE_INDEXES
Ö¸¶¨µ¼ÈëÊÇÊÇ·ñÌø¹ý²»¿ÉʹÓõÄË÷Òý,ĬÈÏΪN
6,SQLFILE
Ö¸¶¨½«µ¼ÈëÒªÖ¸¶¨µÄË÷ÒýDDL²Ù×÷дÈëµ½SQL½Å±¾ÖÐ
SQLFILE=[directory_object:]file_name
Impdp scott/tiger DIRECTORY=dump
DUMPFILE=tab.dmp SQLFILE=a.sql
7.STREAMS_CONFIGURATION
Ö¸¶¨ÊÇ·ñµ¼ÈëÁ÷ÔªÊý¾Ý(Stream Matadata),ĬÈÏֵΪY.
8,TABLE_EXISTS_ACTION
¸ÃÑ¡ÏîÓÃÓÚÖ¸¶¨µ±±íÒѾ­´æÔÚʱµ¼Èë×÷ÒµÒªÖ´ÐеIJÙ×÷,ĬÈÏΪSKIP
TABBLE_EXISTS_ACTION={SKIP | APPEND |
TRUNCATE | FRPLACE }
µ±ÉèÖøÃÑ¡ÏîΪSKIPʱ,µ¼Èë×÷Òµ»áÌø¹ýÒÑ´æÔÚ±í´¦ÀíÏÂÒ»¸ö¶ÔÏó;µ±ÉèÖÃΪAPPEND
ʱ,»á×·¼ÓÊý¾Ý,ΪTRUNCATEʱ,µ¼Èë×÷Òµ»á½Ø¶Ï±í,È»ºóΪÆä×·¼ÓÐÂÊý¾Ý;µ±ÉèÖÃΪREPLACEʱ,µ¼Èë×÷Òµ»áɾ³ýÒÑ´æÔÚ±í,Öؽ¨±í²¡×·¼ÓÊý¾Ý,
×¢Òâ,TRUNCATEÑ¡Ïî²»ÊÊÓÃÓë´Ø±íºÍNETWORK_LINKÑ¡Ïî
9.TRANSFORM
¸ÃÑ¡ÏîÓÃÓÚÖ¸¶¨ÊÇ·ñÐ޸Ľ¨Á¢¶ÔÏóµÄDDLÓï¾


Ïà¹ØÎĵµ£º

OCPÈÏÖ¤¿¼ÊÔÖ¸ÄÏ£¨20£©£º»Ö¸´OracleÊý¾Ý¿â

1¡¢»Ö¸´½á¹¹Óë½ø³Ì
ÔÚ½éÖÊʧ°Üºó£¬¸ù¾ÝÊÜËðÎļþµÄÀàÐÍ£¬´æÔÚ²»Í¬µÄ»Ö¸´·½·¨¡£Êý¾Ý¿âÓÉ¿ØÖÆÎļþ¡¢Áª»úÖØ×öÈÕÖ¾ÎļþÒÔ¼°Êý¾ÝÎļþ×é³É¡£Èç¹û¸´ÓÃÁË¿ØÖÆÎļþ»òÁª»úÖØ×öÈÕÖ¾Îļþ£¬ÄÇô»Ö¸´ÊÜËðµÄÕâЩÎļþÊ®·ÖÈÝÒס£
¶ÔÓÚÊÜËðµÄ¿ØÖÆÎļþ£¬¿ÉÒÔ½«ÆäÌ滻Ϊij¸ö¸´Óø±±¾£¬Ò²¿ÉÒÔʹÓÃCREATE CONTROLFILEÃüÁîÖؽ¨¡£
ÊÜËðµÄÁª»úÖØ×öÈ ......

ORACLE 10G³£ÓÃÃüÁî

---´´½¨±í¿Õ¼ä
create tablespace ±í¿Õ¼äÃû×Ö datafile 'F:\oracle\product\10.2.0\oradata\wsdata\yss01.dbf' size 4096M;
alter tablespace ±í¿Õ¼äÃû×Ö add datafile 'F:\oracle\product\10.2.0\oradata\wsdata\yss02.dbf' size 4096M;
alter tablespace ±í¿Õ¼äÃû×Ö add datafile 'F:\oracle\product\10.2.0\oradata\w ......

oracle ÏÂÔصØÖ·

oracle 9i
http://www.oracle.com/technology/global/cn/software/products/oracle9i/index.html
oracle 9i ÔÚÏßÎĵµ
http://download.oracle.com/docs/cd/B10501_01/nav/docindex.htm
oracle 10g/11g ÏÂÔØ
http://www.oracle.com/technology/software/products/database/index.html ......

oracle expdp/impdp Ó÷¨Ïê½â

Data Pump ·´Ó³ÁËÕû¸öµ¼³ö/µ¼Èë¹ý³ÌµÄÍêÈ«¸ïС£²»Ê¹Óó£¼ûµÄ SQL ÃüÁ¶øÊÇÓ¦ÓÃר
ÓàAPI£¨direct path api etc) À´ÒÔ¸ü¿ìµÃ¶àµÄËٶȼÓÔغÍжÔØÊý¾Ý¡£
1.Data Pump µ¼³ö expdp
Àý
×Ó£º
sql>create directory dpdata1 as '/u02/ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ