Oracle11gRAC数据库节点损坏恢复_第1页
Oracle11gRAC数据库节点损坏恢复_第2页
Oracle11gRAC数据库节点损坏恢复_第3页
Oracle11gRAC数据库节点损坏恢复_第4页
Oracle11gRAC数据库节点损坏恢复_第5页
免费预览已结束,剩余15页可下载查看

付费下载

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Oracle11gR2Rac节点损坏恢复方正国际公共安全事业部技术文档1 .文档属性文档属性内容文档名称Oracle11gR2Rac节点损坏恢复报告文档版本号A1文档状态正式稿文档编写完成日期2016年9月14日作者2 .文档变更历史清单文件版本号修正日期修正人备注3 .本次修改变更说明序号义更内容简述1.2.3.4.5.第1章概述辽宁省厅警务综合平台项目中,锦州数据库现场的用户因为在未停止数据库的情况下,扩展磁盘阵列,更换磁盘,导致1节点本地磁盘阵列挂不上,导致只能一个节点使用数据库,需要重新配置oracle集群信息。第2章系统环境项目石祢述务器名RAC节点1RAC节点2操作系统RedHat

2、6RedHat6集群软件OracleGRIDOracleGRID服务器主机名hislhis2IP地址(示例)172.31.1.50172.31.1.51系统用户用户名RootGridoracle系统组dbaasmdbaasmadminoinstallasmoperdbaasmdbaasmadminoinstallasmoper第3章数据库环境项目互铲、服务器名称RAC节点1RAC节点2公共IP地址172.31.1.50172.31.1.51虚拟IP地址172.31.1.52172.31.1.53心跳IP地址192.168.0.1192.168.0.2ScanIP地址172.31.1.54Ora

3、cleRACSIDorcl1orcl2数据库名称orcl数据文件路径+DATA归档文件+ARCH数据库版本OracleDatabase11gEnterpriseEditionRelease11.2.0.4.0(64位)GRID_BASE目录/u01/app/gridGRID_HOME目录/u01/app/grid/11.2.0ORACLE_BASE目录/u01/app/oracleORACLE_HOME目录/u01/app/oracle/11.2.0数据库监听端口1521数据库字符集ZHS16GBK数据库用户(sys,systemj)密码oracle数据库硬盘管理方式ASM第4章实施步骤4.1

4、操作系统准备工作包括如下操作,主要和rac安装文档相同,如果需要重新安装操作系统,请参考rac安装文档的操作,进行操作系统配置。下面只列出:4.1.1 配置grid用户及oracle用户等效性Grid用户(his2先删除.shh目录)在hisl上:su-grid$mkdir-/.ssh$chmod700/.ssh$ssh-keygen-trsa$ssh-keygen-tdsa$cat/.ssh/id_rsa.pub>>/.ssh/authorized_keys$cat/.ssh/id_dsa.pub>>/.ssh/authorized_keys在his2上:$mkdir

5、-/.ssh$chmod700/.ssh$ssh-keygen-trsa$ssh-keygen-tdsa在his1上:$sshjkkdb2cat/.ssh/id_rsa.pub>>/.ssh/authorized_keys$sshjkkdb2cat/.ssh/id_dsa.pub>>/.ssh/authorized_keys$scp/.ssh/authorized_keysjkkdb2:/.ssh/authorized_keys验证$sshhis1date$sshhisl-privdate$sshhis2date$sshhis2-privdateOracle用户()在h

6、isl上:su-grid$mkdir-/.ssh$chmod700/.ssh$ssh-keygen-trsa$ssh-keygen-tdsa$cat/.ssh/id_rsa.pub>>/.ssh/authorized_keys$cat/.ssh/id_dsa.pub>>/.ssh/authorized_keys在his2上:$mkdir-/.ssh$chmod700/.ssh$ssh-keygen-trsa$ssh-keygen-tdsa在his1上:$ sshjkkdb2cat/.ssh/id_rsa.pub>>/.ssh/authorized_keys$

7、 sshjkkdb2cat/.ssh/id_dsa.pub>>/.ssh/authorized_keys$ scp/.ssh/authorized_keysjkkdb2:/.ssh/authorized_keys验证$ sshhis1date$ sshhis1-privdate$ sshhis2date$ sshhis2-privdate1.1.2 设置raw,磁盘阵列联系硬件厂家,扩展磁盘操作等等,两个机器的磁盘信息相同,主要是挂的磁盘号要一致。1.1.3 重启hisl服务器4.2 停止原来1节点vip$srvctldisablelistener-llistener_name-n

8、hisl$srvctlstoplistener-llistener_name-nhis14.3 删除原1节点数据库实例信息oracle用户执行:$dbca-silent-deleteInstance-nodeListhis1-gdbNameorcl-instanceNameorcl1-sysDBAUserNamesys-sysDBAPasswordoracle此时查看数据库信息:$srvctlconfigdatabase-dorclDatabaseuniquename:orclDatabasename:Oraclehome:/oracle/product/11.2.0/db_1Oracleus

9、er:oracleSpfile:Domain:Startoptions:openStopoptions:immediateDatabaserole:PRIMARYManagementpolicy:AUTOMATICServerpools:orclDatabaseinstances:his2原来是his1,his2DiskGroups:DATAMountpointpaths:Services:Type:RACDatabaseisadministratormanaged4.4 清除rac信息消除grid/grid/gridhome/oui/bin/runInstaller-updateNodeLi

10、stORACLE_HOME=/grid/gridhome"CLUSTER_NODES=his2"CRS=TRUE-silentStartingOracleUniversalInstaller.Checkingswapspace:mustbegreaterthan500MB.Actual20480MBPassedTheinventorypointerislocatedat/etc/oraInst.locTheinventoryislocatedat/grid/gridbase/oraInventory'UpdateNodeList'wassuccessful.

11、消除oracle/oracle/product/11.2.0/db_1/oui/bin>runInstaller-updateNodeListORACLE_HOME=/oracle/product/11.2.0/db_1"CLUSTER_NODES=his2”StartingOracleUniversalInstaller.Checkingswapspace:mustbegreaterthan500MB.Actual20480MBPassedTheinventorypointerislocatedat/etc/oraInst.locTheinventoryislocatedat

12、/oracle/oraInventory'UpdateNodeList'wassuccessful.查看/grid/gridhome/opmen/conf/ons.config文件usesharedinstall=trueallowgroup=truelocalport=6100#lineaddedbyAgentremoteport=6200#lineaddedbyAgentnodes=his2:6200#lineaddedbyAgent如果还有his1信息,手工删除4.5 清除1节点vip$srvctlremovevip-ihis1-vipPleaseconfirmthaty

13、ouintendtoremovetheVIPshis1-vip(y/n)y4.6 检查当前集群信息$olsnodes-s寸$crs_stat4$cluvfystage-postnodedel-nhisl-verbosePerformingpost-checksfornoderemovalCheckingCRSintegrity.ClusterwareversionconsistencypassedTheOracleClusterwareishealthyonnode"his2"CRSintegritycheckpassedResult:Noderemovalcheckpas

14、sedPost-checkfornoderemovalwassuccessful.4.7 重新添加1节点到集群4.7.1 添加grid软件环境检查$cluvfycomppeer-refnodehis2-nhis1-verbose$cluvfystage-prenodeadd-nhis1verbose在/grid/gridhome/oui/bin下:$exportIGNORE_PREADDNODE_CHECKS=Y$./addNode.sh-silent"CLUSTER_NEW_NODES=his1""CLUSTER_NEWVIRTUAL_HOSTNAMES=his

15、1-vip”Performingpre-checksfornodeadditionCheckingnodereachability.Nodereachabilitycheckpassedfromnode"his1"Checkinguserequivalence.Userequivalencecheckpassedforuser"grid"Checkingnodeconnectivity.Checkinghostsconfigfile.Verificationofthehostsconfigfilesuccessful(WARNING:Anewinvent

16、oryhasbeencreatedononeormorenodesinthissession.However,ithasnotyetbeenregisteredasthecentralinventoryofthissystem.Toregisterthenewinventorypleaserunthescriptat'/grid/gridbase/oraInventory/orainstRoot.sh'withrootprivilegesonnodes'his1'.Ifyoudonotregistertheinventory,youmaynotbeabletou

17、pdateorpatchtheproductsyouinstalled.Thefollowingconfigurationscriptsneedtobeexecutedasthe"root"userineachnewclusternode.Eachscriptinthelistbelowisfollowedbyalistofnodes./grid/gridbase/oraInventory/orainstRoot.sh#Onnodeshxbak1/grid/gridhome/root.sh#Onnodeshis1Toexecutetheconfigurationscript

18、s:1. Openaterminalwindow2. Loginas"root"3. RunthescriptsineachclusternodeTheClusterNodeAdditionof/grid/gridhomewassuccessful.Pleasecheck'/tmp/silentInstall.log'formoredetails.在his1以root用户执行orainstRoot.sh和root.sh两个脚本:脚本执行过程略。到这,his1上面grid已经添加完成。Asm和监听vip等都启动了。查看集群状态gridhis2$crs_stat

19、-tNameTypeTargetStateHostora.ARCHDG.dgora.up.typeONLINEONLINEhis1ora.CRSDG.dgora.up.typeONLINEONLINEhis1ora.DATADG.dgora.up.typeONLINEONLINEhis1ora.ER.lsnrora.er.typeONLINEONLINEhis1ora.N1.lsnrora.er.typeONLINEONLINEhis2ora.asmora.asm.typeONLINEONLINEhis1ora.cvuora.cvu.typeONLINEONLINEhis2ora.gsdora

20、.gsd.typeOFFLINEOFFLINEora.SM1.asmapplicationONLINEONLINEhis1ora.S1.lsnrapplicationONLINEONLINEhis1ora.his1.gsdapplicationOFFLINEOFFLINEora.his1.onsapplicationONLINEONLINEhis1ora.his1.vipora.t1.typeONLINEONLINEhis1ora.SM2.asmapplicationONLINEONLINEhis2ora.S2.lsnrapplicationONLINEONLINEhis2ora.his2.g

21、sdapplicationOFFLINEOFFLINEora.his2.onsapplicationONLINEONLINEhis2ora.his2.vipora.t1.typeONLINEONLINEhis2workora.rk.typeONLINEONLINEhis1ora.oc4jora.oc4j.typeONLINEONLINEhis2ora.onsora.ons.typejONLINEONLINEhis1ora.orcl.dbora.se.typeONLINEONLINEhis2ora.scan1.vipora.ip.typeONLINEONLINEhis24.7.2 添加oracl

22、e软件在his2服务器/oracle/product/11.2.0/db_1/oui/bin不执行:$exportIGNORE_PREADDNODE_CHECKS=Y$./addNode.sh"CLUSTER_NEW_NODES=his1”Savinginventoryonnodes100%Done.SaveinventorycompleteWARNING:Thefollowingconfigurationscriptsneedtobeexecutedasthe"root"userineachnewclusternode.Eachscriptinthelistbe

23、lowisfollowedbyalistofnodes./oracle/product/11.2.0/db1/root.sh#Onnodeshis1Toexecutetheconfigurationscripts:1. Openaterminalwindow2. Loginas"root"3. RunthescriptsineachclusternodeTheClusterNodeAdditionof/oracle/product/11.2.0/db_1wassuccessful.Pleasecheck'/tmp/silentInstall.log'form

24、oredetails.在his1节点上以root用户执行/oracle/product/11.2.0/db1/root.shW本PerformingrootuseroperationforOracle11gThefollowingenvironmentvariablesaresetas:ORACLE_OWNER=oracleORACLE_HOME=/oracle/product/11.2.0/db_1Enterthefullpathnameofthelocalbindirectory:/usr/local/bin:Thecontentsof"dbhome"havenotch

25、anged.Noneedtooverwrite.Thecontentsof"oraenv"havenotchanged.Noneedtooverwrite.Thecontentsof"coraenv"havenotchanged.Noneedtooverwrite.Entrieswillbeaddedtothe/etc/oratabfileasneededbyDatabaseConfigurationAssistantwhenadatabaseiscreatedFinishedrunninggenericpartofrootscript.Nowprodu

26、ct-specificrootactionswillbeperformed.Finishedproduct-specificrootactions.查看his1月艮务器/grid/gridhome/opmn/conf/ons.conf文件moreons.configusesharedinstall=trueallowgroup=truelocalport=6100#lineaddedbyAgentremoteport=6200#lineaddedbyAgentnodes=his1:6200,his2:6200#lineaddedbyAgent如果his2服务的/grid/gridhome/op

27、mn/conf/ons.conf没有添加his1:6200信息,手工给加上4.7.3 添加数据库实例在任意节点oracle用户执行dbca|jDatabaseConfiguratnonAsi?tant:WelcomeWelcoinetotheDatatiaseConfigurationAssisiamtforOracleRealApplicationClustersTheDatabaseConfigurationAssistantenables>oulacreafSjccnfigure,ardeleteaclutQrdatabaseandrnanagedatabaseiemulates.

28、Iialsoenablesiqaddanddeletemsianceofaclusterdaiatjase.Selectthedatabaseiypethatyouwouldliketocreateoractmlnisfer*OracleRealMmlcaticinClusters(RAC)datataierOracleRACOneNodedatabase厂OraclesingleinslaricedalabaseCsricelHelpGackyext3)CreateaDatabaseDeleteaDatabaseSelecttheoperationtJiatv°uwanttoper

29、fonm:rConfigureDatableOplionsManageTemplatesinstancaManagmntASMcohfigiuraiionQiperationsmustbeperTormedlusingAutomaticStorage,4/ManagementConfiguratiianAssistant密MCfromOracleGridInfrastructurehomeDatabaseNam自StatusCancelactiveSelectanactiveclusterdatabasetoaddanhsianceConfigurationTvpeLocallirisiani

30、cgStatusAdmin*ManagedRunning疆Eazk.凶2啦注:实际当前环境只有1个实例orcl2:his2active也同DatabaseC/nfiqurati口口口日式3*gap$of7:Instancenamningandnode5ele<ticnThedefauKinslancnameis"procl3n.EdilIheinstancenamEifneedleclj,delectIhienodeonwhichtoaddihein兑3n匚曳anddkkNext.rac5BackNexl*j添加orcll实例JADatabaseCrpi科quritiDqAsh

31、tan,$抬巨6uf6:InstanceStorageStorage-Tablespaces-9Datafiles_JRedoLogCroupsDatabaseStorageFromtheDaLtibaiseStoragepage,youcanspecilvstorageparametersfordatabasecreation.Thispagedisplaysairesliningand?ummaryview(mullI-columnlistsioenableyoutochangeandviewthefollowingobjects:«Controlfiles/Tablespace

32、s Datafiles RdDlbarkSegments RedoLogGro叩£FromanyobjecttwefolderclickCreateiocreateanewobject.TodeieieanobjectselectthespecificobjectfromwithinthsobjeciivDefolderanddirkDeleteImportanttfyouselectadalaba&etemplaleincludingdatafiles,tlhenyouwillnotbeabletoaddorremovedatafiles>tablespacss.or

33、rollbacksegments.Selectimgthistypeofiemplateenablesyoutotliangethefollowing: Destinationofihedaiaflles Controlfilesorleggroups.Formoreinformation,refertotheOrarJeDatabaseAdmintratosGuid&.CreateDeleteIFileLocationvariables.iCancelIHelp&g耻K|yexi-(而资)(y|DatabaseConfiguratianA.ssistamt:SummaryThiefollowingaddinstanceoperatiionwillbgperformed.Aridinstancsaprod3"onniadE!*&匚AddinstanceT,prod31TonnodeTrrac31f.Init

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论