資源描述:
《oracle10g數(shù)據(jù)庫備份與還原總結(jié)》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫。
1、oraclelOg數(shù)據(jù)庫備份與還原總結(jié)Oracle10gdatabasebackupandrestoresummary.TXTisinabadmoodtoday.Ionlyhavefoursentencestosay.Ineludingthisandtheprecedingtwosentences?Mywordsaremorewickedthanheistodealwiththewicked.Todealwithadespicablemanistobemoredespicablethanheis,and
2、tobeinlovewithyou,mylover?Thecashiersaid:"there'snochange?Findyoutwoplasticbags!Three?ArchivemodeYoucanpreventdatalossThedatacanbebackedupwhenitisOPENWhenthemediumfails,therestofthedatafileintheSYSTEMtablespacecanberecoveredfromtheopenstateThecompleterec
3、overycanalsoberestoredtoapointbetweenthebackuppointandthefailurepoint1.Backup1)coldbackupCopytherequireddatafilesandcontrolfilesaftershutdown2)hotbackupSetthedatabasetoarchivemodeIssuetheglobalcheckpointonthedatabaseandlocktheheaderblocksofallthedatafile
4、sSQL>alterdatabasebeginbackup;BackupdatafilesandcontrolfilesDatafilesarecopieddirectlytootherdirectoriesThecontrolfileshouldusethealterdatabasebackupcontrolfileSQL>alterdatabasebackupcontrolfileto'd:backupdem.ctTToendthedatabackup,thecurrentloggroupsho
5、uldalsobearchivedtoensurethesynchronizationofthedatafilebackupSQL>alterdatabaseendbackup;SQL>altersystemarchivelogcuurent;1)backupthetablespace*OFFLINEbackup(thetablespaceisOFFLINE,theSYSTEMtablespaceandtheunusedUNDOspacearenotOFFLINE)?determinesthedataf
6、ilethatisincludedinthetablespace,suchasspaceUSERSSQL>selectfile_namefromdba_data_filesWheretablespace_name二'users';SetthetablespacetobeofflineSQL>alterintablespaceusersoffline;CopythedatafileSetthetableSpacesonlineSQL>alterintablespaceusersonline?*online
7、backupIdentifythecorrespondingrelationshipSettablespacesforbackupmodeSQL>altertablespaceusersbeginbackup;CopythedatafileSettablespacesfornormalmodeSQL>altertablespaceusersendbackup*theonlinebackupfailedWhenperformingtheonlinebackup,ifappearroutinefailure
8、,openthedatabaseagain,ifthedatafileisstillinthereadystate,willgowrong,theneedtoendthebackup@loaddatabaseSQL>startupforcemountCheckallthedatafilesintheonlinebackupstateSQL>selectfile#fromv$backupwherestatus二'active';Endonli