Last archive applied.
Hi All,
Is there any view which tells me that, which is the last archive file applied on my standby database.
Regards.
SQL> select max(SEQUENCE#) from v$log_history;
MAX(SEQUENCE#)
96130
Similar Messages
-
Determining the last archive applied on Logical Standby
Hi,
I am trying to determine the last log received and applied on my Logical Standby
SQL> select thread#, max(sequence#) "Last Standby Seq Received"
from v$archived_log val, v$database vdb
where val.resetlogs_change# = vdb.resetlogs_change#
group by thread# order by 1;
THREAD# Last Standby Seq Received
1 14
SQL> select thread#, max(sequence#) "Last Standby Seq Applied"
from v$archived_log val, v$database vdb
where val.resetlogs_change# = vdb.resetlogs_change#
and applied='YES'
group by thread# order by 1;
Does not return anything
These statements work ok on a physical standby.
I know Sql Apply is enabled on my logical standby - my broker configuration is enabled and for the logical standby database, it is showing the Intended State as APPLY-ON with no Transport or Apply Lag on any of the databases
Q. How do I determine the last seq applied on my logical standby ?
thanks,
JimHello;
I have this from my notes:
SELECT
L.SEQUENCE#,
L.FIRST_TIME,
(CASE WHEN L.NEXT_CHANGE# < P.READ_SCN THEN 'YES'WHEN L.FIRST_CHANGE# < P.APPLIED_SCN THEN 'CURRENT' ELSE 'NO' END) APPLIED
FROM
DBA_LOGSTDBY_LOG L, DBA_LOGSTDBY_PROGRESS P
ORDER BY SEQUENCE#;
Best Regards
mseberg -
Hi All,
sorry if i can not write English well. and i am beginner in Data guard(DG)
i established Data guard . primary in server1 and DG in server2. dont enable redo log for DG.
when an archive log created in server1 , immediate copy this archive log to server2 automatically.
but for example when we have 10 archive log in server1 . we have 11 archive log in server2. i dont know the last archive is archive log or another file type but this name is same archive log file name format.
for example when created O1_MF_1_69_689MFJSW_.ARC (40 MB size). this file copy to server2 but
in server2 created O1_MF_1_70_689MFJSW_.ARC . and i think when DG database is shutdown, last archive log
in this case O1_MF_1_70_689MFJSW_.ARC deleted automatically. my question is : what is this(last archive that created in server2) . this is normal or no?
Best Regards
Hassanhi,
Can you paste the result of the below query.. Run it in primary
SET PAGESIZE 124
COL DB_NAME FORMAT A8
COL HOSTNAME FORMAT A12
COL LOG_ARCHIVED FORMAT 999999
COL LOG_APPLIED FORMAT 999999
COL LOG_GAP FORMAT 999
COL APPLIED_TIME FORMAT A12
COL LOG_DAY FORMAT A2
SELECT DB_NAME, HOSTNAME, LOG_ARCHIVED, LOG_APPLIED,APPLIED_TIME,
LOG_ARCHIVED-LOG_APPLIED LOG_GAP,LAG_DAY,LAG_TIME
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'
SELECT floor((sysdate - MAX(COMPLETION_TIME))*24*60) LAG_TIME
FROM V$ARCHIVED_LOG WHERE DEST_ID=2 AND APPLIED='YES'
SELECT '+'||floor((sysdate - MAX(COMPLETION_TIME))*24) LAG_DAY
FROM V$ARCHIVED_LOG WHERE DEST_ID=2 AND APPLIED='YES'
);thanks,
baskar.l -
Is there any table which maintains the record of archived data along with their date of archival.
For example last archived process orders,billing docs,etc.Hi AnamAlli,
The table ADMI_FILES contains all the archived objects. Also the ADMI_RUN can be usefull or ARCH_TXT.
Hope it's work.
Ignacio. -
Archive apply issue for standby database in Standard Edition.
We have setup standby database in Oracle standard edition. the archive log cannot be send by oracle automatically. So we manually send the archive over. But do not see the database apply the archive log file. What could be wrong and where should we check on it?
We also used following when finishing the standby DB after running "recover standby database;" for a few archive log file:
alter database recover managed standby database disconnect from session;
======================================================================================
This is the status:
SQL> select OPEN_MODE, SWITCHOVER# ,REMOTE_ARCHIVE ,ARCHIVELOG_CHANGE#,SWITCHOVER_STATUS, DATABASE_ROLE from v$database;
OPEN_MODE SWITCHOVER# REMOTE_A ARCHIVELOG_CHANGE# SWITCHOVER_STATUS DATABASE_ROLE
MOUNTED 495550636 ENABLED 1.2201E+13 SESSIONS ACTIVE PHYSICAL STANDBYThe DB version is 10.2.0.5
I can do this to apply at standby DB:
SQL> set autorecovery on
SQL> recover standby database;
Then I tried to run this to leave the session:
alter database recover managed standby database disconnect from session;
Do not seen any apply.
=============================
Here is the last lines of alert log:
Errors in file /oracle/admin/cntus/bdump/cntus_mrp0_12389.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/u03/cntus/redolog/redo01b.log'
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3
ORA-00312: online log 1 thread 1: '/u02/cntus/redolog/redo01a.log'
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3
Thu Sep 06 15:08:34 EDT 2012
Errors in file /oracle/admin/cntus/bdump/cntus_mrp0_12389.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/u03/cntus/redolog/redo01b.log'
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3
ORA-00312: online log 1 thread 1: '/u02/cntus/redolog/redo01a.log'
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3
Clearing online redo logfile 1 /u02/cntus/redolog/redo01a.log
Clearing online log 1 of thread 1 sequence number 10158
Thu Sep 06 15:08:34 EDT 2012
Errors in file /oracle/admin/cntus/bdump/cntus_mrp0_12389.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/u03/cntus/redolog/redo01b.log'
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3
ORA-00312: online log 1 thread 1: '/u02/cntus/redolog/redo01a.log'
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3
Thu Sep 06 15:08:34 EDT 2012
Errors in file /oracle/admin/cntus/bdump/cntus_mrp0_12389.trc:
ORA-19527: physical standby redo log must be renamed
ORA-00312: online log 1 thread 1: '/u02/cntus/redolog/redo01a.log'
Clearing online redo logfile 1 complete
Media Recovery Waiting for thread 1 sequence 10166
Thu Sep 06 15:08:35 EDT 2012
Completed: alter database recover managed standby database disconnect from session
======
We have the directory /u02/cntus/redolog and /u03/cntus/redolog. But nothing in there. Should we create redo for it? Is this a separate issue?
Thanks! -
Hai all,
I confihgured physical standby and it is working fine.. but before making a switch over, oracle recommends to run this query inorder to Make sure the standby database is current with redo application. On each database server, run this query to see the which logs have been sent / received and applied
select sequence#, applied,
to_char(first_time, ‘mm/dd/yy hh24:mi:ss’) first
from v$archived_log
order by first_time;
Now when I execute this query,
SEQUENCE# APP FIRST
6508 NO 07/16/08 00:49:17
6508 YES 07/16/08 00:49:17
6509 NO 07/16/08 00:55:54
6509 YES 07/16/08 00:55:54
What does this indicate ?..
Is this applied successfully to the standby site ?
Thanks
KaiYou know,
I like to run the following query to tell me where my standby is at:
select * from V$dataguard_stats
NAME VALUE UNIT TIME_COMPUTED
apply finish time +00 00:00:00.2 day(2) to second(1) interval 16-JUL-2008 14:05:49
apply lag +00 00:00:19 day(2) to second(0) interval 16-JUL-2008 14:05:49
estimated startup time 36 second 16-JUL-2008 14:05:49
standby has been open N 16-JUL-2008 14:05:49
transport lag +00 00:00:04 day(2) to second(0) interval 16-JUL-2008 14:05:49
This gives you a good indication of upto what archived log you have applied.
jason.
http://jarneil.wordpress.com -
hii,
archived log are applying at the standby side but now suddenly they are not applying.
SEQUENCE# ARC APP
4055 YES NO
4055 YES YES
4056 YES NO
4056 YES YES
4057 YES NO
4057 YES YES
4058 YES NO
4058 YES NO
4059 YES NO
4059 YES NO
I dont know why?can any body help me to get out of this problem.
Thankx In advance...Check your primary alert.log file to see if some
error message were write.
Nicolas.Also standby's alertlog file -
Is there a way I can see when the last patch was applied to a database ?
Refer :
How to know the patches applied on DB? -
Compare template with last archive config
Hello every one,
I would to know if there is a way to compare the last configuration of one/all equipment(s) with a template (User defined tasks)
I explain why.
In my compagny, if an equipements is out of service, some one replace the equipements.
in the new equipement there is the minimal configuration for download the full configuration by remote access (netconfig job)
but the problem is : the configuration evolve constantly, so we must uptdate templates, but we have to make sure in all templates there is the last configuration.
thanks a lotDo you have any kind of network management platform, such as CiscoWorks or anything like that? Most of them do have reports/jobs you can run to compare configs.
If you don't, then you might want to look into something like ExamDiff (http://www.prestosoft.com/ps.asp?page=edp_examdiff) to compare the configs against your template.
Now, if you have a lot, that can get very tedious doing them one by one all the time. Its possible you could script something to automate this as well. -
Could u tell me last applyed archive log in disaster recovery server
Hi DBA'S,
we are using oracle 9.2.0.8 my production database has dr(our dr is not a stand by it is created in diff way) server every time one cron job sync the database and transfer the new logs from production server to dr server. i want to know last applied archive in dr server.
i am using this query select max(sequence#) from v$log_history; it is showing same results in boath production and dr when ever we backup 2 days before archive to some backup directory sync is going to fail
please tell me correct query to find out the last applied archived log in dr server
Thanks&Regards
Tirupathiwe are using oracle 9.2.0.8 my production database has dr(our dr is not a stand by it is created in diff way) server every time one cron job sync the database and transfer the new logs from production server to dr server. i want to know last applied archive in dr server.i am using this query select max(sequence#) from v$log_history; it is showing same results in boath production and dr when ever we backup 2 days before archive to some backup directory sync is going to fail
please tell me correct query to find out the last applied archived log in dr server>
As you are running cron job to bring the dr in sync, i suppose v$log_history might give you the wrong results.In your case check :-
select sequence#,applied from v$archived_log where applied='YES';
select max(sequence#) from v$archived_log where applied='YES';Would like to know, why manual recovery (archive logs being manually applied) is being performed, and not automatic.
In case you switch to automatic below query would be useful :-
select al.thrd "Thread", almax "Last Seq Received", lhmax "Last Seq Applied"
from (select thread# thrd, max(sequence#) almax
from v$archived_log
where resetlogs_change#=(select resetlogs_change# from v$database)
group by thread#) al,
(select thread# thrd, max(sequence#) lhmax
from v$log_history
where first_time=(select max(first_time) from v$log_history)
group by thread#) lh
where al.thrd = lh.thrd;Refer [http://aprakash.wordpress.com/2010/07/21/use-of-varchived_log-and-vlog_history-on-physical-standby/]
HTH
Anand -
Data guard real time apply vs archived log apply on physical standby
Dear DBA's,
last week i configuared DR , now the phyiscal stanby database is archive apply mode,
i want to confirm is it better to apply the archived log or should i cahnge it to real time apply .
give me sugesstions.
Thanks and Regards
Raja...One question are you using ARCH transport to move the redo? or have you configured standby redo logs and logwr transport (either async or syncronous), if you are using the archiver to transport the logs then you can not use real time apply.
If you are using log writer to transpor the redo the realtime apply reduces the recovery time required if you need to failover as trher should be less redo to apply to bring the standby up to date, which mode you use to transport redo will depend on what is acceptable in terms of data loss and the impact on performance. -
Standby database Error in applying archives
Hi All
Environment:
Oracle 8i
Platform- HP-UX
I have production database on HPUX box and standby database on anothe HPUX box.
I am applying archive to standby everyday manually.
In last week, I have added ney datafile webapp03 in Production database tablespace.
When I apply archive to standby database. It says archive apply sucessfully but give below warning:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01195: online backup of file 25 needs more recovery to be consistent
ORA-01110: data file 25: '/u06/oradata/vestcom/webapp03.dbf'
Yesterday I have copied datafile from production to standby database.
But still I am getting same warning:
Please let me know in detail, I am totally new in this admin field.
Please help me out for this issue:
Thanks in Advance.
R MAbsolutely. First place the tablespace space in backup mode, then copy over the datafile and then end the backup mode - applying the log files should be fine now.
HTH
Thanks
Chandra -
Archived redolog not applied in real-time : IN-MEMORY
I created a DataGuard configuratiion in Oracle 11g so that the archived redolog are applied in real-time using the log writer.
It seems to me that the last one is not applied : when consulting the v$archived_log table the last entry have the colunm applied to "IN-MEMORY" :
select THREAD#, SEQUENCE#,APPLIED, deleted from v$archived_log;
THREAD# SEQUENCE# APPLIED DEL
1 1935 YES NO
1 1936 IN-MEMORY NO
The Oracle 11g documentation say that if "IN-MEMORY" that mean not applied in the datafile.
Could someone help me to fix it ?
Why the last archived redolog is always "IN-MEMORY" ? Is there a way to change it ?Please check the value of the column REGISTRAR and APPLIED for the logs in the standby database.
standby database:
select sequence#,registrar,applied from v$archived_log;
If REGISTRAR = RFS and APPLIED = NO, then the log file has been received but has not yet been applied.
If REGISTRAR = RFS and APPLIED = IN-MEMORY, then the log file has been applied in memory, but the datafiles have not yet been updated.
If REGISTRAR = RFS and APPLIED = YES, then the log file has been applied and the datafiles have been updated.
Try Cancelling the Managed Recovery Process and bounce the standby database -
Hangup transport archive log in primary and archive log apply
Hi
I am building Dataguard from 3-node primary cluster to 3-node standby cluster
Oracle Version:10.2.0.4
Operating system : LInux 64 bit
After I restored standby database, I configured dataguard broker with wrong unique_name parameter in standby cluster using grid control
after I corrected mistake, disabled dataguard broker parameters, delete dataguard broker files and reboot standby cluster but don't reboot primary cluster because is production enviroment.
I have problem with following symptoms:
-Hangup transport archive log while recovery database in standby then gap archivelog is produced.
-Copy and register all archivelog gap in standby but don't apply archive log.
- Don't register like applied in v$archived_log in primary the archives applied in standby manually.
-RMAN command: "backup as COMPRESSED BACKUPSET tag 'Backup Full Disk' archivelog all not backed up delete all input;"
don't delete in primary archive log applied because message " archive log is necessary"
I think that is necessary reboot primary cluster.
Please helpmePost the results of queries. It is difficult to understand.
post from primary
SQL> select thread#,max(sequence#) from v$archived_log group by thread#;select ds.dest_id id
, ad.status
, ds.database_mode db_mode
, ad.archiver type
, ds.recovery_mode
, ds.protection_mode
, ds.standby_logfile_count "SRLs"
, ds.standby_logfile_active active
, ds.archived_seq#
from v$archive_dest_status ds
, v$archive_dest ad
where ds.dest_id = ad.dest_id
and ad.status != 'INACTIVE'
order by
ds.dest_id
Post from standby.
SQL> select thread#,max(sequence#) from v$archived_log where applied='YES' group by thread#;
select * from v$managed_standby; -
Real-time apply in Maximum Performance Mode Not Working
We have configured physical standby database in maximum performance mode. It's working perfectly fine. Archive logs are being applied to the physical standby.
We can open the DB in read-only mode, but real-time apply is not working. Physical standby database is lagging behind the primary db by an archive log. As soon as primary database generates an archive log, it's transported over to the standby and applied immediately by the media recovery process. But real-time redo is not working. Standby redo logs have been configured.
On Physcial Standby:
SQL> alter database recover managed standby database using current logfile disconnect ;
Database Altered.
SQL> select group#, DBID, status,first_time, last_time from v$standby_log ;
GROUP# DBID STATUS FIRST_TIM LAST_TIME
4 UNASSIGNED UNASSIGNED
5 UNASSIGNED UNASSIGNED
6 UNASSIGNED UNASSIGNED
7 UNASSIGNED UNASSIGNED
SQL> select * from v$dataguard_stats ;
NAME
VALUE
UNIT TIME_COMPUTED
apply lag
+00 00:31:36
day(2) to second(0) interval 22-JUN-2010 08:42:06
transport lag
+00 00:31:34
day(2) to second(0) interval 22-JUN-2010 08:42:06
As you could see from the output above, value of transport and apply lag is equal to the elapsed time since last archive log switch.
********* Standby init.ora
db_name = CPRD
db_unique_name = CPRDS
instance_name = CPRD
service_names = hrDBSBY.WORLD
log_archive_format = CPRD%r%s.%t
log_archive_dest_1 = "location=f:\orarch\hresysprod"
log_archive_dest_2='service=hresysprod async db_unique_name=cprd valid_for=(primary_role,online_logfile)'
log_archive_config='dg_config=(cprd,cprds)'
fal_server=hresysprod
fal_client=hresysprods
standby_file_management=auto
log_archive_trace=1
log_file_name_convert = ('hresysprod','hresysprods')
db_file_name_convert = ('hresysprod','hresysprods')
remote_login_passwordfile = exclusive
******* Primary init.ora
log_archive_config='dg_config=(cprd,cprds)'
fal_server=hresysprods
fal_client=hresysprod
standby_file_management=auto
log_archive_format = CPRD%r%s.%t
log_archive_dest_1 = "location=f:\orarch\hrESYSPROD"
log_archive_dest_2='service=hresysprods async db_unique_name=cprds valid_for=(primary_role,online_logfile)'
log_archive_trace=1
remote_login_passwordfile = exclusive
Please advise.
Thanks,
jayHi,
In your case you are using ARC process for redo transfer as you have not specified any process in log_archive_dest_2 and default is arch.
I will suggest you to use LGWR to transfer the redo to standby and also check the size of standby redo logs on standby is same to the size of online redo logs on primary
Regards
Anudeep
Maybe you are looking for
-
IDOC error when using LSMW+XIF to load business partner data
Hi experts, i have configured the LSMW using idoc type 'CRMXIF_PARTNER_SAVE01', but it gives somes errors like below (LSMW_BP456 is the BP no) E Partner LSMW_BP456 (4A01EE5D47261621E10000000A0A0ACB ): the following err W Partner data processed w
-
Output type for Maintanance Order
Hi all, I am an abapper and I need to send idoc to legacy system for Maintanance order (IW31). I am not able to find output type in NACE or from IW31. Please let me know, whether idoc will be sending using Output type or any other way for IW31. Vinot
-
I can't open my mail on my mac
I was trying to "clean up" my mail. Now i can't even open my mail icon on my imac.
-
PAM configuration file (/etc/pam.conf)
Need your expertise advice. If the settings for kerberos v5 authentication are disabled, is it correct to say that it is not authenticating using Windows 2000. Lawrence
-
My ifone doesnt appear in my computer and itunes
my ifone doesnt appear in my computer and itunes can u please help me with it, as i already tried all instructrions according to ifone troubleshooting