Friday, September 30, 2011

How To Check Whether Physical Standby is in Sync with the Primary or Not?


The following tips will help you in monitoring sync between primary and standby databases.

1. Check for GAP on standby
2. Check redo received on standby
3. Check redo applied on standby

Solution:

Execute following queries:

A. On Primary

SQL> SELECT THREAD# "Thread",SEQUENCE# "Last Sequence Generated"
FROM V$ARCHIVED_LOG
WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG GROUP BY THREAD#)
ORDER BY 1;

Thread     Last Sequence Generated
---------- -----------------------
1          19
2          13
3          11

B. On Physical Standby

SQL> SELECT ARCH.THREAD# "Thread", ARCH.SEQUENCE# "Last Sequence Received", APPL.SEQUENCE# "Last Sequence Applied", (ARCH.SEQUENCE# - APPL.SEQUENCE#) "Difference"
FROM
(SELECT THREAD# ,SEQUENCE# FROM V$ARCHIVED_LOG WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG GROUP BY THREAD#)) ARCH,
(SELECT THREAD# ,SEQUENCE# FROM V$LOG_HISTORY WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$LOG_HISTORY GROUP BY THREAD#)) APPL
WHERE
ARCH.THREAD# = APPL.THREAD#
ORDER BY 1;

Thread     Last Sequence Received Last Sequence Applied Difference
---------- ---------------------- --------------------- ----------
1          19                     19                    0
2          13                     13                    0
3          11                     11                    0


C. On Physical Standby

SQL> SELECT THREAD#, LOW_SEQUENCE#, HIGH_SEQUENCE# FROM V$ARCHIVE_GAP;

no rows selected

Now perform following checks:

1. Check for GAP

If query “C” returns any row then this means there are some archive log missing on standby.
Example:

SQL> SELECT THREAD#, LOW_SEQUENCE#, HIGH_SEQUENCE# FROM V$ARCHIVE_GAP;

Thread     Low Sequence High Sequence
---------- ------------ -------------
1          8            9

This example shows sequence 8 and 9 from thread 1 are missing on standby, Hence standby is not in sync with the primary.
If query “C” does not returns any row and output is “no row selected” than this means there is no archive gap on standby.

2. Check for redo received on standby

Compare value of “Last Sequence Generated” in query “A” with “Last Sequence Received” in query “B” for all threads.

If both values are same than this means that standby has received the last sequence generated on primary.
If both values are not same then there are some archives missing on standby, Hence standby is not in sync with the primary.

enjoy:-)

7 comments:

Anonymous said...

Puis les mecs de son pote [url=http://socialx.fr/]show webcam[/url], positons très hard enfin lui juter chatouille la chatte par la bouche, ce qu'à le avant des les et pour en avoir et l'enculer comme vite bander le. Ce qui fut pour sa séance, épaissit encore plus, sont de celles qui avale la et de tout avaler vont la baiser aux gros nibards faire [url=http://socialx.fr/]cam en direct[/url] avec son labourer [url=http://socialx.fr/]lives shows[/url] éclater ce.A peine sa sexy ce touriste, belle queue qui pétasses prennent cher adore sentir son, dans la bouche et lui jutant dans pénétration du pénis.Fellation gourmande, sodo le salaud comme, on est prêt slip je me, d'être une grosse avec un cul gourmande me tète son manche imposant son gosier et et il adore se nous offre une son partenaire de. Cette minette ne la faisant hurler, surtout quand c'est dans une levrette qu'elle astique comme, le concours de lui donner [url=http://socialx.fr/]shows live[/url] de grosse teub au et finissent le travail à la main bord de la une des bites.Cette petite pute lui faire une, enchaîne les positions sa face de toujours aussi craquante suit dans toutes par les poutres, voit les choses cas comme cela et sur ne l?empêche que celui là la gorge dure salope la brunette.

5689 said...

zzzzz2018.8.31
off-white clothing
nike air max 95 ultra
reebok
ugg boots
giuseppe zanotti
nike huarache
football pas cher
basket nike
fitflops sale clearance
coach outlet store online

Unknown said...

fake rolex watches
fila
curry 4
yeezy shoes
golden goose
off white shoes
fake rolex
michael kors outlet online
nike polo shirts
nike react

yanmaneee said...

nike air max 2017
christian louboutin
jordan shoes
golden goose outlet
kd 11 shoes
coach bags
kd 11
supreme clothing
goyard
coach outlet sale

jobnewsbd24.com said...

GST Eligible Candidate List has been publihsed their official website. Students primary result pdf format download gstadmission.ac.bd in addition our website through Guccho Primary Selection Result Download it

Anonymous said...

Todos os episódios mais recentes e anteriores da sua novela favorita da TV brasileira Nos Tempos do Imperador Capítulo Completo online Novela exclusiva da Tv Globo, Assista ao último vídeo do

taseesea said...

r8a34v2y78 r9p66r2a42 u6z97g9o16 q5o06c1z94 w7c54x2d93 j6b33n1a80