使用DGMGRL管理DataGuard1.使用DGMGRL管理DataGuard的前提条件有1)PrimaryDB和StandbyDB必须事先已建好2)PrimaryDB和StandbyDB都是用spfile文件这两个条件都满足,下面开始对一个手工搭建的PhysicalDataGuard环境使用DGMGRL管理。目前需要管理的DataGuard环境在同一个LinuxServer上,PrimaryDB的DB_UNIQUEUE_NAME为pri,Standby的DB_UNIQUEUE_NAME为stdby。2.PirmaryDB和StandbyDB上设置参数DG_BROKER_START为TRUE。可以观察到后台进程dmon的启动。PRI>showparameterinstance_nameNAMETYPEVALUE-----------------------------------------------------------------------------instance_namestringorclPRI>showparameterdb_unique_nameNAMETYPEVALUE-----------------------------------------------------------------------------db_unique_namestringpriPRI>showparameterdg_broker_startNAMETYPEVALUE-----------------------------------------------------------------------------dg_broker_startbooleanFALSEPRI>!ps-ef|grepdmonoracle16001476023:06pts/200:00:00/bin/bash-cps-ef|grepdmonoracle16021600023:06pts/200:00:00grepdmonPRI>altersystemsetdg_broker_start=true;Systemaltered.PRI>!ps-ef|grepdmonoracle16041023:06?00:00:00ora_dmon_orcloracle16111476023:07pts/200:00:00/bin/bash-cps-ef|grepdmonoracle16131611023:07pts/200:00:00grepdmonPRI>STD>showparameterinstance_nameNAMETYPEVALUE-----------------------------------------------------------------------------instance_namestringstdbySTD>showparameterdb_uniNAMETYPEVALUE-----------------------------------------------------------------------------db_unique_namestringstdbySTD>showparameterspfileNAMETYPEVALUE-----------------------------------------------------------------------------spfilestring/u01/app/oracle/product/10.2.0/db_1/dbs/spfilestdby.oraSTD>showparameterdg_broker_startNAMETYPEVALUE-----------------------------------------------------------------------------dg_broker_startbooleanFALSESTD>!ps-ef|grepdmonoracle16041023:06?00:00:00ora_dmon_orcloracle16141481023:09pts/100:00:00/bin/bash-cps-ef|grepdmonoracle16161614023:09pts/100:00:00grepdmonSTD>altersystemsetdg_broker_start=true;Systemaltered.STD>!ps-ef|grepdmonoracle16041023:06?00:00:00ora_dmon_orcloracle162111123:10?00:00:00ora_dmon_stdbyoracle16221481023:10pts/100:00:00/bin/bash-cps-ef|grepdmonoracle16241622023:10pts/100:00:00grepdmonSTD>3.创建一个Configuration。[oracle@bs1oracle]$dgmgrlDGMGRLforLinux:Version10.2.0.1.0-ProductionCopyright(c)2000,2005,Oracle.Allrightsreserved.WelcometoDGMGRL,type"help"forinformation.DGMGRL>connectsys/oracle@priConnected.DGMGRL>CREATECONFIGURATION'DR1'AS>primarydatabaseis'pri'>connectidentifierispri;Configuration"DR1"createdwithprimarydatabase"pri"DGMGRL>helpThefollowingcommandsareavailable:addAddastandbydatabasetothebrokerconfigurationconnectConnecttoanOracleinstancecreateCreateabrokerconfigurationdisableDisableaconfiguration,adatabase,orFast-StartFailovereditEditaconfiguration,database,orinstanceenableEnableaconfiguration,adatabase,orFast-StartFailoverexitExittheprogramfailoverChangeastandbydatabasetobetheprimarydatabasehelpDisplaydescriptionandsyntaxforacommandquitExittheprogramreinstateChangeadisableddatabaseintoaviablestandbydatabaseremCommenttobeignoredbyDGMGRLremoveRemoveaconfiguration,database,orinstanceshowDisplayinformationaboutaconfiguration,database,orinstanceshutdownShutdownacurrentlyrunningOracleinstancestartStartFast-StartFailoverobserverstartupStartanOracledatabaseinstancestopStopFast-StartFa...