LAST SEQUENCE RECEIVED AND LAST SEQUENCE APPLIED

SQL> 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 resetlogs_change#=(SELECT resetlogs_change# FROM v$database) GROUP BY thread#) lh WHERE al.thrd = lh.thrd;  Thread Last Seq Received Last Seq […]

Read More

CHECK THE MESSAGES/ERRORS IN STANDBY DATABASE

set pagesize 2000 set lines 2000 col MESSAGE for a90 select message,timestamp from V$DATAGUARD_STATUS where timestamp > sysdate – 1/6; MESSAGE TIMESTAMP —————————————————————————————— ——— RFS[48]: No standby redo logfiles created 05-AUG-15 Media Recovery Log /uv1010/arch/MRSX/arch_MRSX_779539386_1_49481.log 05-AUG-15 Media Recovery Waiting for thread 1 sequence 49482 (in transit) 05-AUG-15 RFS[48]: No standby redo logfiles created 05-AUG-15 Media […]

Read More

CHECK THE NUMBER OF ARCHIVES GETTING GENERATING ON HOURLY BASIS:

SELECT TO_CHAR(TRUNC(FIRST_TIME),’Mon DD’) “DG Date”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’00’,1,0)),’9999′) “12AM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’01’,1,0)),’9999′) “01AM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’02’,1,0)),’9999′) “02AM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’03’,1,0)),’9999′) “03AM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’04’,1,0)),’9999′) “04AM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’05’,1,0)),’9999′) “05AM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’06’,1,0)),’9999′) “06AM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’07’,1,0)),’9999′) “07AM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’08’,1,0)),’9999′) “08AM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’09’,1,0)),’9999′) “09AM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’10’,1,0)),’9999′) “10AM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’11’,1,0)),’9999′) “11AM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’12’,1,0)),’9999′) “12PM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’13’,1,0)),’9999′) “1PM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’14’,1,0)),’9999′) “2PM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’15’,1,0)),’9999′) “3PM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’16’,1,0)),’9999′) “4PM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’17’,1,0)),’9999′) “5PM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’18’,1,0)),’9999′) “6PM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’19’,1,0)),’9999′) “7PM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’20’,1,0)),’9999′) “8PM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’21’,1,0)),’9999′) “9PM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’22’,1,0)),’9999′) “10PM”, TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,’HH24′),’23’,1,0)),’9999′) “11PM” FROM V$LOG_HISTORY […]

Read More

Convert Physical Standby To Snapshot Standby Database

What is snapshot standby: Snapshot standby is a feature in Oracle 11g that allows doing a read-write operation on the standby database.  i. e we can convert the physical standby database to snapshot standby. On that, we can do all types of testing or can be used as a development database (which is an exact […]

Read More

How to apply PSU patch on standby database

To apply psu patch on  physical standby database setup, 1st patch need to be applied on standby, and then on primary. Below are the steps.  Download patch from oracle support. Check the database_role for both dbs PRIMARY> select database_role from v$database; DATABASE_ROLE —————- PRIMARY STANDBY> select database_role from v$database; SDATABASE_ROLE —————- PHYSICAL STANDBY 2.Run below […]

Read More

ORA-01274: cannot add data file

PROBLEM: After adding a datafile in primary database, recovery process in standby stopped with below error. — Primary database:

— Error in alert log of standby database File #5 added to control file as ‘UNNAMED00005’ because the parameter STANDBY_FILE_MANAGEMENT is set to MANUAL The file should be manually created to continue. MRP0: Background Media Recovery terminated […]

Read More

Enabling Flashback Database in Oracle

Oracle Flashback Database, allows to quickly recover the entire database from logical data corruptions or user errors. It is very similar to PITR (Point In Time Recovery) which puts back the database to a state at a particular time in recent past. 1. Place your database in mount stage.

2. Set DB_FLASHBACK_RETENTION_TARGET to the requried […]

Read More

ORA-15032: Not All Alterations Performed

While setting attribute on a ASM diskgroup, we got below error.

Solution: Alter operations on ASM diskgroups need to be done from sysman user , instead of sysdba user.

Read More

Enable Archive Log Mode In Oracle RAC

1. stop the database service.

2. start the database in mount state.

3. enable archive log mode.

4. Restart the database service (using srvctl)

5. set the archive destination to a ASM DISK

Read More