0 ratings0% found this document useful (0 votes) 96 views4 pagesDocument 1577406.1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
2aszo16 Document 1877406.1
ORACLE wy onacte surpont Hi Fomerivewisort |] © cates eto) ~ RO) ContactUs Hel
[ToutaaehY xnoiaage \ Server Reunas | paces Uns oF Cone ey Guisress 2
‘fy Sctipt to Collect Data Guard Physical and Active Standby Diagnostic Information for Version 10g and above
{Including RAC) (Doc 1D 1577406.1) Gres
hipsisupport.orace.comisomosfaces/DocumentDisplay?_arLoop=279696951S062828id= 1577406.18 a.cti-stte=ShloxgSry_950 us2asz016 Document 1877406.1
ars “© as this document hap?
Oracle Database - Enterprise Eton - Version 10.0.2 and later to
Information inthis document apples to any lator,
Pon ~ Docoment etait
aaa
NAME: new_da_psby_ciag.sl Tee
Copyright 2002, Oracle Corpra lest PUSHED
~ Copyright 2002 Oracle Corporaton haus
ese Gpsas205
"LAST UPDATED: 02-Sep-2015 ee
: Up
Usage: Bnew da psby_ diag
~ (Run from saps on PHYSICAL STANDBY, ACTIVE STANDBY as SYS) ~ Rented Products
: Oceans trie
"PURPOSE: etn
Ths Srp is tobe used to assist nthe collection of information to help formation cantare
~ troubleshoot Data Guard issues ining a Pysical or Active Standby.
~~ inemten Cater: Ove
rtmase Selon
~ DISCLAIMER: Fatalcion nd
~ Uaeiiton
This Srp is provided for eccational purposes only, Iis NOT (Sez?
~ support by Oracle World Wide Technical Support. ccs
The seripthas been tested and appears to work as Intended, Wioronencanet
You shoul always ran new sents ona test nstace intially lisse
- boat Sry hoe
~ Srp ous 25 flows: fists
set echo of
Set feedback ff Document Reterences
Calumn tmecolnen_ value timestamp te References nate fr
Calumn speo|extension new vale suc mn
SELECT TO_CAAR(s}sdat, yyy n24m!) Seco, Hem! spool extension FROM dal;
Column output ney_value dba
SRE OE es even neta ete _ meen
Sea hd sncsttetant et
aS soso
ster Se
an wemeecneeas
sr fama
STEEL Som ot eas
Scene mere
Atco er om Sonnets Eee,
SHEE esac oe ova chouarpaet
Insracton two tho
res uae Sou anda
setecho on fa ae Cran
ben
~ The follwing select wl ve us he geri nfrmavion abou how this stands sup. eae
“The DATABASE ROLE suk’ be STANDBY a rat what th serps nando toe Fun on Eoin
~PLATFORM_}O Should mach the PLATFORH_}0 ofthe primary or conform tothe supported options in
Note: 4134841 Data Guard Suppor for Hetaregencous Primary and Physical tans n Same Data Guard Configuration.
~ FLASHBACK can be YES (fecommended) of NO.
PROTECTION LEVEL i ferent rom PROTECTION_MODE the for ome reason the mode listed in PROTECTION MODE
ferperenced a need to downgrade,
“Once the ertor condition has been corected the PROTECTION_LEVEL should match the PROTECTION MODE after the rex og
wich
SELECT catabase_yoe oe, name, e2_unigue_name,oatform i, open_mode, lg_made, flashback on, protecton_made,
protection evel FROM vsdetabase
~ FORCE_LOGGING Is not mandatory but is recommenced
" REMOTE_ARCHIVE shoule be ENABLE,
'SUPRLEVENTAL_LOG_DATA_PK anc SUPPLEMENTAL LOG_DATA_UI must be enabled if this standby is associated with 2
primary that has lial standby,
During normal operations i aceptable for SWITCHOVER_ STATUS tobe NOT ALLOWED.
~ DATAGUARD_BROKER can be ENABLED (recommended) oF DISABLED,
Column force Jogging format 313 ts
column supplemental jog. daa_pk format a2¢ tu
tclumn supplemental data_u format a2¢ ru
SELECT force_oggng,remote_arctive, supplemental log_data_pk, suoplementllog data_u, swichover stats,
ataguard_ broker FROM vsdatabase;
~ Check how many treads are enabled a started for this database fe number of instances below does nt match then not
a instances ae wp.
hipsisupport.orace.comisomosfaces/DocumentDisplay?_arLoop=279696951S062828id= 1577406.18 a.cti-stte=ShloxgSry_9502aszo16 Document 1577405.1
SELECT tveadt, instance, status FROM wtvead;
~The number of instances returned below isthe number currently runing. fi oes ret match the number returned in
“Threads above then aot al stances are vo
~ VERSION shoule match the version frm the primary database
“ ARCHIVER can be (STOPPED | STARTED | FAILED), PAILED moans thatthe achive alle to archive a fg lasttime, but wi
‘eyagain wihin 5 minutes
“LOG_SWITCH_WAT te ARCHIVE LOG/CLEAR LOG/CHECKPOINT event og switching is wali fr.
“Nets that i ALTER SYSTEM SWITCH LOGFILE hung, but there I room in the ater one redo, then the value fs NULL
cclumn hos
SELECT treads, instance_name, hosL name, version, archiver, lo_slch_walt FROM gvfinstance ORDER BY ead;
~ Check the number and size of online red logs on each tread.
SELECT tweadd, croup, sequences, byes, archived status FROM vflog ORDER BY treads, group
~The follwing query s runt 8 f standby redo logs have been created
~The standby redo os should be the same size asthe one redo los.
" Thare shouldbe ((# of enine logs pr thread + 1) * # of treads) standby redo loos.
“A alue of forthe tread# mears the og has never been allocated
SELECT beady, group, sequences, byes, archived, status FROM vfstandby_hg oder by tweads, groupe;
This quer produces 2 Ist of defined areivedestiaton.
ows I thay are enabled, what process serving hat destin, If the destination Ileal or remote, an if remote what
‘the current mount 10
"Fora physical standby we should have a least ene remote destination that pins the primary set
calumn destiaton format 295 wrap
txlumn process format a7,
falumn 1 format 98
felumn mid format 99
SELECT tread, dest, destination, qvad status, taro, scheculs process, mound mi FROM gySarchive_dest ova,
‘vinstance gw WHERE grains ~ gvinsj6 AND destination ls NOT NULL ORDER BY tread, dest 2
~ I the protection made ofthe standby is set to anything higher than max performance then we need to make sure the remote
estinaton that points to the primary is se wits the correct opsors else we wll ave issues rng switchover
set numwiath 8
falumn archiver format 8
falumn 1 format 98
tclumn err format 255 wrap
SELECT tread, cest i, gad.archive, tranami mode, affirm, asyne_blocs, net Smeou, delay mins, reopen. secs reopen,
register, binding FROM avSerchne_ dest gia, gvSinstance vi WHERE gvad.inct d= gw.nctd AND dessnaons NOT NULL
ORDER BY treads, dest;
~The following select wil show any erors that occured the ast ie an attr to archive tothe destination was attempted
" ERROR is lank and status 's VALID then the arhive completes correct,
SELECT tread, cest i, gved.status error FROM gvtarchive_destqvag, ginstance gv WHERE gvacnst id = gins AND
destnavon is NOT NULL ORDER BY thence, dest;
~The query below wl determine any error conctons have been reached by quenyng the idetaguerd_stats view (vw only
‘vad n9.2.0 and above)
Column message format a80
SELECT timestamp, qitread#, message FROM gvSdataqurd_ status gs, gvfinsance gv WHERE gidsinst_Id = aves id
AND severity in (Ear Fata’) ORDER BY timestamp, vend
~ Query avfmanaged_ standby to se the status of processes imoed in the shipping redo on this system
Dees nat nlude processes needed % aly redo
SELECT tveade, proces, 9a, status, clent_process, dient, sequence, lock, acive_agents,known_agerts FROM
rdmanaged_ standby ORDER BY treads, process;
Verity the last sequenced received and the lst sequence? appled to standby database
SELECT altird "Thread, almax "Last Seq Received max Last Seq Apple” FROM (select thread thd, MAX sequence#)
almax FROM vfarchived log WHERE restlogs_crarge#»(SELECT resctlogs_change# FROM vsdatabase) GROUP BY tread) al,
(SELECT threads ta, NAX{sequences)Ihmax FROM vlos_histry WHERE reseogs_chenge=(SELECT resetlogs_changed
FROM vfdotabase) GROUP BY tread) Ih WHERE ald =.
~ Check the anspor lag and apply lag trom the VSDATAGUARD_STATS view. Tiss only relevant whan LGWR log transport
and real sme apely ae in use
SELECT * FROM vSdataguaré_stats WHERE name LIKE 94a
~ Check how often and how far the apply as.
SELECT name ime, unit, coun, TO_DATE(as
(ORDER BY unt DESC, me}
ime_ updated, 'NM/DO/WY HHDA:MI:SS}) FROM vSstany_ event isogram
htpesisupeortorace.comiapmosfaces/DacumertDisplay?_arLoqp=2795359615062828i
1977406.18_ act state=ShloxgScy_ 960 a42asz016 Document 1877406.1
~The VSARCHIVE_GAP teed Wew on a piyscal standby database ony returns the next gap thats curentyblockng redo apply
from cot
After resolving the identified gap and starting redo epply, query the VEARCHIVE_GAP hed view again onthe physical standby
database to determine the nex gap sequence F there is one
SELECT * FROM vsarchive_g2p;
Nonedefout int parameters
“For a RAC DB Thread ~ * means the vale is the same for all threads (SID=*)
“Thneads with aiferent values are shown with ther indicus ends and vals,
calume num nop
SELECT num, "* "THREAD", name, value FROM vS2ARAMETER WHERE NUM IN (SELECT num FROM véparameter WHERE
(Gdefaut = FALSE OR ismdified <> FALSE) AND name NOT LIKE n°
nus
SELECT num FROM guspsrameter ov, sistance gv WHERE num IN (SELECT DISTINCT gypa.rur FROM ovsparameter yp,
sgejparametergupb WHERE avpa.num = gipo.rum AND evpa.value <> avpb.salue AND (ovpa.sdetaut = FALSE OR
‘passed <> FALSE) AND gype.name NOT LIKE is") AND qvi.nstld = gvpinsLid AND (aypscefet = FALSE” OR
‘yp forced <> 'FALSE) AND gop name NOT LIKE)
Union
SELECT nur, TO_CHAR(Qread#) "THREAD#", name, value FROM cvfparameterevp, Sinstance vi WHERE rum IN (SELECT
DISTINCT gvpa.tum FROM gvSparameter vps, evsparametzrcvpb WERE gwpa.num = evpb-num AND gvpasalue <>
svpbsalee AND (ovp. default = FALSE OR gvpe.ismodied <> FALSE) AND gvp.name NOT LIKE rs Se) AND gins
‘vb inst_d AND (exp sdefelt = "FALSE OR gvp.smoiied <> FALSE} AND gyp.name NOT LIKE ‘ls%' ORDER BY I, 2;
spool off
Set markup hr ff entmap on
sevecno on
‘rnd war uarelockngfo? Askin Conny
wiAttachments
‘B cecete os SYS06A or S06 agains te Pica Standby Detabese (8.26 KB)
Related
Products
+ orale atta oct > Oa alate Suite > OradeDlabee > Orade Daabae reise ton > Oral Bea Guard > Alls Standby see
Keywords
@amcrtotee
Ca) 216 Ome. A erm, | Rts se Teme | Pay Store
hipsisuppot.oracle.comisomasfaces/DocumentDisplay?_arLoop=27969695 1S062828id= 1577406.18 a.ti-stte=ShloxgSry_950