首页  电脑故障排除  病毒安全 电脑基础知识  硬件知识  软件应用知识  操作系统知识  编程程序

美国编程网址 日本编程网址 法国编程网址 德国编程网址 韩国编程网址 香港编程网址 台湾编程网址

您的位置:首页>>编程程序>>Oracle

Create Standby Database

 
Create Standby Database
  
  ThisdocumentdescribeshowtocreateanOraclestandbydatabase(PCB4)fromaprimarydatabase(PCB5),whatshouldbebackeduponprimarydatabaseinordertoenablestandbydatabaserecovery,howtosyncthestandbydatabasewiththeprimarydatabaseofflinearchives,andhowtoactivatestandbydatabaseatlast.ItalsomentionsthedailysupportnotesonsupportingOraclestandbydatabase.
1.Actionstobeperformedonprimarydatabase
Hot-backupdatabasedatafilesontheprimarysystem.
Createstandbycontrolfileafterhot-backupdone
SVRMGR>ALTERDATABASECREATESTANDBYCONTROLFILEAS<Backupcontrolfile>;
Ensureallonlinearchivesarearchived
SVRMGR>ALTERSYSTEMARCHIVELOGCURRENT;
d)Backupthecurrentinit<SID>.oraofthedatabase.
2.CreateOracleServiceforStandbydatabase
Tocreateanewdatabaseasstandbydatabasewithsame<SID>astheprimarydatabase.WecouldcreateasmallonewithSYSTEMtablespaceinitially,usingOracleDatabaseAssistant.IthelpscreationoftheOracleNTservices.
UsethesameOracleversiononcreatingthedatabase
EnsureOraclelistenercouldservethenewOracleservice.
OnNTservice,changetheoracleStart<SID>?servicetomanuallymode,toavoiditautomaticallystart-upontheNTreboot.
ShutdowntheoracleStart<SID>?serviceoncetheabovestepsdone,andensurethe揙racleService<SID>?serviceisstillrunningon.
3.CreateDBdirectories
Plscreatethedirectoriesforholdingthedatabasedatafiles,assameasthesettingasonprimarydatabase.
Youshouldfollowthesamedrivesmapping
Plscreatethedirectoriesforlogs,redologs,pfile,bdump,udumpetc,similartotheprimarydatabasealso.
4.TransferfilestoStandbyServer
Transferallofthehot-backupdatafilestothestandbysystem.
Thefilelistis
backupstandbycontrolfile
Hot-backupdatafiles
Allofflinearchivesavailableonarchiveddirectory
backupinit<SID>.orafile
Thedestinationofthetransferredfilesshouldbespecifiedas:
Backupstandbycontrolfile:
Copiedtoallmembersofthecontrolfiles,theexactdirectorypathasspecifiedinbackup
init<SID>.orafile.
Hot-backupdatafiles:
Copiedtooriginaldatafileslocation,exactlythesamedirectorypathasonprimarysystem.
Allofflinearchives:
CopiedtotheDBarchivedirectory,exactlythesamedirectorypathasonprimarysystem.
Backupinit<SID>.orafile:
Copiedto$ORACLE_HOME/dbsortheIFILEparameterrefertolocation.
5.SyncStandbyDatabase
5.1TurnStandbyDBonrecoverymode
a.EnsureoracleService<SID>?servicestarted.
b.MounttheDB
SVRMGR>CONNECTINTERNAL/<PASSWD>
SVRMGR>STARTUPNOMOUNTPFILE=<path>/init<SID>.ora
SVRMGR>ALTERDATABASEMOUNTSTANDBYDATABASE;
SVRMGR>EXIT;
WecouldplacetheabovecommandsintoaSTARTUP.SQL?anditwillbecalled
byabatchcommandstartup_standby.bat?.SeeAppendixfordetails.
YoucouldplaceashortcutonthedesktoponNTstandbyserver,todepictthejob.
5.2Applyarchivedlogs
a.EnsurethestandbyDBinrecoverymode.
b.Applythelogs
SVRMGR>CONNECTINTERNAL/<PASSWD>
SVRMGR>SETAUTORECOVERYON;
SVRMGR>RECOVERSTANDBYDATABASE;
SVRMGR>EXIT;
WecouldplacetheabovecommandsintoaRECOVER.SQL?script,anditwillbecalled
byabatchrecover.bat?.SeeAppendixfordetails.
5.3ContinuousApplyarchivedlogsinrecoverymode
Ensurearegularjobtocopytheprimaryofflinearchivestothestandbyserver.
Plsseeaync_log.bat?fileforareference.SeeAppendixfordetails.
YoucoulduseWINCRONtoscheduleajobtocopydrivearchivesfromprimarysitetolocal
archivedirectorywith1hrinterval.
Performtheapplyarchivedlogsinrecoverymode?joboncenewarchivesarrival
Plsseesync_log.bat?fileforareference.SeeAppendixfordetails.
YoucoulduseWINCRONtoschedulethejobtoapplyarchiveswith1hrinterval.
Performcleanjobonobsoleteofflinearchivesonstandbysystem
Plsseearchive.cmd?fileforareference.SeeAppendixfordetails.
YoucoulduseWINCRONtoschedulethejobtocleanobsoletearchiveswith2daysretention.
5.4ActivateStandbyDatabase
Toactivatethestandbydatabase,copythelatestofflinearchivelogsfromprimaryserverovertothestandbysystem.
ApplythearchivestothestandbydatabaseasmentionedonSection3.2.
Activatethestandbydatabase
SVRMGR>ALTERDATABASEACTIVATESTANDBYDATABASE;
ShutdownthestandbyDBtoresetfileheadersandclearallbuffers.
SVRMGR>SHUTDOWNNORMAL;
Openthedatabase.YoucouldstartitbyNT揙racleStart<SID>?serviceandthenenabletheservicetostartautomaticallynow.
Youdonotneedcopyanyonlineredologsfromtheprimaryservertothestandbysystemonceitisactivated.
TakeaDBhot-backupafterthedatabaseopens.
5.5SpecialNotes
Anyphysicalchangesthatoccurontheprimarymustbeaccomplishedonthestandbyaswell.
Newdatafilesaddedonprimarydatabase,fileentriesareaddedtothestandbycontrolfileonly.
Ifthestandbydatabasecan'tfindthephysicaldatafile,standbyrecoverywillstopwithan
ORA-1157error.
UseALTERDATABASECREATEDATAFILE<PATH>as<PATH>;?torecreatethephysical
datafileorphysicallycopythemissingdatafilestothestandbysystem.
YoucanaddordroplogfilesontheprimarywithoutaffectingthestandbyDB.
Ifyoudorecreationcontrolfile?ontheprimaryserver,youmustalsorecreatethecontrolfileforthestandbydatabase.Shutdownthestandbydatabase,anduseacurrentbackupstandbycontrolfilefromprimaryserver.
Jimi
GIT
  
  
  
  
  

查看上一页  返回分类首页 返回96PC首页  查看下一页

  版权所有:电脑知识大全 网站备案:粤ICP备07031496号  联系我们

友情链接:母婴知识  外贸商务网  娱乐频道  汽车维修知识  股票入门知识  游戏攻略秘籍  本站空间由安信网络提供