Sync of Primary and Standby
Hi,
SQL> select database_role from v$database;
DATABASE_ROLE
PRIMARY
SQL> select applied,status from v$archived_log where applied='NO' and status='A';
APP S
NO A
NO A
NO A
NO A
NO A
NO A
NO A
NO A
NO A
NO A
NO A
APP S
NO A
NO A
NO A
NO A
NO A
NO A
NO A
18 rows selected.
SQL> SELECT THREAD#, LOW_SEQUENCE#, HIGH_SEQUENCE# FROM V$ARCHIVE_GAP;
no rows selected
On my standby
SQL> select database_role from v$database;
DATABASE_ROLE
PHYSICAL STANDBY
SQL> SELECT THREAD#, LOW_SEQUENCE#, HIGH_SEQUENCE# FROM V$ARCHIVE_GAP;
no rows selected
IS my primary in sync with standby, if "yes", why am I getting the applied status as "NO" from v$archived_log
Thanks
OK
If you run this :
select applied,status from v$archived_log where applied='NO' and status='A'; -- Available On the Primary side you won't get "Applied".
One option is to run something like this on the Primary changing SYSDATE and DEST_ID as needed. :
SELECT
NAME AS STANDBY,
SEQUENCE#,
APPLIED,
COMPLETION_TIME
FROM
V$ARCHIVED_LOG
WHERE
DEST_ID = 2
AND
NEXT_TIME > SYSDATE -1;
You can also add DEST_ID to the SELECT statement and take it out of the WHERE clause to get a better idea how V$ARCHIVED_LOG works.
SELECT
NAME AS STANDBY,
SEQUENCE#,
APPLIED,
COMPLETION_TIME,
DEST_ID
FROM
V$ARCHIVED_LOG
AND
NEXT_TIME > SYSDATE -1;
V$ARCHIVE_GAP has never helped me with gaps. For some reason I have alway gotton the same results as you, "no rows selected" .
This query ( again run from the Primary ) covers a lot of ground because it tells you in a single line
the last Sequence number, the last applied, the applied time and size of gap ( so zero is good )
SET PAGESIZE 140
COL DB_NAME FORMAT A10
COL HOSTNAME FORMAT A14
COL LOG_ARCHIVED FORMAT 999999
COL LOG_APPLIED FORMAT 999999
COL LOG_GAP FORMAT 9999
COL APPLIED_TIME FORMAT A14
SELECT
DB_NAME, HOSTNAME, LOG_ARCHIVED, LOG_APPLIED, APPLIED_TIME, LOG_ARCHIVED-LOG_APPLIED LOG_GAP
FROM
( SELECT
NAME DB_NAME
FROM
V$DATABASE
SELECT
UPPER(SUBSTR(HOST_NAME,1,(DECODE(INSTR(HOST_NAME,'.'),0,LENGTH(HOST_NAME), (INSTR(HOST_NAME,'.')-1))))) HOSTNAME
FROM
V$INSTANCE
SELECT
MAX(SEQUENCE#) LOG_ARCHIVED
FROM
V$ARCHIVED_LOG
WHERE
DEST_ID=1
AND
ARCHIVED='YES'
SELECT
MAX(SEQUENCE#) LOG_APPLIED
FROM
V$ARCHIVED_LOG
WHERE
DEST_ID=2
AND
APPLIED='YES'
SELECT
TO_CHAR(MAX(COMPLETION_TIME),'DD-MON/HH24:MI') APPLIED_TIME
FROM
V$ARCHIVED_LOG
WHERE
DEST_ID=2
AND
APPLIED='YES'
);Try some of these and see if they help you.
Best Regards
mseberg
Similar Messages
-
Hello !!!
I have noticed that my standby database(11g) was still in sync after stopping the primary and standby database listener.
If this is the case then how log is transferring from primary to standby ? it is not using listener service ? kindly clarifyRead this Metalink Note:407040.1
-
How to sync primary and standby database in 11GR2 on linux
Hi ,
How to sync primary and standby database in 11GR2 on linux . Both my primay and standby are 3 node cluster each.
Can you please suggest a good link and brief steps .
ThanksAre you trying to setup a new standby or sync an existing standby database?
OK I see it
"standby is behind the primary"
So you have a gap.
I would check both alert logs for a cause. You might find something like this
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor.Look for ORA-00308 and ORA-27037 and ORA-16055.
There's no sense fixing the gap unless the cause is fixed too.
Also check out this post from a few days ago its dealing with similar issues.
How to sync the standby database with the primary?
If you find this helpful please mark it so.
Edited by: mseberg on Jul 20, 2011 4:37 PM -
V$dataguard_stats showing 8 hrs delay between Primary and standby
Hello All,
My Primary and standby database are in sync but v$dataguard_stats on standby server showing 8 hrs delay between Primary and standby.
DB Version:11.2.0.1.0
Server :AIX
Primary:
SQL> select /*+ FULL(c) PARALLEL(c, 35) */ distinct SEQUENCE# "Last Sequence Generated" FROM V$ARCHIVED_LOG c WHERE (THREAD#,FIRST_TIME ) IN (select /*+ FULL(c) PARALLEL(c, 35) */ THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG c GROUP BY THREAD#);
Last Sequence Generated
4521
Standby:
SQL> SELECT APPL.SEQUENCE# "Last Sequence Applied"
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,
2 3 (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
4 WHERE ARCH.THREAD# = APPL.THREAD#;
Last Sequence Applied
4521
SQL> SELECT ARCH.THREAD# "Thread", ARCH.SEQUENCE# "Last Sequence Received", APPL.SEQUENCE# "Last Sequence Applied", (ARCH.SEQUENCE# - APPL.SEQUENCE#) "Difference"
2 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,
3 (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#;
4
Thread Last Sequence Received Last Sequence Applied Difference
1 4521 4521 0
SQL> select name, 'Hours', to_number(substr(value,5,2)) from v$dataguard_stats where name = 'apply lag' ;
NAME 'HOUR TO_NUMBER(SUBSTR(VALUE,5,2))
apply lag Hours 8------------------------------------------------------------------>>>Problem areaSQL> SELECT status, error
FROM V$ARCHIVE_DEST_STATUS
WHERE STATUS <> 'DEFERRED' AND STATUS <> 'INACTIVE'; 2 3
STATUS ERROR
VALID
VALID
Standby--Generally in Night it happens that primary and standby 'apply lag' is 8/10/4 hrs .When manually checked database are in sync but v$dataguard_stats showing difference in hrs
NAME 'AL
SUBSTR(VALUE,1,12)
apply lag ALL
+00 04:11:03
SQL> SQL> 2
NAME 'SECOND TO_NUMBER(SUBSTR(VALUE,11,2))
apply lag Seconds 3
SQL> SQL> 2
NAME 'MINUTE TO_NUMBER(SUBSTR(VALUE,8,2))
apply lag Minutes 11
SQL> SQL> 2
NAME 'HOUR TO_NUMBER(SUBSTR(VALUE,5,2))
apply lag Hours 4
SQL> SQL> 2
NAME 'DAY TO_NUMBER(SUBSTR(VALUE,2,2))
apply lag Days 0 -
How to re-synch primary and standby database?
Hello everyone,
Working on 10g R2/windows server 2003, I have configured a physical standby database but, I have an issue, and don't know how to resolve it.
We were making an update that made some DDL and DML on our application, and for security reason we
1. we ensure that primary and standby are in sync
2. We made a cold backup of the primary database
3. We Deferred the redo shipping between primary and standby
4. We applied changes on primary database
But the big issue is that, for any reason my colleague did the following.
a) made above steps 1,2,3,4
b) after the update he kept the resulted archived log files generated during to another location
c) He restore the cold backup before the update(step 2 above)
c) he applied again the update.
Now the issue is
At the first update step(2), the sequence# 553 was applied to the stand by before the update
At the second update step(c) above another sequence# 553 was created but stored localy in the primary database, because the both servers were deverged (step 3 above).
Technically both servers cannot be in sync again,because sequence# 553 at the first update has next_change# 80307804 and sequenc# 553 at the second update has next_change# 80461356.
Question:
How Can I do to rollback the the first sequence# 553 ( before the first update) on the standby database? in order to apply the sequence#553 generated at the second update and then re-sync both servers to roll forward subsequent sequence#? 554,etc...
Thank you for your helpHello,
I have just tried the FLASHBACK DATABASE TO SCN XXXXXXXX;
but it doesn't work.
Here are steps used from my local dev envirronnment
From the stand by I retrieved the following information.
SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# FIRST_TIM NEXT_TIME
95 707168 707906 15-AUG-08 15-AUG-08
96 707906 708653 15-AUG-08 15-AUG-08
97 708653 709359 15-AUG-08 15-AUG-08
100 710951 711794 15-AUG-08 15-AUG-08
98 709359 710179 15-AUG-08 15-AUG-08
99 710179 710951 15-AUG-08 15-AUG-08
101 711794 712762 15-AUG-08 15-AUG-08
102 712762 713720 15-AUG-08 15-AUG-08
103 713720 714748 15-AUG-08 15-AUG-08
104 714748 715920 15-AUG-08 15-AUG-08
105 715920 739430 15-AUG-08 15-AUG-08
106 739430 800525 15-AUG-08 16-AUG-08
107 800525 875810 16-AUG-08 17-AUG-08
108 875810 916527 17-AUG-08 18-AUG-08
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> alter database activate standby database; --> prepare to open stby in R/W mode
Database altered.
SQL> startup mount force;
ORACLE instance started.
Total System Global Area 612368384 bytes
Fixed Size 1250428 bytes
Variable Size 180358020 bytes
Database Buffers 423624704 bytes
Redo Buffers 7135232 bytes
Database mounted.
SQL> alter database set standby database to maximize performance;
Database altered.
SQL> alter database open;
Database altered.
SQL> startup mount force;
ORACLE instance started.
Total System Global Area 612368384 bytes
Fixed Size 1250428 bytes
Variable Size 180358020 bytes
Database Buffers 423624704 bytes
Redo Buffers 7135232 bytes
Database mounted.
Now I tried to mimic the flashback database as in the production, to bring it back to sequence# 105 above
SQL> flashback database to scn 739430;
flashback database to scn 739430
ERROR at line 1:
ORA-38754: FLASHBACK DATABASE not started; required redo log is not available
ORA-38761: redo log sequence 75 in thread 1, incarnation 2 could not be
accessed
I'm reverted back the physical standby to its function
SQL> alter database convert to physical standby;
Database altered.
SQL> startup mount force;
ORACLE instance started.
Total System Global Area 612368384 bytes
Fixed Size 1250428 bytes
Variable Size 180358020 bytes
Database Buffers 423624704 bytes
Redo Buffers 7135232 bytes
Database mounted.
SQL> alter database recover managed standby database using current logfile disconne
Database altered.
Verifying if the MRP is up and running: YES see below
SQL> select message from v$dataguard_status;
MESSAGE
ARC0: Archival started
ARC1: Archival started
ARC2: Archival started
ARC3: Archival started
ARC3: Becoming the 'no FAL' ARCH
ARC3: Becoming the 'no SRL' ARCH
ARC1: Becoming the heartbeat ARCH
Attempt to start background Managed Standby Recovery process
MRP0: Background Managed Standby Recovery process started
Managed Standby Recovery starting Real Time Apply
Clearing online redo logfile 1 C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO11.LOG
11 rows selected.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination C:\local_destination1_orcl
Oldest online log sequence 110
Next log sequence to archive 0
Current log sequence 110
So, how can I reslove this issue? without creating the standby from scratch?
Thanks Again for your help -
Primary and Standby CM question
In general, Primary and Standby CM's database tables, configurations, group polices should be sync'd up and looked identical, right? What else will be different and will require to import onto standby CM manually? Things like: SSL certificate, Secure store encryption...etcs.
Thanks!
JoeHello Joe,
I don't think you're leaving anything behind in regards how primary and standby CM sync works, just follow the steps from the configuration guide and everything will be taken care,if there was any doubt just let us know what WAAS software version your running and the specific question. Critical files like Secure-store and SSL certificates will be automatically sync as well.
Still, in my experience I stronly suggest to make sure your devices time settings are right.
Time settings is very important for the sync to work fine, best way is to use an NTP.
Please find the attached link to configure NTP and timezone:
Configuration Guide:
================
http://www.cisco.com/en/US/docs/app_ntwk_services/waas/waas/v417/configuration/guide/other.html#wp1042418
Command Reference:
http://www.cisco.com/en/US/docs/app_ntwk_services/waas/waas/v417/command/reference/glob_cfg.html#wp1496245
Good Luck! -
Require 9i Primary and Standby redo logs files same size?
Hi,
We have 9.2.0.6 Oracle RAC (2 node) and configured data guard (physical standby).
I want to increase redo log files size, but i can't this do same time primary and standby side.
Is there a rule, primary and standby database instances have same size redo log files?
If I increase only primary redo log files, is there any side effect? However I try this issue on test system. I increased all primary redo log files(if status='INACTIVE' drop redo log group and add redo log group, switch logfile,...)
, but i couldn't changed standby side. So the system is work well. Is this correct solution or not? How can i increase both sides redo log files?
Thank you for helps..Thank you for your helps.. I found this issue answer:
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14239/manage_ps.htm#i1010448
Consequently, when you add or drop an online redo log file at the primary site, it is important that you synchronize the changes in the standby database by following these steps:
If Redo Apply is running, you must cancel Redo Apply before you can change the log files.
If the STANDBY_FILE_MANAGEMENT initialization parameter is set to AUTO, change the value to MANUAL.
Add or drop an online redo log file:
To add an online redo log file, use a SQL statement such as this:
SQL> ALTER DATABASE ADD LOGFILE '/disk1/oracle/oradata/payroll/prmy3.log' SIZE 100M;
To drop an online redo log file, use a SQL statement such as this:
SQL> ALTER DATABASE DROP LOGFILE '/disk1/oracle/oradata/payroll/prmy3.log';
Repeat the statement you used in Step 3 on each standby database.
Restore the STANDBY_FILE_MANAGEMENT initialization parameter and the Redo Apply options to their original states.
bye.. -
Sequence of stopping starting Primary and standby DB
Hi,
what are the sequence of stopping starting Primary and standby DB ?
To stop, which one ,primary or Standby, should be stopped first ?
To Start which one first ?
Thank you.Hi,
what about the 10gR2 logical standbys? When I read the Note:278643.1 to apply the patch for logical database, it seemed that the sequence to stop and start the primary/logical standby was to stop the logical standby first before the stop of the primary one. Please advise me, for a simple situation just to stop and start the primary/logical standby to support a Unix server bounce, what is the sequence we should follow ? Do we have to run some commands to stop/start the SQL apply?
Any idea or suggestion will be greatly appreciated.
Thank you very much,
yKe -
Oracle data guard configuration for primary and standby db_name
I am working on configuring an active data guard for one primary DB and one standby DB. I have a few questions:
1. Can I use different db_name, db_unique_name and instance_name for primary and standby. For example: primary(db_name, db_unique_name and instance_name)=chicago. When I create standby DB with Rman backup and copy of pfile and control file from primary DB or use Grid control to create standby database. Oracle document or Grid control all keep standby db_name=chicago. Only make standby db_unique_name and instance_name=boston. Due to my application system condition, I want to make db_name=boston, not keep it as the same as primary=chicago. Is this valid configuration?
2. In primary datafiles, application system generate datafile name like this: hr_chicago_01.dbf, fn_chicago_01.dbf. When I move datafiles to standby server, if I plan to use db_name=boston for standby DB, can I rename datafiles as
hr_boston_01.dbf, fn_boston_01.dbf? In this way, datafile name match up with db_name. but I will create standby log group and members on primary and standby identically. If in future switching over, DB will not have problems.
3. If I don't use primary DB backup. Instead, I copy all datafiles, redo_log files (no control files) to standby. Then "alter database backup controlfile to trace" from promary and also " create pfile='/xxx/initSTANDBY.ora' from primary. Then modify init.ora and controlfile. Then run control.sql to bring standby DB up. After that, configure redo log shipping and apply with data guard or SQL. Is this a acceptable way to create physical standby DB?
Please advise your comments. Thanks in advance.I want to make db_name=boston, not keep it as the same as primary=chicago. Is this valid configuration?NO. DB_NAME must be the same ("chicago") at both sites. The Standby will be using a different DB_UNIQUE_NAME (e.g. "boston") and can be using a different Instance name / SID (e.g. "boston").
can I rename datafiles Yes. The database file names can be changed.
If I don't use primary DB backup. Instead, I copy all datafiles, redo_log files (no control files) to standbyWhat is the difference between the first sentence (a backup of the primary) and the second sentence (a copy of the primary) ? A Copy is a backup.
Are you intending to differentiate between an RMAN Backup and a User-Managed (aka "scripted") backup ?
Normally, for DataGuard, tou can use non-RMAN methods to copy the database but there's no value add in this.
You'd still have to setup DataGuard ! (and I wonder if you'd have complications setting up Active DataGuard).
But remember that you MUST create the Standby controlfile from the Primary and copy it over to your Standby -- particularly as you are planning to use DataGuard. This is not created by 'alter database backup controlfile to trace' , but by 'ALTER DATABASE CREATE STANDBY CONTROLFILE AS 'filename''
Hemant K Chitale -
Hello everybody i use Oracle Database EE 11.2.0.4 with DG.
In those cases i need to get Enterprise Manager Database Control running against DB with no RAC and no DG i perform the following steps:
I Logon SQLPLUS as user SYS or SYSTEM, and drop the sysman account and management objects:
DECLARE
CURSOR c1 IS
SELECT owner, synonym_name name
FROM dba_synonyms
WHERE table_owner = 'SYSMAN';
BEGIN
FOR r1 IN c1 LOOP
IF r1.owner = 'PUBLIC' THEN
EXECUTE IMMEDIATE 'DROP PUBLIC SYNONYM '||r1.name;
ELSE
EXECUTE IMMEDIATE 'DROP SYNONYM '||r1.owner||'.'||r1.name;
END IF;
END LOOP;
END;
DROP USER mgmt_view CASCADE;
DROP ROLE mgmt_user;
DROP USER sysman CASCADE;
After that i run
emca -config dbcontrol db -repos recreate
But what should i do in cases i have 2 servers working (primary and standby) under DG rules?Hi ,
It is not possible to monitor/administer a Logical or Physical Standby database, i.e Data Guard, using Enterprise Manager Database Control. This is primarily due to the fact that Database Control is designed to monitor 1 database and a Data Guard environment, by definition, includes more than 1 database.
If you attempt to run emca against a standby Database, you will get an error like (i.e. ORA-01219: database not open).
Database Control, can, of course, be used to monitor the current Primary database (with no ability to administer or monitor Data Guard related functionality). In such a case, when failover occurs Database Control must be reconfigured to run on the new Primary database using the commands detailed in Note 278100.1 How To Drop, Create And Recreate DB Control In A 10g Database, section C. Recreate/ReConfig DB Control, Option 2. Recreate the DB Control Configuration Files and Repository.
Enterprise Manager Grid Control or Cloud Control provides the functionality for viewing, monitoring, and administering primary and standby databases in a Data Guard configuration.
Reference: Is it Possible to Configure Database Control for a Logical or Physical Standby Database? (Doc ID 315116.1)
You can use EM 12c cloud control to monitor and manager Standby DB effectively
Ref to below link for details
Set Up and Manage Oracle Data Guard using Oracle Enterprise Manager Cloud Control 12c
Regards,
Rahul -
Logfile groups for Primary and Standby
Hi,
Oracle documents say that the size of Log files should be the same for primary and Standby. Presently it is not the case. I have logfile 100M for Primary (PROD) and 50M for Standby. To change them I should add new groups with file of 100M to standby. And then drop the small logs(50M). in this case the group number would not be the same. Would it be a problem ? Any other solution ? Thank you..Oracle documents say that the size of Log files should be the same for primary and Standby. It is only a recommendation, but, not mandatory. However, a messaage will be written to the standby alertlog file when standby database log file size is smillar than its primary database log file size.
in this case the group number would not be the same. Would it be a problem It won't be a problem.
Jaffar -
Can I have primary and standby in same OS but different releases.
All,
Can I have primary and standby DBs in same OS but in different releases?
i.e. primary is in RHEL 5 and standby is in RHEL 4, is it ok to setup or do we see any issues?
Thanks,
MahiIn 10g, dataguard started to support different binaries on primary and standby database servers with the same OS family. For example Microsoft Windows 64-bit on primary and Microsoft Windows 32-bit or Microsoft Windows 64-bit for AMD on standby database server. However with 11g, dataguard also supports different OS on primary and standby servers
Role Transitions for Data Guard Configurations Using Mixed Oracle Binaries [ID 414043.1]
Data Guard Support for Heterogeneous Primary and Physical Standbys in Same Data Guard Configuration [ID 413484.1] -
DNS / BIND - Can I configure primary and standby forwarders?
Hi all,
I have on Solaris 10 (x86) a DNS server (BIND 9.3.6-P1) that relies exclusively on two “forwarders”: 155.28.144.13and 154.23.134.32.
The configuration is as follow:
# cat /etc/named.conf
acl "CSClan" { 192.168.4.0/24; 192.168.7.0/24; }; //CSC internal LAN ip address range
options {
directory "/var/named";
forward only;
forwarders {
155.28.144.13;
154.23.134.32;
allow-query { "localnets"; };
# cat /etc/resolv.conf
nameserver 127.0.0.1
When I check with snoop, I can see requests sometimes to one forwarder, sometimes to the other.
Is it possible to configure DNS to use primarily one forwarder?
Thanks in advance for your support.
Best Regards,
Rui VilãoIn 10g, dataguard started to support different binaries on primary and standby database servers with the same OS family. For example Microsoft Windows 64-bit on primary and Microsoft Windows 32-bit or Microsoft Windows 64-bit for AMD on standby database server. However with 11g, dataguard also supports different OS on primary and standby servers
Role Transitions for Data Guard Configurations Using Mixed Oracle Binaries [ID 414043.1]
Data Guard Support for Heterogeneous Primary and Physical Standbys in Same Data Guard Configuration [ID 413484.1] -
Hi all,
11.2.0.1
Aix 6.1
I want to monitor the applied logs both on my primary and standby
using > select client_process, process, sequence#, status from v$managed_standby;
I want to issue the command on my client laptop so I want compare the output easily, whether logs are synch.
How can I connect to a standby database s which is not open using client?
Thanks a lot,
zxyhi,
Just wanted to share
On Primary
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;
On Standby
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;
SELECT THREAD#, LOW_SEQUENCE#, HIGH_SEQUENCE# FROM V$ARCHIVE_GAP;
Reference : http://www.oraclemasters.in/?p=1255
-- List archivelogs not applied on standby
SELECT DISTINCT SEQUENCE# FROM V$ARCHIVED_LOG where APPLIED='NO' and sequence# > 100 MINUS (SELECT SEQUENCE# FROM V$ARCHIVED_LOG where APPLIED='YES' AND SEQUENCE# IN (SELECT DISTINCT SEQUENCE# FROM V$ARCHIVED_LOG where APPLIED='NO'));
-- Give the count of archvielogs not applied on standby
select thread#,count(sequence#) "COUNT_ARCS_PENDING" from (SELECT DISTINCT THREAD# ,SEQUENCE# FROM V$ARCHIVED_LOG where APPLIED='NO' and sequence# > 100 MINUS (SELECT THREAD#,SEQUENCE# FROM V$ARCHIVED_LOG where APPLIED='YES' AND SEQUENCE# IN (SELECT DISTINCT SEQUENCE# FROM V$ARCHIVED_LOG where APPLIED='NO' and sequence# > 100))) group by thread#; -
Purging archivelogs on Primary and Standby
Hi all,
11.2.0.1
Aix 6.1
I am monitoring space usage in our FRA for both DG primary and standby. I want to purge all archivelogs once they have been applied to standby. What is the use of it anyway?
I checked google and I found this procedure, kindly correct if this is wrong?
At Primary:
=========
RMAN
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
At Standby:
========
RMAN
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
Where do I issue the command DELETE NOPROMPT OBSOLETE ARCHIVELOGS?
Thanks a lot,
zxyWhich tool in oracle dear maintains the FRA/achivelogs? is it RMAN or Dataguard. If it maintains
them auto, why is that I still have lots of archivelog at PRIMARY and STANDBY?
primary:oracle[/backup/flash_recovery_area/PROD/archivelog] ls -lt
total 200
drwxr-x--- 2 oracle oinstall 4096 Sep 25 15:59 2013_09_25
drwxr-x--- 2 oracle oinstall 4096 Sep 24 22:51 2013_09_24
drwxr-x--- 2 oracle oinstall 4096 Sep 23 22:03 2013_09_23
drwxr-x--- 2 oracle oinstall 4096 Sep 22 23:02 2013_09_22
drwxr-x--- 2 oracle oinstall 4096 Sep 21 21:25 2013_09_21
drwxr-x--- 2 oracle oinstall 4096 Sep 20 22:05 2013_09_20
drwxr-x--- 2 oracle oinstall 4096 Sep 19 23:00 2013_09_19
drwxr-x--- 2 oracle oinstall 4096 Sep 18 22:03 2013_09_18
drwxr-x--- 2 oracle oinstall 4096 Sep 17 22:53 2013_09_17
drwxr-x--- 2 oracle oinstall 4096 Sep 16 23:00 2013_09_16
drwxr-x--- 2 oracle oinstall 4096 Sep 15 23:01 2013_09_15
drwxr-x--- 2 oracle oinstall 4096 Sep 15 02:45 2013_09_01
drwxr-x--- 2 oracle oinstall 4096 Sep 14 20:32 2013_09_14
drwxr-x--- 2 oracle oinstall 4096 Sep 13 23:29 2013_09_13
drwxr-x--- 2 oracle oinstall 4096 Sep 12 22:02 2013_09_12
drwxr-x--- 2 oracle oinstall 4096 Sep 11 23:43 2013_09_11
drwxr-x--- 2 oracle oinstall 4096 Sep 10 22:27 2013_09_10
drwxr-x--- 2 oracle oinstall 4096 Sep 09 23:10 2013_09_09
drwxr-x--- 2 oracle oinstall 4096 Sep 08 23:00 2013_09_08
drwxr-x--- 2 oracle oinstall 4096 Sep 07 23:30 2013_09_07
drwxr-x--- 2 oracle oinstall 4096 Sep 06 23:11 2013_09_06
drwxr-x--- 2 oracle oinstall 4096 Sep 05 22:02 2013_09_05
drwxr-x--- 2 oracle oinstall 4096 Sep 04 23:45 2013_09_04
drwxr-x--- 2 oracle oinstall 4096 Sep 03 22:09 2013_09_03
drwxr-x--- 2 oracle oinstall 4096 Sep 02 22:33 2013_09_02
standby:oracle[/backup/flash_recovery_area/PRODDR/archivelog] ls -lt
total 296
drwxr-x--- 2 oracle oinstall 4096 Sep 25 15:59 2013_09_25
drwxr-x--- 2 oracle oinstall 4096 Sep 24 23:24 2013_09_24
drwxr-x--- 2 oracle oinstall 4096 Sep 23 22:13 2013_09_23
drwxr-x--- 2 oracle oinstall 4096 Sep 22 23:02 2013_09_22
drwxr-x--- 2 oracle oinstall 4096 Sep 21 21:39 2013_09_21
drwxr-x--- 2 oracle oinstall 4096 Sep 20 22:08 2013_09_20
drwxr-x--- 2 oracle oinstall 4096 Sep 19 23:01 2013_09_19
drwxr-x--- 2 oracle oinstall 4096 Sep 18 22:23 2013_09_18
drwxr-x--- 2 oracle oinstall 4096 Sep 17 22:53 2013_09_17
drwxr-x--- 2 oracle oinstall 8192 Sep 16 23:01 2013_09_16
drwxr-x--- 2 oracle oinstall 8192 Sep 16 00:46 2013_09_15
drwxr-x--- 2 oracle oinstall 4096 Sep 15 01:34 2013_09_14
drwxr-x--- 2 oracle oinstall 4096 Sep 14 01:03 2013_09_13
drwxr-x--- 2 oracle oinstall 4096 Sep 13 01:48 2013_09_12
drwxr-x--- 2 oracle oinstall 4096 Sep 12 03:29 2013_09_11
drwxr-x--- 2 oracle oinstall 4096 Sep 11 01:19 2013_09_10
drwxr-x--- 2 oracle oinstall 4096 Sep 10 01:54 2013_09_09
drwxr-x--- 2 oracle oinstall 4096 Sep 09 01:44 2013_09_08
drwxr-x--- 2 oracle oinstall 4096 Sep 08 01:59 2013_09_07
drwxr-x--- 2 oracle oinstall 4096 Sep 07 03:30 2013_09_06
drwxr-x--- 2 oracle oinstall 4096 Sep 06 02:05 2013_09_05
drwxr-x--- 2 oracle oinstall 4096 Sep 05 03:40 2013_09_04
drwxr-x--- 2 oracle oinstall 4096 Sep 04 01:48 2013_09_03
drwxr-x--- 2 oracle oinstall 4096 Sep 03 01:22 2013_09_02
drwxr-x--- 2 oracle oinstall 4096 Sep 02 02:31 2013_09_01
drwxr-x--- 2 oracle oinstall 4096 Sep 01 00:08 2013_08_31
drwxr-x--- 2 oracle oinstall 4096 Aug 31 03:18 2013_08_30
drwxr-x--- 2 oracle oinstall 4096 Aug 30 00:28 2013_08_29
drwxr-x--- 2 oracle oinstall 4096 Aug 29 03:51 2013_08_28
drwxr-x--- 2 oracle oinstall 4096 Aug 28 02:34 2013_08_27
drwxr-x--- 2 oracle oinstall 256 Aug 26 00:24 2013_08_26
drwxr-x--- 2 oracle oinstall 256 Aug 25 00:24 2013_08_25
drwxr-x--- 2 oracle oinstall 256 Aug 24 00:24 2013_08_24
drwxr-x--- 2 oracle oinstall 256 Aug 23 00:21 2013_08_23
drwxr-x--- 2 oracle oinstall 256 Aug 22 00:00 2013_08_22
drwxr-x--- 2 oracle oinstall 256 Aug 21 00:20 2013_08_21
drwxr-x--- 2 oracle oinstall 256 Aug 20 00:17 2013_08_20
drwxr-x--- 2 oracle oinstall 256 Aug 19 00:16 2013_08_19
drwxr-x--- 2 oracle oinstall 256 Aug 18 00:17 2013_08_18
drwxr-x--- 2 oracle oinstall 256 Aug 17 00:14 2013_08_17
drwxr-x--- 2 oracle oinstall 256 Aug 16 00:13 2013_08_16
drwxr-x--- 2 oracle oinstall 256 Aug 15 00:12 2013_08_15
drwxr-x--- 2 oracle oinstall 4096 Aug 14 10:53 2013_08_14
drwxr-x--- 2 oracle oinstall 4096 Aug 13 23:34 2013_08_13
drwxr-x--- 2 oracle oinstall 4096 Aug 12 23:10 2013_08_12
drwxr-x--- 2 oracle oinstall 4096 Aug 11 21:25 2013_08_11
drwxr-x--- 2 oracle oinstall 4096 Aug 10 22:44 2013_08_10
All of the above dates have been applied already. Thanks.
Maybe you are looking for
-
This Whole Adobe CC Controversy And a Happy User :-0
I'll make this short....I'm reading all the negative about the CC thing and can't help myself wondering if I'm the only one who's absolutely loving Creative Cloud? I guess I'm going to offend many who seem to have (in their minds) some valid reasons
-
I have 3 email accounts on my Iphone. When I updated to ios7 it merged all inboxes together. Is there a way to separate them?
-
Adobe Acrobat 9 Pro runtime Error!
I have an issues with Adobe Acrobat 9 Pro runtime Error! Reader 9.0 AcroRd32.exe caused Microsoft Visual C++ Runtime Library error.....etc on window xp 32bit with Service Pack3! Could anyone please help.
-
Employee Discount (from the company you work for, not Verizon employee)
When trying to pre-order or now order an iPhone 4s while logged in to our account we get a message: "Employee Discounts will not be applied to this order, do you want to proceed?" If you say no then you exit, if you say yes then sure enough the voice
-
VA01 Short dump SAPSQL_INVALID_TABLENAME
hi experts, Hope you could help me with this problem, it appears as if table a830 wouldn't exist but I checked it using Se11 and it does exist, what else could be causing this problem? An exception occurred that is explained in detail below.