Pages

Tuesday, November 30, 2021

ORA-23404: refresh group "MY_USER"."MY_TABLE" does not exist

=============
General
=============
Error when running the scheduled refresh for a snapshot

BEGIN
 DBMS_REFRESH.refresh('"MY_USER"."MY_TABLE"');
END;
/
 
 
ORA-23404: refresh group "MY_USER"."MY_TABLE" does not exist
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.DBMS_REFRESH", line 23
ORA-06512: at "SYS.DBMS_REFRESH", line 195
ORA-06512: at line 3
View program sources of error stack?

=============
How to Fix
=============
Solution A
Replace DBMS_REFRESH with DBMS_SNAPSHOT - which does not require group configuration

BEGIN
 DBMS_SNAPSHOT.refresh('"
MY_USER"."MY_TABLE"');
END;
/
 
Solution B
Create a Refresh Group. 
And refresh by Refresh group name.

Now:
SELECT rowner, rname, refgroup, job, interval 
FROM USER_REFRESH 
WHERE rname = 'MY_GROUP';
--0 rows selected

Create a new Refresh Group. 
BEGIN
  DBMS_REFRESH.MAKE(name => 'MY_USER.MY_GROUP',
                    list => '', 
    next_date => TRUNC(SYSDATE+1)+0.2/24 , 
    interval => 'TRUNC(SYSDATE+1)+0.2/24 ',
                    implicit_destroy => TRUE, 
    lax => FALSE,
                    job => 299);
  commit;
END;
/

Add Materialized View to the Refresh Group. 
BEGIN
  DBMS_REFRESH.ADD(name => 'MY_USER.MY_GROUP',
                   list => 'MY_USER.MY_TABLE');
  commit;
END;
/

SELECT rowner, rname, refgroup, job, interval 
  FROM USER_REFRESH 
 WHERE rname = 'MY_GROUP';
 
ROWNER  RNAME        REFGROUP  JOB INTERVAL
------- ------------ --------- --- -------------------------
DWNG    MY_GROUP     141       299 TRUNC(SYSDATE+1)+0.5/24

SELECT owner, name, type, rowner, rname, refgroup, job  
  FROM USER_REFRESH_CHILDREN 
WHERE refgroup = 141;
 
OWNER    NAME     TYPE     ROWNER  RNAME        REFGROUP JOB
-------- -------- ---------------- ------------ -------- ---
MY_USER  MY_TABLE SNAPSHOT MY_USER MCCMNC_TABLE 11       299


Join USER_REFRESH  and USER_REFRESH_CHILDREN 
SELECT UR.rowner, UR.rname, URC.name, URC.type, UR.job
  FROM USER_REFRESH UR, USER_REFRESH_CHILDREN URC
 WHERE UR.refgroup = URC.refgroup;

ROWNER     RNAME    NAME      TYPE     JOB
---------- -------- --------- -------- ----
MY_USER    MY_GROUP MY_TABLE  SNAPSHOT 299
 

Fix the broken job
BEGIN
  DBMS_JOB.broken(299, FALSE);
  DBMS_JOB.next_date(299, TRUNC(SYSDATE+1)+0.2/24);
  commit;
END;
/

To test the execution:

BEGIN
  DBMS_JOB.next_date(299, SYSDATE+1/1440);
  commit;
END;
/

Sunday, November 28, 2021

Golden gate DATAPUMP is not working

 ===================

General
===================
Golden Gate DATAPUMP is not working
In the status, DATAPUMP is RUNNING
But no data is getting replicated
How to troubleshoot and fix

===================
Troubleshoot and Fix
===================
GGSCI (my_server) 1> INFO ALL

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     DPM_I_01    00:00:00      00:00:01
EXTRACT     RUNNING     DPM_N_01    00:00:00      00:00:06
EXTRACT     RUNNING     DPM_P_01    00:00:00      00:00:00
EXTRACT     RUNNING     DPM_S_01    00:00:00      00:00:01
EXTRACT     RUNNING     EXT_I_01    00:00:00      00:00:05
EXTRACT     RUNNING     EXT_N_01    00:00:00      00:00:01
EXTRACT     RUNNING     EXT_P_01    00:00:00      00:00:04
EXTRACT     RUNNING     EXT_S_01    00:00:03      00:00:04
REPLICAT    RUNNING     REP_I_01    00:00:00      00:00:06
REPLICAT    RUNNING     REP_N_01    00:00:00      00:00:03
REPLICAT    RUNNING     REP_P_01    00:00:00      00:00:06
REPLICAT    RUNNING     REP_S_01    00:00:00      00:00:08

GGSCI (my_server) 6> SEND EXTRACT DPM_N_01 STATS

Sending STATS request to EXTRACT DPM_N_01 ...

No active extraction maps.


GGSCI (my_server as OGG@igt) 10> INFO DPM_N_01

EXTRACT    DPM_N_01  Last Started 2021-11-28 10:06   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:04 ago)
Process ID           31970
Log Read Checkpoint  File /software/ogg/191/dirdat/01/out/en000000000
                     First Record  RBA 0




GGSCI (my_server as OGG@igt) 11> DBLOGIN USERID OGG PASSWORD XXXXX

GGSCI (my_server as OGG@igt) 12> INFO EXT_N_01 DETAIL

  Trail Name                                       Seqno        RBA     Max MB Trail Type

  /software/ogg/191/dirdat/01/out/en                  10     198769        500 EXTTRAIL


GGSCI (my_server as OGG@igt) 14> SEND EXTRACT DPM_N_01, FORCESTOP

Sending FORCESTOP request to EXTRACT DPM_N_01 ...
STOP request will be executed immediately (recovery aborted).


GGSCI (my_server as OGG@igt) 15> STOP EXTRACT DPM_N_01
EXTRACT DPM_N_01 is already stopped.


GGSCI (my_server as OGG@igt) 16> ALTER EXTRACT DPM_N_01, EXTSEQNO 10 EXTRBA 198769
EXTRACT altered.


GGSCI (my_server as OGG@igt) 17> START DPM_N_01

Sending START request to MANAGER ...
EXTRACT DPM_N_01 starting


GGSCI (my_server as OGG@igt) 18> INFO DPM_N_01

EXTRACT    DPM_N_01  Last Started 2021-11-28 13:02   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:06 ago)
Process ID           23935
Log Read Checkpoint  File /software/ogg/191/dirdat/01/out/en000000010
                     First Record  RBA 198769


GGSCI (my_server as OGG@igt) 19>  INFO DPM_N_01

EXTRACT    DPM_N_01  Last Started 2021-11-28 13:02   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:03 ago)
Process ID           23935
Log Read Checkpoint  File /software/ogg/191/dirdat/01/out/en000000010
                     2021-11-28 13:02:07.000000  RBA 203030


Now the RBA in Datapump is advancing

Golden Gate REPLICAT is not working

===================
General
===================
Golden Gate REPLICAT is not working
In the status, REPLICATE is RUNNING
But no data is getting replicated
How to troubleshoot and fix

===================
Troubleshoot and Fix
===================
GGSCI (my_server) 1> INFO ALL

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     DPM_I_01    00:00:00      00:00:01
EXTRACT     RUNNING     DPM_N_01    00:00:00      00:00:06
EXTRACT     RUNNING     DPM_P_01    00:00:00      00:00:00
EXTRACT     RUNNING     DPM_S_01    00:00:00      00:00:01
EXTRACT     RUNNING     EXT_I_01    00:00:00      00:00:05
EXTRACT     RUNNING     EXT_N_01    00:00:00      00:00:01
EXTRACT     RUNNING     EXT_P_01    00:00:00      00:00:04
EXTRACT     RUNNING     EXT_S_01    00:00:03      00:00:04
REPLICAT    RUNNING     REP_I_01    00:00:00      00:00:06
REPLICAT    RUNNING     REP_N_01    00:00:00      00:00:03
REPLICAT    RUNNING     REP_P_01    00:00:00      00:00:06
REPLICAT    RUNNING     REP_S_01    00:00:00      00:00:08

GGSCI (my_server) 1> SEND REPLICAT REP_N_01 STATS

Sending STATS request to REPLICAT REP_N_01 ...

No active replication maps.

Integrated Replicat Statistics:

        Total transactions                                 0.00
        Redirected                                         0.00
        Replicated procedures                              0.00
        DDL operations                                     0.00
        Stored procedures                                  0.00
        Datatype functionality                             0.00
        Operation type functionality                       0.00
        Event actions                                      0.00
        Direct transactions ratio                          0.00%

GGSCI (my_server) 1> INFO REP_N_01

REPLICAT   REP_N_01  Last Started 2021-11-28 10:06   Status RUNNING
INTEGRATED
Checkpoint Lag       00:00:00 (updated 00:00:00 ago)
Process ID           31883
Log Read Checkpoint  File /software/ogg/191/dirdat/01/in/en000000000
                     First Record  RBA 0


 

oracle@qanfv-2-dbs-01:/software/ogg/191/dirdat/01/in>% ls -ltr | grep en
-rw-r----- 1 oracle dba 499997601 Aug  1 08:01 en000007644
-rw-r----- 1 oracle dba 499999336 Aug  1 08:03 en000007645
-rw-r----- 1 oracle dba 499997863 Aug  1 08:04 en000007646
-rw-r----- 1 oracle dba 499999493 Aug  1 08:06 en000007647
-rw-r----- 1 oracle dba 499998290 Aug  1 08:08 en000007648
-rw-r----- 1 oracle dba 499995601 Aug  1 08:10 en000007649
-rw-r----- 1 oracle dba 499997099 Aug  1 08:11 en000007650
-rw-r----- 1 oracle dba 499996252 Aug  1 08:13 en000007651
-rw-r----- 1 oracle dba 499996558 Aug  1 08:16 en000007652
-rw-r----- 1 oracle dba 499997959 Aug  1 08:18 en000007653
-rw-r----- 1 oracle dba 499998548 Aug  1 08:19 en000007654
-rw-r----- 1 oracle dba 331578832 Aug  1 08:38 en000007655
-rw-r----- 1 oracle dba 499999030 Aug  1 08:46 en000007656
-rw-r----- 1 oracle dba 499999386 Aug  1 08:48 en000007657
-rw-r----- 1 oracle dba 159395611 Nov 28 10:06 en000007658
-rw-r----- 1 oracle dba   5460356 Nov 28 11:56 en000007659


 
GGSCI (my_server) 2> STOP REPLICAT REP_N_01

Sending STOP request to REPLICAT REP_N_01 ...
Request processed.


GGSCI (my_server) 3> ALTER REPLICAT REP_N_01, EXTSEQNO 7658

2021-11-28 11:59:33  INFO    OGG-06594  Replicat REP_N_01 has been altered. Even the start up position might be updated, duplicate suppression remains active in next startup. To override duplicate suppression, start REP_N_01 with NOFILTERDUPTRANSACTIONS option.

REPLICAT altered.


 
GGSCI (my_server) 8> START REPLICAT REP_N_01

Sending START request to MANAGER ...
REPLICAT REP_N_01 starting


GGSCI (my_server) 11> INFO REPLICAT REP_N_01

REPLICAT   REP_N_01  Last Started 2021-11-28 12:02   Status RUNNING
INTEGRATED
Checkpoint Lag       00:00:00 (updated 00:00:20 ago)
Process ID           15945
Log Read Checkpoint  File /software/ogg/191/dirdat/01/in/en000007658
                     First Record  RBA 0


GGSCI (my_server) 12> SEND REPLICAT REP_N_01 STATS

Sending STATS request to REPLICAT REP_N_01 ...

Start of Statistics at 2021-11-28 12:03:13.


Integrated Replicat Statistics:

        Total transactions                                 3.00
        Redirected                                         0.00
        Replicated procedures                              0.00
        DDL operations                                     0.00
        Stored procedures                                  0.00
        Datatype functionality                             0.00
        Operation type functionality                       0.00
        Event actions                                      0.00
        Direct transactions ratio                          0.00%

Replicating from LAB_QANFV_ALLQQ.SGA_W_IPN_SUBSCRIBER to LAB_QANFV_ALLQQ.SGA_W_IPN_SUBSCRIBER:

*** Total statistics since 2021-11-28 12:03:06 ***
        Total inserts                                      0.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total ignores                                   1181.00
        Total operations                                   0.00

*** Daily statistics since 2021-11-28 12:03:06 ***
        Total inserts                                      0.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total ignores                                   1181.00
        Total operations                                   0.00

*** Hourly statistics since 2021-11-28 12:03:06 ***
        Total inserts                                      0.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total ignores                                   1181.00
        Total operations                                   0.00

*** Latest statistics since 2021-11-28 12:03:06 ***
        Total inserts                                      0.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total ignores                                   1181.00
        Total operations                                   0.00

End of Statistics.




Issue is fixed.