DEFERRED TRANSACTION QUEUE의 내용을 지우는 여러가지 방법 (replication)

제품 : ORACLE SERVER
작성날짜 : 2004-08-13
PURPOSE
advanced replication 환경에서, 특정 master site나 updatable snapshot
site은 다른 remote의 master site로 데이타를 propagation시키기 위해서
해당 local site에 deferred transaction queue를 유지한다.
remote site로 잘 전달된 데이타는 주기적으로 dbms_defer_sys.purge job에
의해 deferred transaction queue인 DEFCALL에서 지워지게 되는데, 경우에
따라 문제가 발생하면서 DEFCALL의 내용이 remote site로 전달이 안되면서
계속해서 지워지지 않고 남게 될 수 있다.
이러한 경우 다음 트랜잭션의 진행이나 전달에도 방해가 될 수 있어
강제로 지우고자 하는 상황이 발생하는데 그러한 경우의 조치 방법에 대해서
자세히 설명한다.
SCOPE
Advanced Replication Feature는 8~10g Standard Edition에서는 지원하지
않는다.
Explanation
1. 특정 deferred transaction id를 지우는 경우
기본적으로 deferred transaction queue에 쌓인 트랜잭션을 지우는
방법은 다음과 같다.
dbms_defer_sys.delete_tran(deferred_tran_id, destination)
즉 다음 예와 같다.
SQL>exec dbms_defer_sys.delete_tran('2.7.10', 'rep2.world');
이때, 해당 destination에 대한 모든 트랜잭션인경우는 앞의 argument를
null로 하고, 특정 transaction id에 대한 모든 destination에 대해서인
경우는 뒷부분의 argument를 null로 한다.
결국 저장된 모든 deferred transaction이라면, 다음과 같다.
SQL>exec dbms_defer_sys.delete_tran(null,null);
2. 특정 table에 관한 내용만 지우는 경우
예를 들어 특정 table, 여기서는 DEPT table에 관한 사항을 DEFCALL에서
지우고자 한다면 다음과 같이 조치하면 된다.
SQL>connect repadmin/repadmin
SQL>set pagesize 1000
SQL>set head off
SQL>spool purgedefcall.sql
SQL>select 'exec dbms_defer_sys.delete_tran('''
|| deferred_tran_id || ''', null);'
from defcall
where packagename like 'DEPT%';
SQL>spool off
spool에 의해 만들어진 purgedefcall.sql을 깨끗하게 편집한 후 다시 save한다.
SQL>connect repadmin/repadmin
SQL>@purgedefcall.sql
이때 만약 특정 site로의 전달만을 막고자 한다면, null대신 MS_B.WORLD와 같이
해당 site를 가리키는 database link이름을 직접 지정하면 된다.
3. 전체 queue의 내용을 모두 지우는 경우
DEFCALL의 내용을 모두 지우는 경우라면 기본적으로는 앞에서 사용한
DBMS_DEFER_SYS.DELETE_TRAN을 이용하면 된다.
SQL>connect repadmin/repadmin
SQL>exec dbms_defer_sys.delete_tran(null,null);
DEFERROR의 내용을 모두 지우는 경우에는 DBMS_DEFER_SYS.DELETE_ERROR를
사용한다.
SQL>exec dbms_defer_sys.delete_error(null,null);
그런데 이 delete_tran과 delete_error의 경우는 내부적으로 delete문장을
사용하면서 undo record를 위해 rollback을 사용하면서 지워야 하는 데이타가
매우 많은 경우 속도도 문제가 되고 rollback space오류도 발생 가능하다.
이러한 경우에는 다음과 같이 truncate command를 이용하여 간단하고 빠르게
deferred transaction queue의 내용을 정리할 수 있다.
(1) Oracle7의 경우
DEF$_CALL, DEF$_CALLDEST, DEF$_ERROR 를 모두 truncate시킨다.
단 이때 DEF$_CALLDEST가 DEF$_CALL을 reference하는 constraint가 있는 관계로,
DEF$_CALLDEST를 모두 truncate하여 데이타가 전혀 없는 상태에서도,
DEF$_CALL이 truncate가 되지 않는다.
delete operation의 경우 child table이 비어 있다면 master table의 데이타를
지우는데 오류가 없지만, truncate의 경우는 데이타 확인 없이 바로 지우는
것이기 때문에 child table에 데이타가 없다하더라도 그러한 check없이,
무조건 자신을 reference하는 child table의 constraint가 enable되어 있는한은
master table이 truncate가 불가능하게 된다.
SQL>connect as system/password
SQL>alter table system.DEF$_CALLDEST disable constraint
DEF$_CALLDEST_CALL;
SQL>truncate table system.DEF$_CALL;
SQL>truncate table system.DEF$_CALLDEST;
SQL>truncate table system.DEF$_ERROR;
SQL>alter table system.DEF$_CALLDEST enable constraint DEF$_CALLDEST_CALL;
(2) Oracle8의 경우
Oracle8에서는 DEF$_CALLDEST가 더이상 DEF$_CALLDEST_CALL constraint를
가지지 않으므로 이 부분에 대한 고려는 필요없이 다음과 같이 해당 table들을
truncate시키면 된다.
SQL>truncate table system.DEF$_AQCALL;
SQL>truncate table system.DEF$_CALLDEST;
SQL>truncate table system.DEF$_ERROR;
SQL>truncate table system.DEF$_AQERROR;
4. deferror의 내용을 지우는 방법
deferred transaction이 remote로 전달되어 반영되다가 오류가 발생하면
source가 되는 데이타베이스의 queue에서는 해당 내용이 사라지고,
반영되던 destination 데이타베이스의 deferror와 defcall/deftran에
해당 내용이 쌓이게 된다.
이러한 경우 error의 내용을 다시 반영을 시도하거나 아니면 내용을
확인 후 지우게 된다.
다음과 같이 지우면 된다.
SQL>exec dbms_defer_sys.delete_error(null,null);
참고로 다시 수행하는 것은
SQL>exec dbms_defer_sys.execute_error(null,null);
Reference Documents
<Note:190885.1> How to Clear Down the Deferred Queue and DBMS_DEFER_SYS.
DELETE_TRAN

Similar Messages

  • HOW TO VERIFY A DEFERRED TRANSACTION HAS BEEN PUSHED IN ORACLE8(MASTER REPL

    제품 : ORACLE SERVER
    작성날짜 : 2004-08-16
    HOW TO VERIFY A DEFERRED TRANSACTION HAS BEEN PUSHED IN ORACLE8
    (MASTER REPLICATION)
    ================================================================
    본 자료에서는 어느 시점에서, Deferred transaction이 PUSH 되었는지를
    확인하는 방법을 제시한다(In symmetric replication).
    단, Advanced Replication Feature는 8~10g Standard Edition에서는
    지원하지 않는다.
    개 념
    =====
    V7.x 에서는 deferred transaction 이 PUSH 됨과 동시에 삭제 되었으나, V8.x
    부터는 일정시간(interval) 이후에 PURGE 되는 절차를 따른다.
    임의의 transaction은 아래와 같은 조건을 만족할때 PUSH 된 것으로 확인될
    수 있다.
    즉, SCN-based integer 값을 기초로 transaction ordering 을 유지한다는
    기본개념을 적용한 것이다.
    - system.DEF$_DESTINATION.last_delivered > system.DEF$_AQCALL.cscn
    * DEF$_DESTINATION.last_delivered : the last transaction applied
    at the destination
    예 제
    =====
    이 예제는 REP1.ORACLE.COM site 에서 REP2.ORACLE.COM site 로 transaction 이 PUSH 되는 결과를 보여준다.
    SQL> insert into scott.dept values (80,'MARKETING','ORLANDO');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from deftran;
    DEFERRED_TRAN_ID DELIVERY_ORDER
    4.49.495 479001
    3.0.494 478972
    OR
    SQL> select enq_tid, cscn from system.def$_aqcall;
    ENQ_TID CSCN
    4.49.495 479001
    3.0.494 478972
    DEF$_DESTINATION table을 통하여 마지막으로 propagation 된 정보를 확인할
    수 있다
    SQL> select dblink, last_delivered from system.def$_destination;
    DBLINK LAST_DELIVERED
    REP2.ORACLE.COM 478992
    REP1.ORACLE.COM 478878
    이 시점에서 DEFERRED_TRAN_ID or ENQ_TID 4.49.495 transaction 이 PUSH 되지
    않았음을 알 수 있는것이다. 이는 DELIVERY_ORDER or CSCN 479001 transaction이 REP2.ORACLE.COM 에 대해 마지막으로 전이된 478992 보다 큰 값을 가지고 있기
    때문이다.
    즉, DEF$_AQCALL.CSCN > DEF$_DESTINATION.LAST_DELIVERED 을 만족한다면 해당 transaction 은 아직 PUSH 되지 않았음을 뜻한다.
    그럼 PUSH scheduling 을 적용 함으로써, 이러한 값들이 어떻게 변하는지 알아
    보도록 하자.
    SQL> exec dbms_defer_sys.schedule_push('rep2.oracle.com',
    'sysdate+1/(60*24)', sysdate+1/(60*24));
    PL/SQL procedure successfully completed.
    SQL> select * from deftran;
    DEFERRED_TRAN_ID DELIVERY_ORDER
    4.49.495 479001
    3.0.494 478972
    SQL> select enq_tid, cscn from system.def$_aqcall;
    ENQ_TID CSCN
    4.49.495 479001
    3.0.494 478972
    위 값들은 전혀 변하지 않았으나, 이는 Deferred transaction mechanism 관점에서
    정상적인 정보를 나타내고 있다(아직 PURGE 되지 않았기 때문)
    SQL> Select dblink, last_delivered from system.def$_destination;
    DBLINK LAST_DELIVERED
    REP2.ORACLE.COM 479017
    REP1.ORACLE.COM 478878
    그러나, DEF$_DESTINATION table 의 LAST_DELIVERED column 값을 확인해 보면, REP2.ORACLE.COM site 에 대한 값이 증가했음을 볼 수 있다.
    그런 이유로 DEFTRAN 에 기록되었던 transaction 중 DEF$_AQCALL.CSCN < DEF$_DESTINATION.LAST_DELIVERED 을 만족하는 모든 transaction 은 PUSH
    되었음을 확인할 수 있는것이다.
    특정 SITE 에 대해 PUSH 된 transaction 수를 구하는 방법
    ====================================================
    SQL> connect system/manager
    Connected.
    SQL> select count(*)
    from def$_aqcall
    where cscn < (select last_delivered
    from def$_destination
    where dblink ='REP2.ORACLE.COM');
    COUNT(*)
    2
    Reference
    =========
    Multimaster replication
    How to rectify the replication environment
    Parallel propagation

    제품 : ORACLE SERVER
    작성날짜 : 2004-08-16
    HOW TO VERIFY A DEFERRED TRANSACTION HAS BEEN PUSHED IN ORACLE8
    (MASTER REPLICATION)
    ================================================================
    본 자료에서는 어느 시점에서, Deferred transaction이 PUSH 되었는지를
    확인하는 방법을 제시한다(In symmetric replication).
    단, Advanced Replication Feature는 8~10g Standard Edition에서는
    지원하지 않는다.
    개 념
    =====
    V7.x 에서는 deferred transaction 이 PUSH 됨과 동시에 삭제 되었으나, V8.x
    부터는 일정시간(interval) 이후에 PURGE 되는 절차를 따른다.
    임의의 transaction은 아래와 같은 조건을 만족할때 PUSH 된 것으로 확인될
    수 있다.
    즉, SCN-based integer 값을 기초로 transaction ordering 을 유지한다는
    기본개념을 적용한 것이다.
    - system.DEF$_DESTINATION.last_delivered > system.DEF$_AQCALL.cscn
    * DEF$_DESTINATION.last_delivered : the last transaction applied
    at the destination
    예 제
    =====
    이 예제는 REP1.ORACLE.COM site 에서 REP2.ORACLE.COM site 로 transaction 이 PUSH 되는 결과를 보여준다.
    SQL> insert into scott.dept values (80,'MARKETING','ORLANDO');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from deftran;
    DEFERRED_TRAN_ID DELIVERY_ORDER
    4.49.495 479001
    3.0.494 478972
    OR
    SQL> select enq_tid, cscn from system.def$_aqcall;
    ENQ_TID CSCN
    4.49.495 479001
    3.0.494 478972
    DEF$_DESTINATION table을 통하여 마지막으로 propagation 된 정보를 확인할
    수 있다
    SQL> select dblink, last_delivered from system.def$_destination;
    DBLINK LAST_DELIVERED
    REP2.ORACLE.COM 478992
    REP1.ORACLE.COM 478878
    이 시점에서 DEFERRED_TRAN_ID or ENQ_TID 4.49.495 transaction 이 PUSH 되지
    않았음을 알 수 있는것이다. 이는 DELIVERY_ORDER or CSCN 479001 transaction이 REP2.ORACLE.COM 에 대해 마지막으로 전이된 478992 보다 큰 값을 가지고 있기
    때문이다.
    즉, DEF$_AQCALL.CSCN > DEF$_DESTINATION.LAST_DELIVERED 을 만족한다면 해당 transaction 은 아직 PUSH 되지 않았음을 뜻한다.
    그럼 PUSH scheduling 을 적용 함으로써, 이러한 값들이 어떻게 변하는지 알아
    보도록 하자.
    SQL> exec dbms_defer_sys.schedule_push('rep2.oracle.com',
    'sysdate+1/(60*24)', sysdate+1/(60*24));
    PL/SQL procedure successfully completed.
    SQL> select * from deftran;
    DEFERRED_TRAN_ID DELIVERY_ORDER
    4.49.495 479001
    3.0.494 478972
    SQL> select enq_tid, cscn from system.def$_aqcall;
    ENQ_TID CSCN
    4.49.495 479001
    3.0.494 478972
    위 값들은 전혀 변하지 않았으나, 이는 Deferred transaction mechanism 관점에서
    정상적인 정보를 나타내고 있다(아직 PURGE 되지 않았기 때문)
    SQL> Select dblink, last_delivered from system.def$_destination;
    DBLINK LAST_DELIVERED
    REP2.ORACLE.COM 479017
    REP1.ORACLE.COM 478878
    그러나, DEF$_DESTINATION table 의 LAST_DELIVERED column 값을 확인해 보면, REP2.ORACLE.COM site 에 대한 값이 증가했음을 볼 수 있다.
    그런 이유로 DEFTRAN 에 기록되었던 transaction 중 DEF$_AQCALL.CSCN < DEF$_DESTINATION.LAST_DELIVERED 을 만족하는 모든 transaction 은 PUSH
    되었음을 확인할 수 있는것이다.
    특정 SITE 에 대해 PUSH 된 transaction 수를 구하는 방법
    ====================================================
    SQL> connect system/manager
    Connected.
    SQL> select count(*)
    from def$_aqcall
    where cscn < (select last_delivered
    from def$_destination
    where dblink ='REP2.ORACLE.COM');
    COUNT(*)
    2
    Reference
    =========
    Multimaster replication
    How to rectify the replication environment
    Parallel propagation

  • How to define a transaction queue in xmlgateway setup?

    Hi folks:
    I have made a sample in XMLgateway successfully. But that is using the OTA way, which I send the request use the Oracle Transport Agent with this link:http://[hostname]:[port]/webservices/ECXOTAInbound, and I can see the status in Transaction Monitor is successful. And From Oracle DB, I can see the message is enqueued the ecx_inqueue table(Inbound Message Queue) first, and then the workflow BES enqueues the message to the ecx_in_oag_q_table(inbound transaction queue) for XML gateway to process.
    And my question is: When I try to send the message rather by axis client than by the link http://[hostname]:[port]/webservices/ECXOTAInbound, there is no record for this message in Transaction Monitor. And from Oracle DB, I can see the message is enqueued the wf_ws_jms_in table(Inbound Message Queue) first, and then the message is not enqueued into ecx_in_oag_q_table(Inbound transaction queue). But a error message is insert into ecx_inbound_logs.
    So,What I want to ask for help are following:
    1.How can I define the transaction queue for trading partner's transaction?
    2.Is there another inbound transaction queue I can use for wf_ws_jms_in(Inbound Message Queue)?
    3.Is this transaction queue(ecx_in_oag_q_table) only receive the message from ecx_inqueue table(Inbound Message Queue)? If yes, what's the transaction queue receive the message from wf_ws_jms_in table(Inbound Message Queue), and How can I assign this transaction queue to my JMS and web service request trading partner?
    I really appreciate if anyone can help me to make such thing clear. Thanks very much.I'm always waitting...

    i have  a program in production system if i type the request and execute its sends a mail to my admin saying to transport the request to production system.....thats y??????
    just tell me ur idea.............

  • JMS event generator only gets non-transactional queue msg

    Hi,
    I have created a JMS event generator to listen to a particular queue. It seems to work perfectly fine if, when posting a message to the queue that the JMS EG is listening to, the queue created is a non-transactional queue, i.e. queueConnection.createQueueSession(false, ...).
    However if I created a transactional queue to post message to the JMS EG, i.e. queueConnection.createQueueSession(true, ...), then the JMS EG can't seem to see the message. I checked in the WLI Admin console, JMS EG section, and there are no messages read by the particular JMS EG after I have posted the msg to the queue.
    My question is: is there a known limitation on the JMS EG that it can only read from a non-transactional JMS queue, or is this a bug? (I am using weblogic 8.1 sp2).
    Thanks
    Regards,
    xlfhk

    Hi,
    sorry, just discovered it's my mistake. Instead of using the transaction created when calling queueConnection.createQueueSession(true, ...), and committing that, I created a JTA transaction artificially wrapping the entire chunk of code.
    As a result, I ended up with a pair of transactions that are nested (I think ...), and the external transaction's commit was called when the nested JMS transaction hasn't been committed yet. As a result, no commit ever took place (I think again ...).
    I have now tried calling queueSession.commit() after sending the message. It seems to work fine. Thanks for the help.
    Regards,
    xlfhk.

  • 하나의 DEFERRED TRANSACTION 에 대한 DEFCALL을 알수있는 PROCEDURE.

    제품 : ORACLE SERVER
    작성날짜 : 2002-11-15
    하나의 DEFERRED TRANSACTION 에 대한 DEFCALL을 알수있는 PROCEDURE.
    =================================================================
    PURPOSE
    다음은 하나의 DEFERRED TRANSACTION 에 대한 DEFCALL을 알수 있는
    PROCEDURE를 제공한다.
    Explanation
    각각의 DEFERRED TRANSACTION에대한 DEFCALL을 알 수 있음에 따라
    DEFERRED TRANSACTION 의 ENTRY 에 대하여 다음과 같은 PROCEDURE를
    이용하여 TRANSACTION을 추적할수 있다.
    Example
    다음의 SCRIPT는 REPADMIN으로 실행하여야 하며(sys user도 가능)
    SQLPLUS에서 SET SERVEROUTPUT ON 을 실행후 사용하여야 한다.
    CREATE OR REPLACE PROCEDURE show_call (t IN VARCHAR2) IS
    -- Print the argument type and values of a deferred call.
    -- Modified for Oracle8 and supports all replicated datatypes including
    -- NCHAR, NVARCHAR and all LOBs. (BFILES are not replicated [yet])
    -- NOTE: set serveroutput on before calling this procedure
    -- set serveroutput on size 100000
    argno number;
    argtyp number;
    argform number;
    callno number;
    tranid VARCHAR2(30);
    typdsc char(15);
    rowid_val rowid;
    char_val varchar2(255);
    nchar_val nvarchar2(255);
    date_val date;
    number_val number;
    varchar2_val varchar2(2000);
    nvarchar2_val nvarchar2(2000);
    raw_val raw(255);
    cursor c_defcall (t VARCHAR2) is
    select callno, deferred_tran_id, schemaname, packagename, procname,
    argcount
    from defcall
    where deferred_tran_id = t;
    BEGIN
    FOR c1rec in c_defcall (t) LOOP
    dbms_output.put_line('Call Number: ' ||c1rec.callno);
    dbms_output.put_line('Call to '
    ||c1rec.schemaname||'.'||c1rec.packagename||'.'||c1rec.procname);
    dbms_output.put_line('# of arguments: '||c1rec.argcount);
    dbms_output.put_line(' ARG ' || 'Data Type ' || 'Value');
    dbms_output.put_line(' --- ' || '--------------- ' ||
    argno := 1;
    callno := c1rec.callno; tranid := c1rec.deferred_tran_id;
    WHILE TRUE LOOP
    if argno > c1rec.argcount then
    exit;
    end if;
    argtyp := dbms_defer_query.get_arg_type(callno, argno, tranid);
    argform := dbms_defer_query.get_arg_form(callno, argno, tranid);
    if argtyp = 1 and argform = 1 then
    typdsc := 'VARCHAR2';
    varchar2_val := dbms_defer_query.get_varchar2_arg(callno, argno,
    tranid);
    dbms_output.put_line(to_char(argno,'09')||') '||typdsc||'
    '||nvl(varchar2_val,'(NULL)'));
    elsif argtyp = 1 and argform = 2 then
    typdsc := 'NVARCHAR2';
    nvarchar2_val := dbms_defer_query.get_nvarchar2_arg(callno, argno,
    tranid);
    dbms_output.put_line(to_char(argno,'09')||') '||typdsc||'
    '||nvl(translate(nvarchar2_val using char_cs),'(NULL)'));
    elsif argtyp = 2 then
    typdsc := 'NUMBER';
    number_val := dbms_defer_query.get_number_arg(callno, argno, tranid);
    dbms_output.put_line(to_char(argno,'09')||') '||typdsc||'
    '||nvl(to_char(number_val),'(NULL)'));
    elsif argtyp = 11 then
    typdsc := 'ROWID';
    rowid_val := dbms_defer_query.get_rowid_arg(callno, argno, tranid);
    dbms_output.put_line(to_char(argno,'09')||') '||typdsc||'
    '||nvl(rowid_val,'(NULL)'));
    elsif argtyp = 12 then
    typdsc := 'DATE';
    date_val := dbms_defer_query.get_date_arg(callno, argno, tranid);
    dbms_output.put_line(to_char(argno,'09')||') '||typdsc||'
    '||nvl(to_char(date_val,'YYYY-MM-DD HH24:MI:SS'),'(NULL)'));
    elsif argtyp = 23 then
    typdsc := 'RAW';
    raw_val := dbms_defer_query.get_raw_arg(callno, argno, tranid);
    dbms_output.put_line(to_char(argno,'09')||') '||typdsc||'
    '||nvl(raw_val,'(NULL)'));
    elsif argtyp = 96 and argform = 1 then
    typdsc := 'CHAR';
    char_val := dbms_defer_query.get_char_arg(callno, argno, tranid);
    dbms_output.put_line(to_char(argno,'09')||') '||typdsc||'
    '||nvl(char_val,'(NULL)'));
    elsif argtyp = 96 and argform = 2 then
    typdsc := 'NCHAR';
    nchar_val := dbms_defer_query.get_nchar_arg(callno, argno, tranid);
    dbms_output.put_line(to_char(argno,'09')||') '||typdsc||'
    '||nvl(translate(nchar_val using char_cs),'(NULL)'));
    elsif argtyp = 113 then
    typdsc := 'BLOB';
    varchar2_val := dbms_lob.substr(dbms_defer_query.get_blob_arg(callno,
    argno, tranid));
    dbms_output.put_line(to_char(argno,'09')||') '||typdsc||'
    '||nvl(varchar2_val,'(NULL)'));
    elsif argtyp = 112 and argform = 1 then
    typdsc := 'CLOB';
    varchar2_val := dbms_lob.substr(dbms_defer_query.get_clob_arg(callno,
    argno, tranid));
    dbms_output.put_line(to_char(argno,'09')||') '||typdsc||'
    '||nvl(varchar2_val,'(NULL)'));
    elsif argtyp = 112 and argform = 2 then
    typdsc := 'NCLOB';
    nvarchar2_val :=
    dbms_lob.substr(dbms_defer_query.get_nclob_arg(callno, argno, tranid));
    dbms_output.put_line(to_char(argno,'09')||') '||typdsc||'
    '||nvl(translate(nvarchar2_val using char_cs),'(NULL)'));
    end if;
    argno := argno + 1;
    end loop;
    end loop;
    end;
    Examples
    SQL> select * from deftran;
    DEFERRED_TRAN_ID DELIVERY_ORDER D START_TIM
    3.6.74010 4.9392E+12 R 05-SEP-98
    2.8.74149 4.9392E+12 R 05-SEP-98
    3.0.73506 4.9392E+12 D 02-SEP-98
    SQL> set serveroutput on size 1000000
    SQL> execute show_call('2.8.74149');
    Call Number: 0
    Call to SCOTT.DEPT$RP.REP_UPDATE
    # of arguments: 11
    ARG Data Type Value
    01) RAW 06060707
    02) NUMBER 70
    03) NUMBER (NULL)
    04) CHAR WGT
    05) CHAR (NULL)
    06) CHAR ORLANDO
    07) CHAR RMSC
    08) VARCHAR2 INITIAL
    09) VARCHAR2 MOBAY.WORLD
    10) VARCHAR2 MOBAY.WORLD
    11) VARCHAR2 N
    Call Number: 1
    Call to SCOTT.DEPT$RP.REP_UPDATE
    # of arguments: 11
    ARG Data Type Value
    01) RAW 06060707
    02) NUMBER 75
    03) NUMBER (NULL)
    04) CHAR WGT
    05) CHAR (NULL)
    06) CHAR ORLANDO
    07) CHAR RMSC
    08) VARCHAR2 MOBAY.WORLD
    09) VARCHAR2 MOBAY.WORLD
    10) VARCHAR2 MOBAY.WORLD
    11) VARCHAR2 N
    PL/SQL procedure successfully completed.
    Reference Documents
    <Note:2103883.6>

  • Geeting reply message on transacted queue.

    Hi all,
    I need to use a transacted queue. I have to get some information back from my message.
    I know by defination, we can't use QueueRequestor class. Is there any way, by which I can get reply (a new Message) in a transacted queue???
    I feel, JMS is not developed for these kind of problems. Am I wrong here???
    thanks
    amarnag

    Hi all,
    I need to use a transacted queue. I have to get some
    information back from my message.
    I know by defination, we can't use QueueRequestor
    class. Is there any way, by which I can get reply (a
    new Message) in a transacted queue???What's the problem? The QueueRequestor is not rocket science. Just write your own request/reply handler which commits after send.

  • Deferred transaction fails due to a "ORA-01403: no data found" error

    I recently acticated replication between two Oracle instances.
    (one being the master definition site and the other one being
    a second master site).
    Everything was going well until two weeks ago, when i realized
    that some datas were different between the two Oracle instances.
    I tried to figure out why and found that some deferred transation
    failed to propagate due to a "ORA-01403: no data found" error.
    Not all transaction fail, only a few.
    All the errors are stored in the DEFERROR table of the second
    master site, the DEFERROR table is empty in the master definition
    site.
    For every error, the source is the master definition site and the
    destination is the second master site, which is OK because the
    second master site is supposed to be "read-only". But why are the
    errors stored in the DEFERROR table of the second master site
    (and not in the master definition site (the source)).
    Most errors occur on UPDATE statements but a few of them occur
    on DELETE statements. Given the fact that the record actually is
    in the second master site, how is it possible to get a
    "ORA-01403: no data found" error on a delete statement ???????
    I can't figure out what data cannot be found,
    Thanks for your help,
    Didier.

    What if i tell you the first transaction in error is an UPDATE
    statement on a record that actually is in the destination table
    in the second master site. So the data is there, it should be
    found ...
    I've tried an EXECUTE_ERROR on that very first transaction
    in error but it doesn't work. Here's the call (as repadmin) :
    begin
    DBMS_DEFER_SYS.EXECUTE_ERROR (
    DEFERRED_TRAN_ID => '6.42.271',
    DESTINATION => 'AMELIPI.SENAT.FR'
    end ;
    And here's the full message :
    ORA-01403: no data found
    ORA-06512: at "SYS.DBMS_DEFER_SYS_PART1" line 430
    ORA-06512: at "SYS.DBMS_DEFER_SYS" line 1632
    ORA-06512: at "SYS.DBMS_DEFER_SYS" line 1678
    ORA-06512: at line 2
    I thought it could be because the primary key constraint on the
    destination table wasn't activated but it was. Could it
    be a problem with the corresponding index ?
    Thanks for your help,
    Didier.

  • Deffered Transaction queue tables

    Hi,
    By defualt in which table/s and tablespace deffred transactions are stored in Multimaster environment?
    For brand new Installation how can I change that so deffred transactions will be stored in specified tablespace.
    Thanks.

    I think the error message is quite self explanatory, isn't it?
    Use
    DBMS_AQADM.DROP_QUEUE_TABLE(queue_table => '<QUEUE_TABLE>');
    DBMS_AQADM.DROP_QUEUE_TABLE(queue_table=>'<QUEUE_TABLE>',force => TRUE);to drop any queue tables of the user.
    If the dictionary view "user_queue_tables"/"dba_queue_tables" doesn't show any queue tables left for that particular user you can use MetaLink notes 236898.1 and 203225.1 to follow the procedures there to get rid of any orphaned AQ Objects.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • What table rsa7 transaction queue values are stored

    I'm working on ECC 5 and BI 7
    I created a datasoure in ECC (based on table view) and I created a generic delta source system using rso2. In generic delta I have 'Delta specific field' - calender day. We can view this queue values in RSA7. My question is in what table we can view these values? (Delta queue values in my case previous run date)

    Hi,
    You can view all the values in RSA3(FULL LOAD mode).
    You can give restriction and iew the data based on date.
    If you want the data particularly in terms of previous deltas, i doubt the availabilityin that way
    Hope this helps,
    Srinath.

  • In a MultiMaster Replication to not propagate changes on Second DB

    Hello,
    I've setup a multimaster replication environment with DB1 and DB2.
    DB1 replicates all changes on some tables to DB2. But i don't want to DB2 to propagate changes to DB1. So, i didn't create a scheduled link on DB2 to propagate changes to DB1. But deferred transaction queue is getting too large on DB2. How can i settle the DB2 to not to put the changes to deferred transactions?
    Regards

    Replicating from DB1 to DB2 and allowing local updates on DB2 without propagating them back to DB1 is done with WRITABLE MATERIALIZED VIEWS, not MultiMaster Replication.
    Changes made at DB2 are "local" until they are overwritten by changes from DB1.
    See http://download.oracle.com/docs/cd/B19306_01/server.102/b14226/repoverview.htm#sthref57
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Change character set

    Hi
    is anyone can tell me how to change characterset.
    i try with alter session but it doesnt work.
    thanks

    Article from Metalink
    Doc ID:      Note:66320.1
    Subject:      Changing the Database Character Set or the Database National Character Set
    Type:      BULLETIN
    Status:      PUBLISHED
         Content Type:      TEXT/PLAIN
    Creation Date:      23-OCT-1998
    Last Revision Date:      12-DEC-2003
    PURPOSE ======= To explain how to change the database character set or national character set of an existing Oracle8(i) or Oracle9i database without having to recreate the database. 1. SCOPE & APPLICATION ====================== The method described here is documented in the Oracle 8.1.x and Oracle9i documentation. It is not documented but it can be used in version 8.0.x. It does not work in Oracle7. The database character set is the character set of CHAR, VARCHAR2, LONG, and CLOB data stored in the database columns, and of SQL and PL/SQL text stored in the Data Dictionary. The national character set is the character set of NCHAR, NVARCHAR2, and NCLOB data. In certain database configurations the CLOB and NCLOB data are stored in the fixed-width Unicode encoding UCS-2. If you are using CLOB or NCLOB please make sure you read section "4. HANDLING CLOB AND NCLOB COLUMNS" below in this document. Before changing the character set of a database make sure you understand how Oracle deals with character sets. Before proceeding please refer to [NOTE:158577.1] "NLS_LANG Explained (How Does Client-Server Character Conversion Work?)". See also [NOTE:225912.1] "Changing the Database Character Set - an Overview" for general discussion about various methods of migration to a different database character set. If you are migrating an Oracle Applications instance, read [NOTE:124721.1] "Migrating an Applications Installation to a New Character Set" for specific steps that have to be performed. If you are migrating from 8.x to 9.x please have a look at [NOTE:140014.1] "ALERT: Oracle8/8i to Oracle9i Using New "AL16UTF16"" and other referenced notes below. Before using the method described in this note it is essential to do a full backup of the database and to use the Character Set Scanner utility to check your data. See the section "2. USING THE CHARACTER SET SCANNER" below. Note that changing the database or the national character set as described in this document does not change the actual character codes, it only changes the character set declaration. If you want to convert the contents of the database (character codes) from one character set to another you must use the Oracle Export and Import utilities. This is needed, for example, if the source character set is not a binary subset of the target character set, i.e. if a character exists in the source and in the target character set but not with the same binary code. All binary subset-superset relationships between characters sets recognized by the Oracle Server are listed in [NOTE:119164.1] "Changing Database Character Set - Valid Superset Definitions". Note: The varying width character sets (like UTF8) are not supported as national character sets in Oracle8(i) (see [NOTE:62107.1]). Thus, changing the national character set from a fixed width character set to a varying width character set is not supported in Oracle8(i). NCHAR types in Oracle8 and Oracle8i were designed to support special Oracle specific fixed-width Asian character sets, that were introduced to provide higher performance processing of Asian character data. Examples of these character sets are : JA16EUCFIXED ,JA16SJISFIXED , ZHT32EUCFIXED. For a definition of varying width character sets see also section "4. HANDLING CLOB AND NCLOB COLUMNS" below. WARNING: Do not use any undocumented Oracle7 method to change the database character set of an Oracle8(i) or Oracle9i database. This will corrupt the database. 2. USING THE CHARACTER SET SCANNER ================================== Character data in the Oracle 8.1.6 and later database versions can be efficiently checked for possible character set migration problems with help of the Character Set Scanner utility. This utility is included in the Oracle Server 8.1.7 software distribution and the newest Character Set Scanner version can be downloaded from the Oracle Technology Network site, http://otn.oracle.com The Character Set Scanner on OTN is available for limited number of platforms only but it can be used with databases on other platforms in the client/server configuration -- as long as the database version matches the Character Set Scanner version and platforms are either both ASCII-based or both EBCDIC-based. It is recommended to use the newest Character Set Scanner version available from the OTN site. The Character Set Scanner is documented in the following manuals: - "Oracle8i Documentation Addendum, Release 3 (8.1.7)", Chapter 3 - "Oracle9i Globalization Support Guide, Release 1 (9.0.1)", Chapter 10 - "Oracle9i Database Globalization Support Guide, Release 2 (9.2)", Chapter 11 Note: The Character Set Scanner coming with Oracle 8.1.7 and Oracle 9.0.1 does not have a separate version number. It reports the database release number in its banner. This version of the Scanner does not check for illegal character codes in a database if the FROMCHAR and TOCHAR (or FROMNCHAR and TONCHAR) parameters have the same value (i.e. you simulate migration from a character set to itself). The Character Set Scanner 1.0, available on OTN, reports its version number as x.x.x.1.0, where x.x.x is the database version number. This version adds a few bug fixes and it supports FROMCHAR=TOCHAR provided it is not UTF8. The Character Set Scanner 1.1, available on OTN and with Release 2 (9.2) of the Oracle Server, reports its version number as v1.1 followed by the database version number. This version adds another bug fixes and the full support for FROMCHAR=TOCHAR. None of the above versions of the Scanner can correctly analyze CLOB or NCLOB values if the database or the national character set, respectively, is multibyte. The Scanner reports such values randomly as Convertible or Lossy. The version 1.2 of the Scanner will mark all such values as Changeless (as they are always stored in the Unicode UCS-2 encoding and thus they do not change when the database or national character set is changed from one multibyte to another). Character Set Scanner 2.0 will correctly check CLOBs and NCLOBs for possible data loss when migrating from a multibyte character set to its subset. To verify that your database contains only valid codes, specify the new database character set in the TOCHAR parameter and/or the new national character set in the TONCHAR parameter. Specify FULL=Y to scan the whole database. Set ARRAY and PROCESS parameters depending on your system's resources to speed up the scanning. FROMCHAR and FROMNCHAR will default to the original database and national character sets. The Character Set Scanner should report only Changless data in both the Data Dictionary and in application data. If any Convertible or Exceptional data are reported, the ALTER DATABASE [NATIONAL] CHARACTER SET statement must not be used without further investigation of the source and type of these data. In situations in which the ALTER DATABASE [NATIONAL] CHARACTER SET statement is used to repair an incorrect database character set declaration rather than to simply migrate to a new wider character set, you may be advised by Oracle Support Services analysts to execute the statement even if Exceptional data are reported. For more information see also [NOTE:225912.1] "Changing the Database Character Set - a short Overview". 3. CHANGING THE DATABASE OR THE NATIONAL CHARACTER SET ====================================================== Oracle8(i) introduces a new documented method of changing the database and national character sets. The method uses two SQL statements, which are described in the Oracle8i National Language Support Guide: ALTER DATABASE [<db_name>] CHARACTER SET <new_character_set> ALTER DATABASE [<db_name>] NATIONAL CHARACTER SET <new_NCHAR_character_set> The database name is optional. The character set name should be specified without quotes, for example: ALTER DATABASE CHARACTER SET WE8ISO8859P1 To change the database character set perform the following steps. Note that some of them have been erroneously omitted from the Oracle8i documentation: 1. Use the Character Set Scanner utility to verify that your database contains only valid character codes -- see "2. USING THE CHARACTER SET SCANNER" above. 2. If necessary, prepare CLOB columns for the character set change -- see "4. HANDLING CLOB AND NCLOB COLUMNS" below. Omitting this step can lead to corrupted CLOB/NCLOB values in the database. If SYS.METASTYLESHEET (STYLESHEET) is populated (9i and up only) then see [NOTE:213015.1] "SYS.METASTYLESHEET marked as having convertible data (ORA-12716 when trying to convert character set)" for the actions that need to be taken. 3. Make sure the parallel_server parameter in INIT.ORA is set to false or it is not set at all. 4. Execute the following commands in Server Manager (Oracle8) or sqlplus (Oracle9), connected as INTERNAL or "/ AS SYSDBA": SHUTDOWN IMMEDIATE; -- or NORMAL <do a full database backup> STARTUP MOUNT; ALTER SYSTEM ENABLE RESTRICTED SESSION; ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0; ALTER SYSTEM SET AQ_TM_PROCESSES=0; ALTER DATABASE OPEN; ALTER DATABASE CHARACTER SET <new_character_set>; SHUTDOWN IMMEDIATE; -- OR NORMAL STARTUP RESTRICT; 5. Restore the parallel_server parameter in INIT.ORA, if necessary. 6. Execute the following commands: SHUTDOWN IMMEDIATE; -- OR NORMAL STARTUP; The double restart is necessary in Oracle8(i) because of a SGA initialization bug, fixed in Oracle9i. 7. If necessary, restore CLOB columns -- see "4. HANDLING CLOB AND NCLOB COLUMNS" below. To change the national character set replace the ALTER DATABASE CHARACTER SET statement with ALTER DATABASE NATIONAL CHARACTER SET. You can issue both statements together if you wish. Error Conditions ---------------- A number of error conditions may be reported when trying to change the database or national character set. In Oracle8(i) the ALTER DATABASE [NATIONAL] CHARACTER SET statement will return: ORA-01679: database must be mounted EXCLUSIVE and not open to activate - if you do not enable restricted session - if you startup the instance in PARALLEL/SHARED mode - if you do not set the number of queue processes to 0 - if you do not set the number of AQ time manager processes to 0 - if anybody is logged in apart from you. This error message is misleading. The command requires the database to be open but only one session, the one executing the command, is allowed. For the above error conditions Oracle9i will report one of the errors: ORA-12719: operation requires database is in RESTRICTED mode ORA-12720: operation requires database is in EXCLUSIVE mode ORA-12721: operation cannot execute when other sessions are active Oracle9i can also report: ORA-12718: operation requires connection as SYS if you are not connect as SYS (INTERNAL, "/ AS SYSDBA"). If the specified new character set name is not recognized, Oracle will report one of the errors: ORA-24329: invalid character set identifier ORA-12714: invalid national character set specified ORA-12715: invalid character set specified The ALTER DATABASE [NATIONAL] CHARACTER SET command will only work if the old character set is considered a binary subset of the new character set. Oracle Server 8.0.3 to 8.1.5 recognizes US7ASCII as the binary subset of all ASCII-based character sets. It also treats each character set as a binary subset of itself. No other combinations are recognized. Newer Oracle Server versions recognize additional subset/superset combinations, which are listed in [NOTE:119164.1]. If the old character set is not recognized as a binary subset of the new character set, the ALTER DATABASE [NATIONAL] CHARACTER SET statement will return: - in Oracle 8.1.5 and above: ORA-12712: new character set must be a superset of old character set - in Oracle 8.0.5 and 8.0.6: ORA-12710: new character set must be a superset of old character set - in Oracle 8.0.3 and 8.0.4: ORA-24329: invalid character set identifier You will also get these errors if you try to change the characterset of a US7ASCII database that was started without a (correct) ORA_NLSxx parameter. See [NOTE:77442.1] It may be necessary to switch off the superset check to allow changes between formally incompatible character sets to solve certain character set problems or to speed up migration of huge databases. Oracle Support Services may pass the necessary information to customers after verifying the safety of the change for the customers' environments. If in Oracle9i an ALTER DATABASE NATIONAL CHARACTER SET is issued and there are N-type colums who contain data then this error is returned: ORA-12717:Cannot ALTER DATABASE NATIONAL CHARACTER SET when NCLOB data exists The error only speaks about Nclob but Nchar and Nvarchar2 are also checked see [NOTE:2310895.9] for bug [BUG:2310895] 4. HANDLING CLOB AND NCLOB COLUMNS ================================== Background ---------- In a fixed width character set codes of all characters have the same number of bytes. Fixed width character sets are: all single-byte character sets and those multibyte character sets which have names ending with 'FIXED'. In Oracle9i the character set AL16UTF16 is also fixed width. In a varying width character set codes of different characters may have different number of bytes. All multibyte character sets except those with names ending with FIXED (and except Oracle9i AL16UTF16 character set) are varying width. Single-byte character sets are character sets with names of the form xxx7yyyyyy and xxx8yyyyyy. Each character code of a single-byte character set occupies exactly one byte. Multibyte character sets are all other character sets (including UTF8). Some -- usually most -- character codes of a multibyte character set occupy more than one byte. CLOB values in a database whose database character set is fixed width are stored in this character set. CLOB values in an Oracle 8.0.x database whose database character set is varying width are not allowed. They have to be NULL. CLOB values in an Oracle >= 8.1.5 database whose database character set is varying width are stored in the fixed width Unicode UCS-2 encoding. The same holds for NCLOB values and the national character set. The UCS-2 storage format of character LOB values, as implemented in Oracle8i, ensures that calculation of character positions in LOB values is fast. Finding the byte offset of a character stored in a varying width character set would require reading the whole LOB value up to this character (possibly 4GB). In the fixed width character sets the byte offsets are simply character offsets multiplied by the number of bytes in a character code. In UCS-2 byte offsets are simply twice the character offsets. As the Unicode character set contains all characters defined in any other Oracle character set, there is no data loss when a CLOB/NCLOB value is converted to UCS-2 from the character set in which it was provided by a client program (usually the NLS_LANG character set). CLOB Values and the Database Character Set Change ------------------------------------------------- In Oracle 8.0.x CLOB values are invalid in varying width character sets. Thus you must delete all CLOB column values before changing the database character set to a varying width character set. In Oracle 8.1.5 and later CLOB values are valid in varying width character sets but they are converted to Unicode UCS-2 before being stored. But UCS-2 encoding is not a binary superset of any other Oracle character set. Even codes of the basic ASCII characters are different, e.g. single-byte code for "A"=0x41 becomes two-byte code 0x0041. This implies that even if the new varying width character set is a binary superset of the old fixed width character set and thus VARCHAR2/LONG character codes remain valid, the fixed width character codes in CLOB values will not longer be valid in UCS-2. As mentioned above, the ALTER DATABASE [NATIONAL] CHARACTER SET statement does not change character codes. Thus, before changing a fixed width database character set to a varying width character set (like UTF8) in Oracle 8.1.5 or later, you first have to export all tables containing non-NULL CLOB columns, then truncate these tables, then change the database character set and, finally, import the tables back to the database. The import step will perform the required conversion. If you omit the steps above, the character set change will succeed in Oracle8(i) (Oracle9i disallows the change in such situation) and the CLOBs may appear to be correctly legible but as their encoding is incorrect, they will cause problems in further operations. For example, CREATE TABLE AS SELECT will not correctly copy such CLOB columns. Also, after installation of the 8.1.7.3 server patchset the CLOB columns will not longer be legible. LONG columns are always stored in the database character set and thus they behave like CHAR/VARCHAR2 in respect to the character set change. BLOBs and BFILEs are binary raw datatypes and their processing does not depend on any Oracle character set setting. NCLOB Values and the National Character Set Change -------------------------------------------------- The above discussion about changing the database character set and exporting and importing CLOB values is theoretically applicable to the change of the national character set and to NCLOB values. But as varying width character sets are not supported as national character sets in Oracle8(i), changing the national character set from a fixed width character set to a varying width character set is not supported at all. Preparing CLOB Columns for the Character Set Change --------------------------------------------------- Take a backup of the database. If using Advanced Replication or deferred transactions functionality, make sure that there are no outstanding deferred transactions with CLOB parameters, i.e. DEFLOB view must have no rows with non-NULL CLOB_COL column; to make sure that replication environment remains consistent use only recommended methods of purging deferred transaction queue, preferably quiescing the replication environment. Then: - If changing the database character set from a fixed width character set to a varying with character set in Oracle 8.0.x, set all CLOB column values to NULL -- you are not allowed to use CLOB columns after the character set change. - If changing the database character set from a fixed width character set to a varying width character set in Oracle 8.1.5 or later, perform table-level export of all tables containing CLOB columns, including SYSTEM's tables. Set NLS_LANG to the old database character set for the Export utility. Then truncate these tables. Restoring CLOB Columns after the Character Set Change ----------------------------------------------------- In Oracle 8.1.5 or later, after changing the character set as described above (steps 3. to 6.), restore CLOB columns exported in step 2. by importing them back into the database. Set NLS_LANG to the old database character set for the Import utility to avoid IMP-16 errors and data loss. RELATED DOCUMENTS: ================== [NOTE:13856.1] V7: Changing the Database Character Set -- This note has limited distribution, please contact Oracle Support [NOTE:62107.1] The National Character Set in Oracle8 [NOTE:119164.1] Changing Database Character set - Valid Superset definitions [NOTE:118242.1] ALERT: Changing the Database or National Character Set Can Corrupt LOB Values <Note.158577.1> NLS_LANG Explained (How Does Client-Server Character Conversion Work?) [NOTE:140014.1] ALERT: Oracle8/8i to Oracle9i using New "AL16UTF16" [NOTE:159657.1] Complete Upgrade Checklist for Manual Upgrades from 8.X / 9.0.1 to Oracle9i (incl. 9.2) [NOTE:124721.1] Migrating an Applications Installation to a New Character Set Oracle8i National Language Support Guide Oracle8i Release 3 (8.1.7) Readme - Section 18.12 "Restricted ALTER DATABASE CHARACTER SET Command Support (CLOB and NCLOB)" Oracle8i Documentation Addendum, Release 3 (8.1.7) - Chapter 3 "New Character Set Scanner Utility" Oracle8i Application Developer's Guide - Large Objects (LOBs), Release 2 - Chapter 2 "Basic Components" Oracle8 Application Developer's Guide, Release 8.0 - Chapter 6 "Large Objects (LOBs)", Section "Introduction to LOBs" Oracle9i Globalization Guide, Release 1 (9.0.1) Oracle9i Database Globalization Guide, Release 2 (9.2) For further NLS / Globalization information you may start here: [NOTE:150091.1] Globalization Technology (NLS) Library index .
         Copyright (c) 1995,2000 Oracle Corporation. All Rights Reserved. Legal Notices and Terms of Use.     
    Joel P�rez

  • Problem in setting up schedule push

    Hi every body,
    I have a multimaster advance replication environment and we have less than 10 transaction per day. I am not sure what is the correct set up for my case.Could you please help me?
    My first question is:I want to propagate data as soon as possible like sync if I setup the schedule push to propagate transaction every 5 seconds as below
    BEGIN
    DBMS_DEFER_SYS.SCHEDULE_PUSH(
    destination => 'orc2',
    interval => 'SYSDATE + (5/60*60*24)',
    next_date => SYSDATE,
    parallelism => 1,
    delay_seconds => 10);
    END;
    is it correct approach?
    in other hand ,book(I mean Advance Replication) has written that for simulating continuous push we should setup it as below so it will propagate transaction every 1 minute.
    My second question is:I know interval >= 'SYSDATE + (1/144)' means every 10 minutes a job will start and delay_seconds => 1200 means each job remain aware for 20 minutes,
    but I can't understand why it can simulate 1 minute propagation? anybody knows?
    BEGIN
    DBMS_DEFER_SYS.SCHEDULE_PUSH(
    destination => 'orc2',
    interval => 'SYSDATE + (1/144)',
    next_date => SYSDATE,
    parallelism => 1,
    execution_second >= 1500,
    delay_seconds => 1200);
    END;
    My thrid question is :Which of the above setups is a better solution for my environment?I mean 5 second interval (interval => 'SYSDATE + (5/60*60*24)') + delay_second = 10 and parallel or 10 minute interval (interval => 'SYSDATE + (1/144)') + delay_second = 1200 and parallel + execution_second =>1500)
    Thank you in advance.
    Mery

    With a "delay" of 20minutes, the push job will "hang around" for 20minutes waiting for new transactions. If it receives no new transactions to push, it will go to sleep. However, with the job interval at 1minute, it will "wake up" one minute later and push
    transactions that were created in that last 1 minute. Again, it will "hang around" for the next 20minutes.
    This is what I see from the 9i documentation (for advanced replication not using streams, I find the 8i and 9i documentation better
    than the 10g documentation)
    Delay Seconds
    Though not directly a performance mechanism, properly configuring the delay_seconds parameter can give you greater control over the timing of your propagation of deferred transactions.
    When you are pushing deferred transactions, you set the delay_seconds parameter in the SCHEDULE_PUSH procedure or the PUSH function. When you are purging deferred transactions, you set the delay_seconds parameter in the SCHEDULE_PURGE procedure or the PURGE function. These procedures and functions are in the DBMS_DEFER_SYS package.
    The delay_seconds parameter controls how long a job remains aware of the deferred transaction queue. The effects of the delay_seconds parameter can best be illustrated with the following two examples:
    delay_seconds = 0 (default)
    If a scheduled job with a 60 minute interval wakes up at 2:30 pm and checks the deferred transaction queue, then any existing deferred transactions are propagated. The propagation takes 2 minutes and therefore the job is complete at 2:32 pm.
    If a deferred transaction enters the queue at 2:34 pm, then the deferred transaction is not propagated because the job is complete. In this scenario, the deferred transaction will be propagated at 3:30 pm.
    delay_seconds = 300
    If a scheduled job with a 60 minute interval wakes up at 2:30 pm and checks the deferred transaction queue, then any existing deferred transactions are propagated. The propagation takes 2 minutes and therefore the job is complete at 2:32 pm.
    If a deferred transaction enters the queue at 2:34 pm, then the deferred transaction is propagated because the job remains aware of the deferred transaction queue for 300 seconds (5 minutes) after the job has completed propagating whatever was in the queue. In this scenario, the deferred transaction is propagated at 2:34 pm.
    Why not just set the job to execute more often? Starting and stopping the job has a greater amount of overhead than starting the job and keeping it aware for a set period of time. In addition to decreasing the overhead associated with starting and stopping these jobs, using the delay_seconds parameter can reduce the amount of redo logging required to support scheduled jobs.
    As with most performance features, there is a point of diminishing returns. Keep the length of the delay_seconds parameter in check for the following reasons:
    Parallel Propagation: Each parallel process that is used when pushing the deferred transaction queue is not available for other parallel activities until the propagation job is complete. A long delay_seconds value may keep the parallel process unavailable for other operations. To use parallel propagation, you set the parallelism parameter to 1 or higher in the SCHEDULE_PUSH procedure or the PUSH function.
    Serial Propagation: If you are using serial propagation (not parallel propagation), then the delay_seconds value causes the open session to "sleep" for the entire length of the delay, providing none of the benefits earlier described. To use serial propagation, you set the parallelism parameter to 0 (zero) in the SCHEDULE_PUSH procedure or the PUSH function.
    Precise Purge: If you specify the purge_method_precise method when using the DBMS_DEFER_SYS.PURGE procedure and you have defined a large delay_seconds value, then you may experience performance degradation when performing the specified purge. Using purge_method_precise is more expensive than the alternative (purge_method_quick), but it ensures that the deferred transactions and procedure calls are purged after they have been successfully pushed.
    As a general rule of thumb, there are few viewable benefits of setting the delay_seconds parameter to a value greater than 20 minutes (which is 1200 seconds for the parameter setting).
    Additionally, if you are using serial propagation by setting the parallelism parameter to 0, then you probably do not want to set a large delay_seconds value. Unlike parallel propagation, serial propagation only checks the queue after the duration of the delay_seconds value has elapsed. If you use serial propagation and set delay_seconds to 20 minutes, then the scheduled job will sleep for the entire 20 minutes, and any deferred transactions that enter the deferred transaction queue during that time are not pushed until 20 minutes have elapsed. Therefore, if you are using serial propagation, then consider setting delay_seconds to a value of 60 seconds or lower.
    If you set a value of 20 minutes for parallel propagation, then the parallel push checks once a minute. If you can afford this resource lock, then the relatively high delay_seconds value of 20 minutes is probably most efficient in your environment. If, however, you cannot afford this resource lock, then consider setting the delay_seconds value to 10 or 20 seconds. Although you will need to execute the jobs more often than if the value was set to 1200 seconds, you still gain many of the benefits of the delay_seconds feature (versus the default value of 0 seconds).

  • Monitor failed jobs

    Hi
    Is there any difference between Failed Job Count and Broken Job Count ?
    Thanks

    Yes please see the definition below.
    Broken Job Count The Oracle Server job queue is a database table that stores information about local jobs such as the PL/SQL call to execute for a job such as when to run a job. Database replication is also managed by using the Oracle job queue mechanism using jobs to push deferred transactions to remote master sites, to purge applied transactions from the deferred transaction queue or to refresh snapshot refresh groups.
    A job can be broken in two ways:
    Oracle has failed to successfully execute the job after sixteen attempts. The job has been explicitly marked as broken by using the procedure DBMS_ JOB.BROKEN
    This metric checks for broken DBMS jobs. A critical alert is generated if the number of broken jobs exceeds the value specified by the threshold argument.
    Failed Job Count The Oracle Server job queue is a database table that stores information about local jobs such as the PL/SQL call to execute for a job such as when to run a job. Database replication is also managed by using the Oracle job queue mechanism using jobs to push deferred transactions to remote master sites, to purge applied transactions from the deferred transaction queue or to refresh snapshot refresh groups.
    If a job returns an error while Oracle is attempting to execute it, the job fails. Oracle repeatedly tries to execute the job doubling the interval of each attempt. If the job fails sixteen times, Oracle automatically marks the job as broken and no longer tries to execute it.
    This metric checks for failed DBMS jobs. An alert is generated if the number of failed job exceeds the value specified by the threshold argument.

  • Problem in schedule push

    Hi every body ,
    I configured my schedule push to
    BEGIN
    DBMS_DEFER_SYS.SCHEDULE_PUSH(
    destination => 'orc1.mydomain.com',
    interval => 'SYSDATE + (1/1440)',
    next_date => SYSDATE,
    parallelism => 1,
    stop_on_error => FALSE,
    delay_seconds => 0);
    END;
    to check that if my tables become updated every one minute and test the environment
    but i don't know why it does not push it and i can still see that in oem(DBMS JOBS tab)
    I did also check my links and also the timing on that is periodic and have been set.
    my job_queue_process is also equal to 10
    I would be grateful if you help me.
    Mery
    Edited by: user643323 on Sep 10, 2008 4:48 PM

    Thanks for the quick respond and follow up
    well why purge I thought it should be propagated with schedule_push as I read the below paragraph in book:
    " At scheduled intervals or on-demand, the deferred transactions in the deferred
    transaction queue are propagated to the target destinations. Each destination
    may have a different interval."
    and purge just remove the successfully pushed transaction after the designated time as I read the below paragraph:
    "When a deferred transaction has been successfully pushed to all remote master
    sites, it is not purged from the deferred transaction queue at the originating site
    immediately. It may be purged later by a purge job, which runs at a
    user-defined interval."
    So why a setting lazy purge (because i set in for every one day)makes problem?Shouldn't it be propagated with schedule push?
    When i insert 1 record schedule_push works but for 16000 bulk insert it doesn't??!!!!!!
    Thank you
    Mery
    Edited by: user643323 on Sep 12, 2008 10:00 AM
    Edited by: user643323 on Sep 12, 2008 10:01 AM
    Edited by: user643323 on Sep 12, 2008 10:01 AM

  • Why Does Replication requires db restart to get transactions through

    I am having problems with the deferred tranasactions. There were about 44,000 in the queue before. The dbms job was broken so I ran it and it was able to push half the tranactions from the 44,000 through.
    However, only half. I am manually pushing the transactions through using OEM. But they do not seem to go through. Any ideas as to why they do not go through. Any alternatives to get all the deferred tranactions to being pushed?
    Oracle 9.2.0.1 on W2k Svr.
    The deferred tranaction queue had then incresed in size to 53,000 tranactions to be applied. I ran this query today, and get the following result.
    SQL> SELECT SID, r.JOB, LOG_USER, r.THIS_DATE, r.THIS_SEC
    2 FROM DBA_JOBS_RUNNING r, DBA_JOBS j
    3 WHERE r.JOB = j.JOB;
    SID JOB LOG_USER THIS_DATE THIS_SEC
    54 8 REPADMIN 15-OCT-06 17:24:52
    SQL>
    Any ideas as to what to do with this information. I ran the query several times within an hour, but the ame result...any sggestions as to how to apply all the tranactions in teh deferred tranaction queue sucessfully across?
    I executed the dbms jobs (which were broken) on all sites so that the DTQ empties. This was sucessfull on two of thethree master sites. However, on one of the master sites, it was only able to push half of the tranactions to one other site. This is what I am trying to resolve.
    I try to manually push these transactiosn form OEM, but they do not seem to go through. Is there a way I could find wher the errors lay? I have checked all the alert logs and the trace files but no major errors.
    W2K Ad Svr, Oracle 9i Release 2. and three Multimaster sites.
    I even ran the following script, it executes, but does not push it through.
    declare rc binary_integer; begin rc := sys.dbms_defer_sys.push(destination=>'DESTHOST.DOMAIN', stop_on_error=>FALSE, delay_seconds=>0, parallelism=>0); end;
    Once again...in our Oracle 9.2.0.1 multimaster replication environmment on Windows 2000 server system containing three master sites is giving strange errors.
    The transactions within defferred transaction queue at one of the sites are not being pushed at the other site. Last month, it was the other way around.
    In the trace files, we can see that there are TNS connect error to the other master sites. However as soon as we restart the particular server, the transactions are pushed through.
    This environment was working fine before and we were wondering as to what could be causing these errors all of a sudden.
    These are only the transactions from the Deferrerd Transaction Queue which are yet to be applied to the other site. The error queue is quite constant and we are not facing much problems there.
    In the trace files the errors are:
    ORA-12012: error on auto execute of job 78
    ORA-23324: error ORA-12535: TNS:operation timed out, while creating deferror entry at "globaldbname" with error -12535
    ORA-06512: at "SYS.DBMS_DEFER_SYS", line 1716
    ORA-06512: at "SYS.DBMS_DEFER_SYS", line 1804
    ORA-06512: at line 1
    *** 2006-11-07 22:05:42.000

    Did you fix your problem?
    If Yes please help me bescause I am in the same situation

Maybe you are looking for

  • Ipod Touch 4Gen not showing up in Computer in Windows 7

    Hi, I just reinstalled my Ipod Touch 4Gen and also have reinstalled Itunes on my Windows 7 computer. I had a problem having Itunes to show my Ipod Touch, so I contacted apple support and they have help me, but when I go to the Computer folder in Wind

  • Inbound IDOC:Not able to create OBJID while testing basic type HRMD_A07

    Hi Friends, I am trying to test creation of organization data (HRP1000) for inbound idoc via tcode WE19 using basic idoc type HRMD_A07.I am using inbound fm IDOC_INPUT_HRMD.After test data entry,The idoc status is showing as 53 but in the database ta

  • HP SPLIT 13 X 2 PC

    i bought it refurbished and through support found the secondary being the keyboard battery is bad. the keyboard is a sealed type and my question is can the factory replace the battery or will they just switch out and how will i know. im concerned tha

  • CS4 won't open

    I installed CS4 on my new Vista 64bit computer. I had it operating and now it will not open up in either 32 to 64 bit. Bridge will open up but CS4. Also it will not open up .cr2 files. It will open DNG's. Will I need to reinstall CS4? Any other cure?

  • Online vs in-store purchasing

    Me and my family are about to upgrade phones, I am looking at the KIN Twom while other family members are considering other phones. I saw that in some cases online purchases have an instate rather than mail-in rebate. Is this true of the KIN Twom? Sl