Oracle HAS Setup After Hostname and IP Change _ Notes on Oracle

11
3/2/2015 Oracle HAS setup after Hostname and IP change | Notes On Oracle https://mehmeteser.wordpress.com/2013/02/21/renamehosthas/ 1/11 Notes On Oracle by Mehmet Eser Oracle HAS setup after Hostname and IP change FEBRUARY 21, 2013 10 COMMENTS (HTTPS://MEHMETESER.WORDPRESS.COM/2013/02/21/RENAME‑HOST‑ HAS/#COMMENTS) On my laptop, I have my virtual machines for oracle ASM and oracle RAC. I cloned one of the ASM single instance virtual machine and changed its hostname and IP adress to a new one. After I made the change the database and the asm instance did not start. I learned that I had to reconfigure the Oracle High Availability Services. It is true even if you have a stand alone installation. lets see how it works… How to Reconfigure Oracle Restart [ID 986740.1] BEFORE the change of hostname and IP [oracle@rhel5 ~]$ srvctl config asm ASM home: /oracle/app/oracle/product/11.2.0/grid ASM listener: LISTENER Spfile: /oracle/app/oracle/product/11.2.0/grid/dbs/spfile+ASM.ora ASM diskgroup discovery string: [oracle@rhel5 ~]$ srvctl config listener Name: LISTENER Home: /oracle/app/oracle/product/11.2.0/grid End points: TCP:1521 [oracle@rhel5 ~]$ srvctl config database

description

Oracle HAS Setup After Hostname and IP Change _ Notes on Oracle

Transcript of Oracle HAS Setup After Hostname and IP Change _ Notes on Oracle

  • 3/2/2015 OracleHASsetupafterHostnameandIPchange|NotesOnOracle

    https://mehmeteser.wordpress.com/2013/02/21/renamehosthas/ 1/11

    NotesOnOracle

    byMehmetEser

    OracleHASsetupafterHostnameandIPchange

    FEBRUARY21,2013 10COMMENTS(HTTPS://MEHMETESER.WORDPRESS.COM/2013/02/21/RENAMEHOSTHAS/#COMMENTS)

    Onmylaptop,IhavemyvirtualmachinesfororacleASMandoracleRAC.IclonedoneoftheASMsingleinstancevirtualmachineandchangeditshostnameandIPadresstoanewone.AfterImadethechangethedatabaseandtheasminstancedidnotstart.IlearnedthatIhadtoreconfiguretheOracleHighAvailabilityServices.Itistrueevenifyouhaveastandaloneinstallation.letsseehowitworks

    HowtoReconfigureOracleRestart[ID986740.1]

    BEFOREthechangeofhostnameandIP

    [oracle@rhel5~]$srvctlconfigasmASMhome:/oracle/app/oracle/product/11.2.0/gridASMlistener:LISTENERSpfile:/oracle/app/oracle/product/11.2.0/grid/dbs/spfile+ASM.oraASMdiskgroupdiscoverystring:[oracle@rhel5~]$srvctlconfiglistenerName:LISTENERHome:/oracle/app/oracle/product/11.2.0/gridEndpoints:TCP:1521[oracle@rhel5~]$srvctlconfigdatabase

    https://mehmeteser.wordpress.com/
  • 3/2/2015 OracleHASsetupafterHostnameandIPchange|NotesOnOracle

    https://mehmeteser.wordpress.com/2013/02/21/renamehosthas/ 2/11

    TEST11G[oracle@rhel5~]$srvctlconfigdatabasedTEST11GDatabaseuniquename:TEST11GDatabasename:TEST11GOraclehome:/oracle/app/oracle/product/11.2.0/dbhome_1Oracleuser:oracleSpfile:+DATA/TEST11G/spfileTEST11G.oraDomain:Startoptions:openStopoptions:immediateDatabaserole:PRIMARYManagementpolicy:AUTOMATICDatabaseinstance:TEST11GDiskGroups:DATA,FRAServices:

    MAKEthechangeofhostnameandIP

    YoucanchengetheIPandthehostnameforaserverusingthecommandguisystemconfignetwork.Alsochangethe/etc/hostsfileforthenewIPandhostname.

    oldIP:192.168.254.128newIP:192.168.254.129oldhostname:rhel5newhostname:stndby

    Afterwereboottheserver,weseethatHASfeaturesarenotfunctioningproperly.Highavailabiltyserviceshastobereconfigured.

    [oracle@stndby~]$crsctlcheckhasCRS4639:CouldnotcontactOracleHighAvailabilityServices[oracle@stndby~]$srvctlstartasmPRCR1070:Failedtocheckifresourceora.asmisregisteredCannotcommunicatewithcrsd

  • 3/2/2015 OracleHASsetupafterHostnameandIPchange|NotesOnOracle

    https://mehmeteser.wordpress.com/2013/02/21/renamehosthas/ 3/11

    ReconfigureHASGoto$GRID_HOME/crs/installdirectoryandruntheroothas.plscriptfordeconfiguration.Ithastoberunbytherootuser.

    [root@stndbyinstall]#./roothas.pldeconfigforceUsingconfigurationparameterfile:./crsconfig_paramsCRS4639:CouldnotcontactOracleHighAvailabilityServicesCRS4000:CommandStopfailed,orcompletedwitherrors.CRS4639:CouldnotcontactOracleHighAvailabilityServicesCRS4000:CommandDeletefailed,orcompletedwitherrors.CLSU00100:OperatingSystemfunction:opendirfailedwitherrordata:2CLSU00101:OperatingSystemerrormessage:NosuchfileordirectoryCLSU00103:errorlocation:scrsearch1CLSU00104:additionalerrorinformation:cantopenscrhomedirscls_scr_getvalCRS4544:UnabletoconnecttoOHASCRS4000:CommandStopfailed,orcompletedwitherrors.SuccessfullydeconfiguredOracleRestartstack

    Goto$GRID_HOME/crs/installdirectoryandruntheroothas.plscriptforreconfiguration.Ithastoberunbytherootuser.

    [root@stndbyinstall]#./roothas.plUsingconfigurationparameterfile:./crsconfig_paramsLOCALADDMODECreatingOCRkeysforuser'oracle',privgrp'dba'..Operationsuccessful.LOCALONLYMODESuccessfullyaccumulatednecessaryOCRkeys.CreatingOCRkeysforuser'root',privgrp'root'..Operationsuccessful.CRS4664:Nodestndbysuccessfullypinned.AddingClusterwareentriestoinittab

  • 3/2/2015 OracleHASsetupafterHostnameandIPchange|NotesOnOracle

    https://mehmeteser.wordpress.com/2013/02/21/renamehosthas/ 4/11

    stndby2013/01/3104:07:34/oracle/app/oracle/product/11.2.0/grid/cdata/stndby/backup_20130131_040734.olrSuccessfullyconfiguredOracleGridInfrastructureforaStandaloneServer

    Nowletschecktheconfiguration.Asyoucansee,hashasbeenenabledbuttheresourcesarenotstarted,ASManddatabasearenotregisteredasaresource.

    [oracle@stndby~]$..grid_env[oracle@stndby~]$crsctlconfighasCRS4622:OracleHighAvailabilityServicesautostartisenabled.[oracle@stndby~]$crs_statNAME=ora.cssdTYPE=ora.cssd.typeTARGET=OFFLINESTATE=OFFLINE

    NAME=ora.diskmonTYPE=ora.diskmon.typeTARGET=OFFLINESTATE=OFFLINE

    NAME=ora.evmdTYPE=ora.evm.typeTARGET=ONLINESTATE=ONLINEonstndby

    NAME=ora.onsTYPE=ora.ons.typeTARGET=OFFLINESTATE=OFFLINE

    Registerandstarttheresources

    [oracle@stndby~]$crsctlstartresource"ora.cssd"

  • 3/2/2015 OracleHASsetupafterHostnameandIPchange|NotesOnOracle

    https://mehmeteser.wordpress.com/2013/02/21/renamehosthas/ 5/11

    CRS2672:Attemptingtostart'ora.cssd'on'stndby'CRS2672:Attemptingtostart'ora.diskmon'on'stndby'CRS2676:Startof'ora.diskmon'on'stndby'succeededCRS2676:Startof'ora.cssd'on'stndby'succeeded[oracle@stndby~]$crs_statNAME=ora.cssdTYPE=ora.cssd.typeTARGET=ONLINESTATE=ONLINEonstndby

    NAME=ora.diskmonTYPE=ora.diskmon.typeTARGET=OFFLINESTATE=OFFLINE

    NAME=ora.evmdTYPE=ora.evm.typeTARGET=ONLINESTATE=ONLINEonstndby

    NAME=ora.onsTYPE=ora.ons.typeTARGET=OFFLINESTATE=OFFLINE

    letsaddthelistenerasaresourcebutbeforewedothatweneedtochangethelisteningIPofthelistener.

    before:

    [oracle@stndby~]$cat/oracle/app/oracle/product/11.2.0/grid/network/admin/listener.oraLISTENER=(DESCRIPTION_LIST=(DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))

  • 3/2/2015 OracleHASsetupafterHostnameandIPchange|NotesOnOracle

    https://mehmeteser.wordpress.com/2013/02/21/renamehosthas/ 6/11

    (ADDRESS=(PROTOCOL=TCP)(HOST=rhel5)(PORT=1521))))

    after

    [oracle@stndby~]$cat/oracle/app/oracle/product/11.2.0/grid/network/admin/listener.oraLISTENER=(DESCRIPTION_LIST=(DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))(ADDRESS=(PROTOCOL=TCP)(HOST=stndby)(PORT=1521))))

    nowwecanaddthelistenerasaresourceandafterthatwecanstartit

    [oracle@stndby~]$srvctladdlistenerlLISTENER[oracle@stndby~]$srvctlstartlistener[oracle@stndby~]$srvctlstatuslistenerListenerLISTENERisenabledListenerLISTENERisrunningonnode(s):stndby[oracle@stndby~]$crs_statora.LISTENER.lsnrNAME=ora.LISTENER.lsnrTYPE=ora.listener.typeTARGET=ONLINESTATE=ONLINEonstndby

    nowwecanaddtheasmwedonotneedtocreatespfileforasm.wecanusetheonebefore.

    [oracle@stndby~]$srvctladdasmlLISTENERp"/oracle/app/oracle/product/11.2.0/grid/dbs/spfile+ASM.ora"[oracle@stndby~]$srvctlstartasm[oracle@stndby~]$srvctlstatusasm

  • 3/2/2015 OracleHASsetupafterHostnameandIPchange|NotesOnOracle

    https://mehmeteser.wordpress.com/2013/02/21/renamehosthas/ 7/11

    ASMisrunningonstndby

    FinallywecanaddordatabaseTEST11G

    [oracle@stndby~]$srvctladddatabasedTEST11Go/oracle/app/oracle/product/11.2.0/dbhome_1p+DATA/TEST11G/spfileTEST11G.orarPRIMARYsopentimmediatea"DATA,FRA"[oracle@stndby~]$srvctlstartdatabasedTEST11G[oracle@stndby~]$srvctlstatusdatabasedTEST11GDatabaseisrunning.

    Aftertheadditionofallresources

    [oracle@stndby~]$crs_statNAME=ora.DATA.dgTYPE=ora.diskgroup.typeTARGET=ONLINESTATE=ONLINEonstndby

    NAME=ora.FRA.dgTYPE=ora.diskgroup.typeTARGET=ONLINESTATE=ONLINEonstndby

    NAME=ora.LISTENER.lsnrTYPE=ora.listener.typeTARGET=ONLINESTATE=ONLINEonstndby

    NAME=ora.asmTYPE=ora.asm.typeTARGET=ONLINESTATE=ONLINEonstndby

  • 3/2/2015 OracleHASsetupafterHostnameandIPchange|NotesOnOracle

    https://mehmeteser.wordpress.com/2013/02/21/renamehosthas/ 8/11

    NAME=ora.cssdTYPE=ora.cssd.typeTARGET=ONLINESTATE=ONLINEonstndby

    NAME=ora.diskmonTYPE=ora.diskmon.typeTARGET=OFFLINESTATE=OFFLINE

    NAME=ora.evmdTYPE=ora.evm.typeTARGET=ONLINESTATE=ONLINEonstndby

    NAME=ora.onsTYPE=ora.ons.typeTARGET=OFFLINESTATE=OFFLINE

    NAME=ora.test11g.dbTYPE=ora.database.typeTARGET=ONLINESTATE=ONLINEonstndby

  • 3/2/2015 OracleHASsetupafterHostnameandIPchange|NotesOnOracle

    https://mehmeteser.wordpress.com/2013/02/21/renamehosthas/ 9/11

    FILEDUNDERORACLE,ORACLEGRIDINFRASTRUCTURE,RAC TAGGEDWITHHIGHAVAILABILITYSERVICES,SRVCTL

    10ResponsestoOracleHASsetupafterHostnameandIPchange

    Sathishkumarsays:June18,2013at8:29amExcellentallthestepsperfectlyworked

    Sathishkumar

    Replymehmetesersays:June25,2013at10:57pmYouarewelcome

    ReplyAnssiKanninensays:August13,2013at4:35pm

    60% 60%

    mint&berryAbrigodeinviernosapphire109,95 43,95

    About these ads (http://wordpress.com/about-these-ads/)

    https://mehmeteser.wordpress.com/tag/high-availability-services/https://mehmeteser.wordpress.com/2013/02/21/rename-host-has/?replytocom=20#respondhttp://wordpress.com/about-these-ads/https://mehmeteser.wordpress.com/category/rac/https://mehmeteser.wordpress.com/category/oracle/https://mehmeteser.wordpress.com/tag/srvctl/https://mehmeteser.wordpress.com/https://mehmeteser.wordpress.com/category/oracle-grid-infrastructure/https://mehmeteser.wordpress.com/2013/02/21/rename-host-has/?replytocom=21#respond
  • 3/2/2015 OracleHASsetupafterHostnameandIPchange|NotesOnOracle

    https://mehmeteser.wordpress.com/2013/02/21/renamehosthas/ 10/11

    Thissavedmyday!Thankyou!

    Replysureshkumarsays:September20,2013at1:43pmIhadissuewithHASservicestartuponmystandalonserver11gr2,thisisnotmyscenariobutstepyoumentionithelpedmetofixthisissue.ThanksalotforyouIndeedcontribution.

    Replyrainiermorillasays:November13,2013at6:48pmThanks,itworksprettywell!

    ReplyJohnb486says:September18,2014at7:04pmHeyveryniceblog!!Man..Excellent..Amazing..IwillbookmarkyoursiteandtakethefeedsalsoImsatisfiedtofindalotofusefulinforightherewithinthepost,wedlikedevelopextrastrategiesinthisregard,thanksforsharing.ebfebcdekdda

    ReplyMjnAsays:January7,2015at8:18amVerynicearticle..Helpedmetoworkoutasimilarsituation.Thanksforpostingitwithaliveexample.JustwonderingifyouhaveanyinputsforsettingupOracleRACandASMonLinuxonawindows8PC.Ijustwantedtohavemyownsetupforlearningpurposes.

    Replymehmetesersays:January8,2015at11:58amyoucanusevmwareoranyothervirtualmachinetoestablishthelinuxmachinesonawindows.ThenyoucaninstallandtryonyourownRACsystem.

    ReplyMjnAsays:

    https://mehmeteser.wordpress.com/2013/02/21/rename-host-has/?replytocom=361#respondhttp://infinite.com/https://mehmeteser.wordpress.com/2013/02/21/rename-host-has/?replytocom=38#respondhttps://mehmeteser.wordpress.com/2013/02/21/rename-host-has/?replytocom=75#respondhttps://mehmeteser.wordpress.com/https://mehmeteser.wordpress.com/2013/02/21/rename-host-has/?replytocom=506#respondhttps://mehmeteser.wordpress.com/2013/02/21/rename-host-has/?replytocom=46#respondhttps://mehmeteser.wordpress.com/2013/02/21/rename-host-has/?replytocom=502#respond
  • 3/2/2015 OracleHASsetupafterHostnameandIPchange|NotesOnOracle

    https://mehmeteser.wordpress.com/2013/02/21/renamehosthas/ 11/11

    January9,2015at9:06amThanksforyourreply.UsingVMWaresoundslikeagoodoption.WonderingifyouhaveanyleadsorrecommendationforVMWare

    mehmetesersays:January14,2015at11:52amtherearealotofexamplesontheinternetsearchforvmwareinstalloracle112oraclebasehasagoodarticleonit.

    CreateafreewebsiteorblogatWordPress.com.

    TheEnterpriseTheme.

    Follow

    FollowNotesOnOracle

    BuildawebsitewithWordPress.com

    https://wordpress.com/themes/enterprise/https://wordpress.com/?ref=lofhttps://wordpress.com/?ref=footer_websitehttps://mehmeteser.wordpress.com/javascript:void(0)