Answer Posted / anonimous coward
First, either as the streams user or sys make sure the date output will have precise hour information and the output can accomodate the result:
alter session set nls_date_format = 'DD-MON-YYYY HH24:MI:SS'
set serveroutput on size unlimited
Create the following procedure:
CREATE OR REPLACE PROCEDURE print_transaction(ltxnid IN VARCHAR2,msg_no in number) IS
i NUMBER;
txnid VARCHAR2(30);
source VARCHAR2(4000);
msgno NUMBER;
msgcnt NUMBER;
errno NUMBER;
errmsg VARCHAR2(4000);
lcr ANYDATA;
BEGIN
SELECT LOCAL_TRANSACTION_ID,
SOURCE_DATABASE,
MESSAGE_NUMBER,
MESSAGE_COUNT,
ERROR_NUMBER,
ERROR_MESSAGE
INTO txnid, source, msgno, msgcnt, errno, errmsg
FROM DBA_APPLY_ERROR
WHERE LOCAL_TRANSACTION_ID = ltxnid;
DBMS_OUTPUT.PUT_LINE('----- Local Transaction ID: ' || txnid);
DBMS_OUTPUT.PUT_LINE('----- Source Database: ' || source);
DBMS_OUTPUT.PUT_LINE('----Error in Message: '|| msgno);
DBMS_OUTPUT.PUT_LINE('----Error Number: '||errno);
DBMS_OUTPUT.PUT_LINE('----Message Text: '||errmsg);
FOR i IN msg_no..msg_no/*msgcnt*/ LOOP
DBMS_OUTPUT.PUT_LINE('--message: ' || i);
lcr := DBMS_APPLY_ADM.GET_ERROR_MESSAGE(i, txnid); -- gets the LCR
print_lcr(lcr);
END LOOP;
END print_transaction;
Execute the procedure:
execute print_transaction(local_transaction_id => '40.29.1234567', msg_no => 1000);
In the previous line one should obtain the 'local_transaction_id' and 'msg_no' by querrying the dba_apply_error view.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
if the lengths of two wires are same and the area of cross sections is 4:7 then what will be the ratio of current passing through these wires
ORA-26084: direct path context already finished
ORA-26027: unique index string.string partition string initially in unusable state
when i ran any workflow or session, getting below error: seesion task instance[s_xxx]: Execution terminated unexpecterdly
IMP-00063: Warning: Skipping table "string"."string" because object type "string"."string" cannot be created or has different identifier
When i am connect database through toad,one error occured. ORA-12514: TNS:listener does not currently know of service requested in connect descriptor. plz help me thanks advance.............
ORA-26095: unprocessed stream data exists
In my project I am using star schema and only diimension tables are loaded and not fact tables any one can help me why it is happening? Plase guide me.
ORA-26094: stream format error: input column overflow
ORA-07497: sdpri: cannot create trace file 'string'; errno = string.
IMP-00060: Warning: Skipping table "string"."string" because object type "string"."string" does not exist or has different identifier
ORA-26079: file "string" is not part of table string.string
ORA-16516: The current state is invalid for the attempted operation.
RMAN-05017: no copy of datafile number found to recover
[ERROR] [main 11:01:20] (JCLLoggerAdapter.java:error:454) Unsuccessful: alter table user.CEN_USER_MASTER add constraint FKF4EDEDC3D0BAAE75 foreign key (ROLE_ID) references user.CEN_ROLE_MASTER [ERROR] [main 11:01:20] (JCLLoggerAdapter.java:error:454) ORA-02275: such a referential constraint already exists in the table