How To Check Whether Physical Standby is in Sync with the Primary
hi All,
I'm new in data guard. In our current production, my boss is asking me to write a shell scripts monitoring physical standby and primary archive is sync (archive gap)
I'm referring metalink [ID 861595.1], but when i ran the first query in Primary node, the screen hang.
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;
I tried to turn on 10046 SQL trace, the SQL consume a lot of CPU, and it full table scan in X$KCCAL table.
TKPROF result look like below:
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 88.29 115.59 0 0 0 0
total 3 88.30 115.60 0 0 0 0
Misses in library cache during parse: 1
Misses in library cache during execute: 1 Optimizer mode: ALL_ROWS Parsing user id: 80
Rows Row Source Operation
0 SORT ORDER BY (cr=0 pr=0 pw=0 time=21 us)
0 FILTER (cr=0 pr=0 pw=0 time=19 us)
1124 FIXED TABLE FULL X$KCCAL (cr=0 pr=0 pw=0 time=40537 us)
0 FILTER (cr=0 pr=0 pw=0 time=115538625 us)
1122 HASH GROUP BY (cr=0 pr=0 pw=0 time=115530193 us)
7465972 FIXED TABLE FULL X$KCCAL (cr=0 pr=0 pw=0 time=94648975 us)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
----------------------------------- Waited ---------- ------------
SQL*Net message to client 1 0.00 0.00
control file sequential read 16841 0.05 30.88
SQL*Net break/reset to client 1 0.00 0.00Due to this is production environment, thus i had terminated the session, can anyone teach me or share with me any scripts to monitor physical standby is sync with primary or not? Or do you encounter the above issue when running the SQL?
My db version is Oracle 11.2.0.1.0
Thanks in advance.
Regards,
Klnghau
Hello;
Note 861595.1 has not been subject to an independent technical review. Not sure if that make it bad or not.
This is what I'm using: ( I spool this to a file and have it e-mailed to me daily)
PROMPT
PROMPT Checking last sequence in v$archived_log
PROMPT
clear screen
set linesize 100
column STANDBY format a20
column applied format a10
SELECT name as STANDBY, SEQUENCE#, applied, completion_time from v$archived_log WHERE DEST_ID = 2 AND NEXT_TIME > SYSDATE -1;
prompt
prompt----------------Last log on Primary--------------------------------------|
prompt
select max(sequence#) from v$archived_log where NEXT_TIME > sysdate -1;
Best Regards
mseberg
Similar Messages
-
Checking Whether Physical Standby is in Sync with the Primary
I writing script to alert dba if primary and standby database are not in sync. I use article - How To Check Whether Physical Standby is in Sync with the Primary? ID 861595.1
It suggests comparing Last Sequence Generated on primary and Last Sequence Received on standby for each thread. And if they are not equal - NOT in sync.
My assumption is that if there are multiple threads we running RAC. Is it correct ?
And if we running RAC as far as I am aware it's sufficient to have one thread in sync.
Please comment on this
Thanks in advance
Edited by: user613441 on Jan 6, 2010 9:16 PM
Edited by: user613441 on Jan 6, 2010 9:17 PMdeleted
-
How to check whether a default browser is opened in the operating system?
Hi,
I am newbie here. During my work, I faced an interesting problem. I need to:
- check whether a default html browser is opened;
- check whether the browser is minimized/maximized (simply, a window's state);
- get an url address typed in the browser.
If any of these conditions is not met, I have to open the browser in a maximized view with a desired url address. I primarily wanted to do all this in Java, but it came to my mind that I should employ many techniques/technologies and combine them appropriately to complete the functionality. But, which ones? That's the problem. I just recalled Windows API, but I'm not sure if it is of any help... On another forum, some users suggested that I should consider JNI... At this time, I only know how to open a default browser (e.g. with use of the 'browse(URI uri)' method of the 'java.awt.Desktop' class) - that's too little to be proud of. Please give me some hints, maybe links to reasonable discussions, I would greatly appreciate any suggestions how to approach the problem.Crosspost! [http://www.java-forums.org/advanced-java/29583-how-check-whether-default-browser-opened-operating-system.html]
-
How to check for physical damage on a disk using the Command Line
I have a startup disk that I suspect of physical damage. The symptoms is that the server (10.4.7) would "hang" randomly, about once a day. I have already changed it and restored from a backup, and now everything is fine. However just out of curiosity are there any command line utilities to do a physical surface scan of the drive, like TechTool Pro but included in Mac OS X Tiger?
G4 Dual 1.42 Ghz Mac OS X (10.4.6)Extract from the Command Line Guide for Tiger Server:
Checking for Disk Problems
You can use the diskutil or fsck command (fsck_hfs for HFS volumes) to check the physical condition and file system integrity of a volume. For more information, see the related man pages.
MacBook Pro Mac OS X (10.4.7) -
How to check whether file exist in a folder at the application server
Hi to all experts.
if suppose there is a file at the application server test.txt my requirement if the one more file is created of the same name before overwriting the file a warning message is to displayed to the user that the file already exist .
how to do itHI Mohammed,
use The FM DX_FILE_EXISTENCE_CHECK
or static class CL_GUI_FRONTEND_SERVICES=>FILE_EXIST
For more info
search file in application server
application server
hope it helps you.
Regards! -
Physical Standby Database Lags Far Behind the Primary Database scenario
Hi,
Have anyone successfully implemented described in the Oracle Documentation following
scenario?
For me it does not work at all.
After implementing all steps current_scn of standby database remains the same and when trying to push recovery using redo it asks for non-existing archived log which I can't restore on primary database as all backups containing that archived log already gone.
The only option is to recreate standby database from backup again.
Best Regards,
AlexI already found the reason.
Just for your information:
Recovering a Standby database from a missing archivelog
Unfortunately documentation missed that important step of standby controlfile recreation.
To my luck I was copying the whole backup to the standby server when found this link. -
How do I get my iCloud account to sync with the data on my mobile device?
I recently erased my hard drive in my iMac and did a clean install of Yosemite. My iPad and iPhone have my contacts on them ,but my iCloud account and my iMac only have the contacts that I've added manually. How do i get the contacts from my mobile device(s) into iCloud and o
nto my iMac?
-
How Do I stop an old iPod from syncing with the cloud apart from using iTunes Match
I have an old ipod touch with a 30 pin connector. How do I stop it from syncing all apps to the cloud exept itunes match, Facebook, Twitter, and Messenger.
I'm afraid I don't understand the question. What are you trying to accomplish?
-
Just bought an MacBook Air.
My hotmail account is set up on the email on my Mac.
However it won't sync with the calendar.
I have an ipad where the calendar entries on my hotmail do show weirdly.
Help!Hello Ollie UK Mac,
You can add your account via Calendar's Preferences, in the Accounts pane.
Calendar (Mavericks): Accounts preferences
http://support.apple.com/kb/PH14995
Cheers,
Allen -
How to sync the standby database with the primary?
Hi..We have dataguard setup for our production databases(10.2.0.3).
I need one clarification regarding the standby database sync with primary.We identified one of our databases is not in sync with the primary and for longtime the archives are not getting applied at the secondary.
We decided to take the incremental (from SCN)backup from primary and use that at the standby to resolve the gap as described in the book "Oracle dataguard concepts and administration".
But, before doing that,we observed couple of structural changes were not applied at the standby(ex:some tablespaces were not created in secondary where as they were there in primary).
How to apply these changes at the secondary as the standby is in mount state.(Can I open this database and create those tablespaces ?? or do you suggest any other way.
Thanks for your reply.This points to a setup problem. Something missing, a parameter set wrong etc.
While your question is asking something different - How to correct, I would consider how to prevent. Unless you have a gap or logs not applied you have a deeper issue.
If you have a gap or logs not applied then correct it and check to see if the missing object are present.
The key parameters for Oracle 10 are :
FAL_SERVER=STANDBY
FAL_CLIENT=PRIMARY
STANDBY_FILE_MANAGEMENT=AUTO
DB_FILE_NAME_CONVERT='STANDBY','PRIMARY'
LOG_FILE_NAME_CONVERT='STANDBY','PRIMARY'
log_archive_dest_1='LOCATION=/u01/app/oracle/oradata/PRIMARY/archive VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=PRIMARY'
log_archive_dest_2='SERVICE=STANDBY LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=STANDBY'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
LOG_ARCHIVE_MAX_PROCESSES=30
Check them on both sides for issues.
If your standby is really trashed consider using RMAN to duplicate it. You might end up saving time. I have Oracle 11 short notes on this but it will work on Oracle 10 too.
http://www.visi.com/~mseberg/duprman.html
Otherwise use statements like this to resolve you gap.
ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/oradata/STANDBY/archive/PRIMARY_1_20_716110538.arc';
ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/oradata/STANDBY/archive/PRIMARY_1_21_716110538.arc';See Section 5.8 Managing Archive Gaps of oracle document B14239-05
Best Regards
mseberg
CKPT is correct, sorry I missed the Welcome to OTN!
Edited by: mseberg on Jul 5, 2011 10:34 AM -
R12.1.1 staging complete! How to check whether the stage is Good
Hi Gurusl,
I have completed staging R12.1.1 for Hp unix B.11.31. I want to know how to check whether the stage is good for installation or whether it is corrupted. Is there any metalink note or script from where we can check it. Ur help will be highly appreciated. Thanks in advance
regards,Hi,
Please refer to (Note: 802195.1 - MD5 Checksums for R12.1.1 Rapid Install Media).
Regards,
Hussein -
How to check whether transport path exist between two systems in sld??
Hi,
I have two systems namely 'A' and 'B' and created business systems for both of them.Then i created transport path between the two systems.How i check whether what i have done is right in SLD.<b>WRT to CMS</b>
am not sure with this but u can try:
1. Start CMS: http://<host>:<J2EE Engine http port>/webdynpro/dispatcher/sap.com/tcSLCMS~WebUI/Cms.
2. Goto lansdscape configurator and check there
Message was edited by:
Prabhu S -
How to check whether follow on document is created for sc or po,is there any table or fm available?
Hello Venu
Check FM: BBP_PD_SC_GETDETAIL and BBP_PD_PO_GETDETAIL table E_HEADER_REL
Check this: SRM Shopping cart and PO tables link
Regards -
How to check whether there r new txt files in a folder n file creation date
How to check whether there r new text files in a specified folder and what is the date of creation of the text file.........?
Hi
I have been searching for a solution to find the date of creation of a file for over 6 months now but haven't found it. So I presume that it is not possible though I havent found any authentication of my assumption in any document.
Cheers!
Shailesh -
How to check whether calendar is being used in any of the sap application
Hello All,
We are having few factory calendars. However some of the calendar having valid to year 2010. Can you please let me know how to check whether these calendar is being used in any of the sap application/module
kindly reply as early as possible
Regards
GirishHi RKS
yesterday BLOG by our SUMMER WANG helps every SRM consultant to debug the PO error
/people/summer.wang/blog/2010/05/11/trouble-shooting-of-srm-po-transfer-error
Good work Summer wang !!
Muthu
Maybe you are looking for
-
My Final Cut Pro 7 won't open! Help!
Hey! So I've had FCP 7 for awhile now and it's been working perfectly! But then a week ago I tried to open it and it spends a couple of seconds starting up then comes up with, ' Unable to locate the following external devices: Apple FireWire NTSC (72
-
TS1717 iTunes broken since update. Any ideas?
Since the update, not only can I not access the iTunes store (It begins to load, but crashes within seconds, freezing my whole computer), but my library is messing up too. I can't skip ahead on videos, and some won't even load at all. I have tried un
-
hi friends i have an issue...i would like to know where we assign the Date of last inspection...i have the table name for that but i couldnt find the tcode for seeing its actual process screen other than the table screen the table name i
-
Dear professionals, Our client has this hierarchy for our materials: Category (6 materials types) -> Family (each material type has at least 2 families of materials) -> Group (each family has at least 10 groups) -> Subgroup (each subgroup has many su
-
Mbox recognized but NOT working--input volume greyed
I have the original Mbox, which came with protools 6.4 I used to use the mbox with garageband and have no problem. At some point I updated to OS 10.4.3 At about the same point I updated to protools 7.0 Now the Mbox appears in the pref list in garageb