当前位置:文档之家› 完整版Oracle数据库备份和恢复操作手册

完整版Oracle数据库备份和恢复操作手册

1 ORACLE数据库数据备份和恢复操作手册1.1. ORACLE参数设置进入CMD操作界面,使用sqlplus连接数据库,图例1数据库连接操作连接语法:sqlplus system/Oracle2013@orcl图例2成功连接数据库环境变量设置(在Sqlplus中执行)create or replace directory <dir_name〉as C:\tmpdir '图例3环境变量设置12数据备份备份脚本:expdp system/Oracle2013@orcl directory=file_path dumpfile=ARADMIN.dat logfile=ARADMIN.Iog schemas=ARADMIN参数说明操作:图例4数据库备份操作L ■耳耳p®『匸骷日L ■ oxportnd _ B expov'tri&d■. Rwpnrtiftrl L■ exported L vexporiced »■exported ■v Qxportzod L .eKpo^tred ■. RKportert■. exported■■ exported L … exported L … exported L - exported L ■ exportiert L . exported Hdtittsr Ldblea KB erimwrimTW■审jm・rnirTWr・"ARA>HlM Bi B B,T48^牺wiMn»r』T52"料RRDniN o.*T53'*JT8°,>ftlft>NlN,L*l T9u◎ KA DH IIN*\ *-IftSK_OlEUJ<P0l MT 呻fiRfiDMlN*■*TASK^OIECKPOIMT…OBJ rS¥STEh,J.,i S¥S_EKPOftr_SCHEl1ft_0 丄强rt KK 03 KB £a KB eKBrowsrowsrowsrowsrowsirowsI*-OWGir*ours rowsrowsir廿悴K^OUSvowol^OWSrowsrolls貝iR貝丁貝■耳■黑鼻如耳A A 亀晶:鼻tft具事,鼻貝"M JR M ■-冉lW鼻丘鼻・昌卢i A M A n 具兴島■■鼻■■鼻舄■国跌冉丁鼻IRi科至鼻耳M A A A A A Dump (llo «Qt "r G^£IEM.eVB_EHPOnr_SCHEMfi_01 ioi C:\DMP\ARAMIH.BA1iInh '^VSTEH^.'^YSJ-XPOKI JSCHtiW-at,R surcfsjsfI J^i rfimrleteti atEMJacriSAdnifi图例5成功导出13数据恢复1.3.1.删除ARADMIN 用户1. 连接数据库sqlplus system/Oracle2013@orcl图例6连接数据库2. 删除目标数据库中的ARADMIN用户drop user ARADMIN cascade;萨二骨评员:C :Yl'iuJ.fiTs^s-f-st EB-S^^HEH J- eze - 丄plus sysltH/UruJ. e-ZCI 13C *rclU inflow C帧本氏权序有Hicrasoft Gorwrutiano •保牯所有权界叽(::SIJ4 & pa Ml d n i n is t rftto r tt 1^ ins leaB13(?rirc:1KQfi*Pl ns ;Kn I RAKI% It .2-HM >R Proiluirt inn nn Thtii thin 13 11t *H? ;<l 2f)13Cnpyright tiz〉ITRZ. S91 H, Omrz It H All r aglit s; r*eKKr*vedi_Cennettcd to £Oratrlir lly EnCwriPrlve Edit Juin R*11.2,0.1.0 - 64b It FnudMv I lumLHhh thf^ Vnrt iltiinniffegrp OiiA iHtn Hining,界i>d ncnl Alppl inat i>on> Trati npt inn»跑jh*o)> IISGTUxEii* drupjivil. T 1 B!图例7成功删除目标数据库中的ARADMIN用户132. 重新创建 ARADMIN 用户1.连接数据库sqlplus system/Oracle2013@orcl2. 创建ARADMIN 用户create user ARAdmin ide ntified by AR#Admi n# default tablespace ARSYSTEMtemporary tablespace ARTMPSPC quota un limited on arsystem;乂管理员. C : ^TiuduvsVsij-^leBGfVcH JL. exf —l>a.3 3.ys L EB /O X acLLe£Cll3@ VT clSQL> exitDiscanrte KT ted f ran Opac 丄❹ Database llg Enterpriser Edit ion ke Lease 11.2 t) .1 x U — Jjit Pra>duclionUit h the Partitioning- QUIP. Bata Minlncf and Real Arijpilicsit ion Te^tlnsr ojpt io RS fc:\JldinIn i&LraLurL E 汕/O EC 1c2B13BurvlFI JD I O ADO 11^3*0.1.0 PL«cducti«n on Thu Jun 132 BISI'flSZ畫OH th Or AC lift ・All Flghtff f 金静u •也・Do n n ee±e>fl tn : 0*i v ac L B Database 11^( Edition Ro lease 11.3.0 ・1.・0 —石>4hi 七 Product : IonHit hi tlie Part it ionOLAF# Data Hxninqi rad! Rea 1 弁鼻心 1 亦:;工七 ion Test; in «r aipt j-cvinsSQL> ere a.to usei* aradrii.n Idcn tlf i@d h*j AJVIdnm doFault tablespa.ee AR£ VSIEM tenpo tMry Ldblesu«ice IEHF uuuDdi un IJjnlLeij uik fiRS¥ST£M ;图例 9创建 ARADMIN 用户图例8连接数据库BBS£QL*Pluc :3. 赋予数据库权限grant alter sessi on, create cluster,create database lin k,create seque nce,create sessi on, create synony m,create table,create view,create procedure,create trigger,query rewrite to ARAdmi n;图例10赋予数据库权限133. 数据库导入导入命令:impdp system/Oracle2013@orcl directory=file_path dumpfile=ARADMIN20130606.DAT logfile= ARADMIN20130614.log schemas=ARADMINC :'WiMilovs3 L CB 32\end. uc. i■]]如l 亡・FD ・皂2013电•!;匸丄 dJmzLur 字=£) 1 ______ ・冋£3|bltcrosnft Wirwlows 6-1-76BW1血叔所有<c> 2009 MicrDsoft Corporation^探留帘右权捌管C: MJ^ers ^ftdriiji i^tjraitui7>lriuHJlp sLcai/1Drat 1c201rt 1 ilirector 3r-filc_u<iLjii Ltunpf ile =AFflDTIJH^Hl JU&0G .1MI aMflDFIlNZUlJM14.lo^ schemas =A»flDHlNllnpurt : Roloate .0"-"Productioh on Fri Jun 14 2U1^Ropyright <c> 19S2, 2609> Oracle nnd/or its arfiliaCcA.fl 11 1'isfhta rcaerved.0*r«c耳◎ lly Enierurisc HroduGt i<»nJ 1 tk tlifi P<iFt1t inning . OLAF P Dritri Mining wrwl tabic HG VGT EM'' J B ¥S .1 MFOBT^S »l EMO,01,p B tap± Ln j ,f S¥SI W F - ,P KVS…1 MPORT JSCHEMft Jll '•: ithduiiiprilE- lof|f lie ^rocecE iitjj 3Kft-31684 = Process insTProcessing Process ing rrocc^^ltiy trocec cin<(j Ediuivn Rc fe 06吗bigRfriil Appilii^at Inm Tfist. Inyi opt 1nn^ 3-U ^GES ^F HL LI^ L OH &Aed^uumdi 盂尸■上] divpcl7opy=f 『导入完成object Object objectobject object fthject uhje^t objecttype tVUe type type t^fcsE}«nas-AltflDMIHS CHEI1A _EX PCJtl >0SEEUSER ; ulreddv existsU CMLHn _EX POJHr^K Vtll EN.CRflNl S CHEHA -EXPORT xROLE.GRftNT S CHENft_r«FORTyDETAULT_R0LESCHkHA_OHJRl>TAHLlf!£PRiCE_QIJOTASCHEMA_EX F0 RT^PRE _S a IEMA/PHOCACT _SCH C«ft SCHtHA JEXPORT 丿T AULE/T A HL H图例11数据库导入■ import ert _ iniptjpt^dl 亠 ImjKPted ■ impest ed * impestod 鼻 impoptod 甲 importGdl ■ iinportcd .i mpr rtfid ” imported .iimjMjptttd x ±JH pelted 」Impcpted ■ ImpoKod * xmiwi^od * importedFJWDmKWTYW 啪 Bfl&mir JT9S2" ■FIHflDmirJH 归“ ■■MWWHH''JT9»4,P •ARABttlll'JTSW 1B ravsM j-iMJsn尅“on 托■ ◎料.U MJ VC .H J -QUQ ■H rn-wn .Hz”Hn HH的fi riius B H 1-IMJ ^ B0 J h OlUE . U rous .U JMJWU .U Mjyo .H ■ 0 R"■i MJaara %fldniniiatrciter>taSSjji C Vili凹*ABfl»rl[||4i .l,T9«3,i w fiiRflIM1IN 1F J'T984!S■mmiwi 【ir 』TS9ir ・*ARR1M[N 1I .4I TR6K CHECMPOiNI 11■ hnwriGd "nWUMIHllZTfiSK CHECKPQIHT『t#” f -v»etypePrene ras ing cihjnct. Processine object. Processing object Froceseingf objectJob **£¥£ T EM w . W£¥S _1 MFORI _S CH EM A_i 丄"con^leted with 丄at 12=34 = ^4RCIIFMA FX rOIiT/TftTIT-Ezl HT>H{ /T NDEKSOI9lft_£ZPORV/raBLF/INDQC/STATISTIGSzTHBEX 5TATISTtCS SCH Et1A_EX FORTyUI EUzW 1FVSCH Ellfi JX FORIxIfi BLEZS TH TlSTlCSzTfi BLE_SI AT IS 11CSKB B B D D K K K K ^000H B B B H K K K K KH H H B B K K K K K14 EXP/IMP 与EXPDP/IMPDP 对比1.0.1运行位置不同1.0.2 EXP/IMP不同模式原理:exp/imp默认会是传统路径,这种模式下,是用SELECT加数据查询出来,然后写入buffer cache,在将这些记录写入evaluate buffer.最后传到Export客户端,在写入dump 文件。

相关主题