ORACLE Export (exp) vs Datapump (expdp)
ORACLE muab ob qho khoom siv sab nraud los hloov cov khoom siv database los ntawm ib lub database mus rau lwm qhov database. Kev xa tawm ib txwm (exp / imp) tau qhia ua ntej 10g. Tom qab ntawd los ntawm 10g, ORACLE qhia datapump (expdp / impdp) raws li kev txhim kho rau cov khoom siv hluav taws xob ib txwm siv.
Traditional Export (exp / imp)
Qhov no yog ORACLE cov ntaub ntawv siv hluav taws xob sab nraud, uas yog siv los hloov cov khoom siv database los ntawm ib tus neeg rau zaub mov database mus rau lwm tus neeg rau zaub mov database. Nws tso cai rau kev xa cov khoom siv database hla ntau lub platform, sib txawv hardware thiab software configurations. Thaum cov lus txib xa tawm raug ua tiav ntawm cov ntaub ntawv, cov khoom siv database raug rho tawm nrog lawv cov khoom nyob. Qhov ntawd txhais tau hais tias yog nws rho tawm ib lub rooj, cov dependences xws li indexes, lus, thiab nyiaj pab tau muab rho tawm thiab sau rau hauv ib tug export ntaub ntawv (binary format dump file). Hauv qab no yog cov lus txib kom xa tawm tag nrho cov ntaub ntawv, Cmd > exp userid=username/[email tiv thaiv]_tns file=export.dmp log=export.log full=y statistics=none
Cov lus txib saum toj no yuav raug xa tawm cov ntaub ntawv mus rau binary dump cov ntaub ntawv npe hu ua export.dmp. Tom qab ntawd imputility tuaj yeem siv los import cov ntaub ntawv no mus rau lwm qhov database. Hauv qab no yog cov lus txib kom import, Cmd > imp userid=username/[email tiv thaiv]_tns file=export.dmp log=import.log full=y statistics=none
Datapump Export (expdp / impdp)
Qhov no kuj yog ORACLE cov ntaub ntawv siv hluav taws xob sab nraud, uas yog siv los hloov khoom nruab nrab ntawm cov ntaub ntawv. Qhov kev siv hluav taws xob no yog los ntawm ORACLE 10g database. Nws muaj kev txhim kho ntau dua li cov khoom siv exp / imp. Qhov kev siv hluav taws xob no tseem ua rau cov ntaub ntawv pov tseg, uas nyob hauv binary hom nrog cov khoom siv database, cov khoom metadata thiab lawv cov ntaub ntawv tswj. Cov lus txib expdp thiab impdp tuaj yeem ua tiav peb txoj hauv kev,
- Command kab interface (xws li expdp/impdp tsis nyob hauv kab hais kom ua)
- Parameter cov ntaub ntawv interface (xws li expdp/impdp tsis nyob rau hauv ib daim ntawv cais)
- Kev sib tham-hais lus interface (nkag mus rau ntau cov lus txib hauv kev xa tawm sai)
Muaj tsib hom kev sib txawv ntawm cov ntaub ntawv tshem tawm siv expdp. Lawv yog,
- Txhua hom Export (tag nrho cov ntaub ntawv raug tshem tawm)
- Schema hom (qhov no yog hom qauv, tshwj xeeb schemas raug tshem tawm)
- Table hom (tshwj xeeb ntawm cov rooj thiab lawv cov khoom nyob hauv tau tshem tawm)
- Tablespace hom (cov ntxhuav hauv cov lus teev tseg tau muab tshem tawm)
- Transportable Tablespace hom (tsuas yog cov metadata rau cov ntxhuav thiab lawv cov khoom siv nyob rau hauv cov txheej txheem ntawm cov rooj zaum yog unloaded)
Ua raws li yog txoj hauv kev xa tawm tag nrho cov ntaub ntawv siv expdp, Cmd > expdp userid=username/password dumpfile=expdp_export.dmp logfile=expdp_export.log full=y directory=export
Tom qab ntawd impdp utility yuav tsum tau siv los import cov ntaub ntawv no mus rau lwm qhov database.
Dab tsi yog qhov txawv ntawm Cov Tso Cai Export thiab Datapump?
• Datapump ua haujlwm ntawm ib pawg ntawm cov ntaub ntawv hu ua cov ntaub ntawv pov tseg. Txawm li cas los xij, ib txwm xa tawm ua haujlwm ntawm ib daim ntawv.
• Datapump nkag mus rau cov ntaub ntawv hauv server (siv cov npe ORACLE). Kev xa tawm ib txwm tuaj yeem nkag mus rau cov ntaub ntawv hauv cov neeg siv khoom thiab cov server ob qho tib si (tsis siv ORACLE cov npe).
• Exports (exp/imp) sawv cev rau cov ntaub ntawv metadata cov ntaub ntawv raws li DDLs hauv cov ntaub ntawv pov tseg, tab sis hauv datapump, nws sawv cev rau hauv XML daim ntawv hom.
• Datapump muaj kev ua kom sib luag tab sis hauv exp/imp ib qho kev ua tiav.
• Datapump tsis txhawb cov xov xwm sib txuas xws li cov kab xev, tab sis ib txwm txhawb nqa export.