Export: ORA-39097 39065-ORA ORA-01403

Hello gurus

I am getting error for export, below
nohup expdp system/password@BROOM SCHEMAS=CWA directory=DATAPUMP dumpfile=broom.dmp logfile =broom.log  &
Error
Export: Release 11.2.0.3.0 - Production on Fri Mar 1 11:40:04 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
;;;
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39097: Data Pump job encountered unexpected error 100
ORA-39065: unexpected master process exception in DISPATCH
ORA-01403: no data found
Version
11:46:49 : 01-MAR-13 @ SYS (TAMCW2) SQL>select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE    11.2.0.3.0      Production
TNS for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production

It was missing some DataPump metadata stored in the table for $ METANAMETRANS.
Throw the present, you should be good... It's some kind of bug...

@$ORACLE_HOME/rdbms/admin/catmet2.sql
@$ORACLE_HOME/rdbms/admin/utlrp.sql

Check the [453796.1 ID] Metalink note

Tags: Database

Similar Questions

  • ORA-01403: no error found

    Hi all

    When I execute my procedure I my get below error:

    ORA-01403: no data found

    100

    I had set out below in my procedure that returns no rows.

    IF (p_is_number = 1 AND p_tag_value < 0) THEN

    SELECT MTH_ENTITY IN V_ENTITY OF TAG_DESTINATION_MAP M WHERE TAG_CODE = p_tag_code;

    IF (V_ENTITY IS NOT NULL) THEN

    v_err_code: = v_err_code | "NGV";

    END IF;

    IF p_is_cumulative = 0 THEN

    p_is_valid_timestamp: = TRUE;

    END IF;

    end if;

    I want that if the condition above is not met (WHERE TAG_CODE = p_tag_code) then you have to v_err_code: = v_err_code | 'MMP '; and the code above should not mistake.

    Any suggestions on how this can be done?

    Thanks in advance.

    Hello

    Exception of writing as below...

    IF (p_is_number = 1 AND p_tag_value< 0)="">

    Start

    SELECT MTH_ENTITY IN V_ENTITY OF TAG_DESTINATION_MAP M WHERE TAG_CODE = p_tag_code;

    exception

    When no_data_found then

    v_err_code: = v_err_code | 'MMP ';

    end;

    IF (V_ENTITY IS NOT NULL) THEN

    v_err_code: = v_err_code | "NGV";

    END IF;

    IF p_is_cumulative = 0 THEN

    p_is_valid_timestamp: = TRUE;

    END IF;

    end if;

    Hope this will help you...

  • ADR 3.0 w / APEX 5.0 - ERR-7620 and ORA-01403

    ADR 3.0 w / APEX 5.0 - I have a new facility on 12 c and APEX and ADR full install without error but when you go to the url of the apex page destination to the /apex/ page and admin to/apex/apex_admin /, I meet ERR-7620 and ORA-01403. It's the same error, as shown in Re: ERR-7620 could determine no workspace for the application (4950), ORA-01403: no data found but I was not able to access the admin page to fix the problem. Any help would be appreciated.


    When I run ADR in autonomous on the application server, it starts without error in the command line, but then if I go to http:// < server url >: < port > /ADR /, I get the below error in the browser but no error message on the command line for ADR:

    Troubleshooting I tried but has not solved the error:

    • Installation against an another DB 11 g 2 and always errors

    • Use different URL paths: I tried different paths in the url which should also function as/ords/apex_admin, but I also received the same error. When I try /apex or/apex /, it redirects me to /ords.

    • Restart the listener DB and DB itself

    • Confirmed that all accounts have been unlocked and checked passwords

    Will,

    I am sure now that you did a runtime installation and not a full development.  You can convert this: http://docs.oracle.com/cd/E59726_01/install.50/e39144/listener.htm#HTMIG29186

    Joel

  • Why I'm not able to associate the user defined exception with ORA-01403 error code

    why I am not able to

    Associate a user defed exception with ORA-01403 error code?

    declare
     myException Exception;
     pragma exception_init(myException ,-1403);
    
     begin
     raise myException ;
    Exception
    when myException  then
     dbms_output.put_line('raised due to myException ');
     end;
    /
    

    exception of ABC;

    *

    ERROR on line 2:

    ORA-06550: line 2, column 4:

    PLS-00701: ORACLE error-1403 of PRAGMA EXCEPTION_INIT illegal number

    ORA-1403 is an outgoing BOF NO_DATA_FOUND exception. And we used to NO_DATA_FOUND in pragma exception_init + 100.

    Thus, instead of the you can used this different exception code which is not associated with any exception.

    For example:

    declare

    Exception myException;

    pragma exception_init (myException,-7856);

    Start

    raise myException;

    Exception

    When myException then

    dbms_output.put_line ('high due myException');

    end;

  • When I try to change the interactive report columns, then triggers the error: "unable to change column attributes. "ORA-01403: no data found. Pls tell me why?

    When I try to change the interactive report columns, then triggers the error: "unable to change column attributes. "ORA-01403: no data found. Pls tell me why?

    You use listener EA3 ADR?

  • Ampersand and Forward slash in a name causes ORA-01403: no error found

    We have a few customers with an '&' or a ' / ' in the name of their company.  When I try to access these accounts, I get an ORA-01403: no found error. The information is to be caught in a table in an interactive report.  The column header, it is striking is the name of the account with a view type as the display in text form ("based" LOV, escape special characters).  Is there a way to escape these special characters and then short them?

    Thank you

    Sara

    To use only whole numbers in url parameter passing, is certainly a solid approach. In older versions of the apex, there was a way to escape to some settings by adding of slashes or backslashes. Something like this if I remember correctly: / #P2_ITEM # /. In more recent versions that he had to do this seems over.

    Also don't forget that you can access any element of the apex of any page. For example, you can set the clients name on page 2 in point P2_CUSTNAME. Access P2_CUSTNAME from page 3. A little better in terms of code Modularization, would be to use a part of the application for it instead. As: A_CURRENT_CUSTOMER. Fill it on page 2, reuse the name of page 3.

  • You are not allowed to open the form ORA-01403: no data found

    Hello

    I created a new forms of Oracle 10 g. It compiles successfully, but when it is open, it gives an error message: you are not allowed to open the form ORA-01403: no data found.

    I am already connected to the database. Please can someone help what is the reason of this problem, and no matter what possible resolution?

    Looks like you have some kind of security is enabled.  However, because you do not share details about your environment or what you're doing here is not that we can do is guess.

    • Exactly what version of forms do you use?
    • Exactly which version of the database that you are using?
    • You use something like Oracle E-Business (e.g. template.fmb)?
    • You created the form with Oracle Designer?
    • If you create a simple form using only the layout assistants and the DataBlock compared to schema Oracle demo (SCOTT), this form run?

    No additional details describing what you do or have done could be useful.

  • Procedure failed with ORA-01403, associated with immediate execution, captured

    This procedure compiles without error. Its purpose is to copy the sequence of one schema to another object. After it failed with ORA-01403, I added exception code of capture (see the comments in the code).

    A few notes:

    1. I started the proceedings with exec copy_sequence ('ADDRESS_SEQ', 'SST', 'TEST1');

    2. the first sql string is built correctly since I can see in the console output:

    Select last_number in the all_sequences where sequence_owner = upper('TSS') and upper('ADDRESS_SEQ') = sequence_name

    I can run this SQL command, and returns a real value;

    Here is the procedure

    SET SERVEROUTPUT ON;

    create or replace procedure copy_sequence (seq VARCHAR2, prod_schema VARCHAR2, VARCHAR2 test_schema)

    as

    Val number (21);

    s_sql varchar2 (200);

    Start

    s_sql: = ' select last_number in the all_sequences where sequence_owner = upper('''|| prod_schema ||'') ') and sequence_name = upper('''||) Seq | " ')';

    -immediate' select last_number in the Vale of all_sequences where sequence_owner = upper('''|| prod_schema ||'') ') and sequence_name = upper('''||) Seq | " ')';

    Dbms_output.put_line ('sql 1 ' | s_sql);

    execute immediate s_sql in val;  ---!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! The code does not work here!

    Dbms_output.put_line ('val' |) Val);

    s_sql: = 'delete the sequence'. test_schema |'. ' || FF.;

    Dbms_output.put_line ('sql 2 ' | s_sql);

    -execution immediate s_sql;

    s_sql: = 'create the sequence'. test_schema |'. ' || Seq |' minvalue maxvalue 1 999999999999999999999 begin by ' | Val | 'increment of 1';

    Dbms_output.put_line ('sql 3 ' | s_sql);

    -execution immediate s_sql;

    -Add the following after procedure thown ORA-01403: no data found

    exception when TOO_MANY_ROWS then DBMS_OUTPUT.put_line ('TOO_MANY_ROWS error');

    When NO_DATA_FOUND then DBMS_OUTPUT.put_line ('error NO_DATA_FOUND');

    While some other then raise_application_error (-20011, "Unknown Exception in this procedure");

    end;

    /

    Hoek wrote:

    The user (no SYSTEM, SYS, and SYSTEM are special, you should not use them unless you have TO) execution of the procedure must have the necessary privileges granted directly, bypassing a role...

    ??? There is nothing special about SYS or SYSTEM in what concerns them stored procedures. SYS by default is granted directly SELECT ANY SEQUENCE, so it does not work for the owner of MS by SYS. SYSTEM is therefore not:

    Scott@pdborcl12 > create sequence s;

    Order of creation.

    Scott@pdborcl12 > create or replace
    2 procedure system.p1
    3 is
    number of v_last_value 4;
    5. start
    6. Select last_number
    7 in v_last_value
    8 of all_sequences
    9 where sequence_owner = 'SCOTT '.
    10 and s = sequence_name ';
    11 end;
    12.

    Created procedure.

    Scott@pdborcl12 > system.p1 exec.
    BEGIN system.p1; END;

    *
    ERROR on line 1:
    ORA-01403: no data found
    ORA-06512: at "SYSTEM. "P1", line 5
    ORA-06512: at line 1

    Scott@pdborcl12 > grant select on s to the system;

    Grant succeeded.

    Scott@pdborcl12 > system.p1 exec.

    PL/SQL procedure successfully completed.

    Scott@pdborcl12 >

    SY.

  • ORA-01403 while using SELECT INTO

    OK I have a strange problem. In my area of PL/SQL, I ran this code and it works fine.

    declare

    Val number (21);

    s_sql varchar2 (200);

    Start

    Select last_number in the Vale of all_sequences where sequence_owner = upper('TSS') and sequence_name = upper('ADDRESS_SEQ');

    Dbms_output.put_line ('val' |) Val);

    s_sql: = ' remove the TEST1 sequence. ADDRESS_SEQ';

    Dbms_output.put_line ('sql 2 ' | s_sql);

    s_sql: = ' create sequence TEST1. ADDRESS_SEQ minvalue maxvalue 1 999999999999999999999 begin by ' | Val | 'increment of 1';

    Dbms_output.put_line ('sql 3 ' | s_sql);

    end;

    However, when I write this procedure (which compiles fine BTW) I exception

    SET SERVEROUTPUT ON;

    create or replace procedure copy_sequence

    as

    Val number (21);

    s_sql varchar2 (200);

    Start

    Select last_number in the Vale of all_sequences where sequence_owner = upper('TSS') and sequence_name = upper('ADDRESS_SEQ');

    Dbms_output.put_line ('val' |) Val);

    s_sql: = ' remove the TEST1 sequence. ADDRESS_SEQ';

    Dbms_output.put_line ('sql 2 ' | s_sql);

    s_sql: = ' create sequence TEST1. ADDRESS_SEQ minvalue maxvalue 1 999999999999999999999 begin by ' | Val | 'increment of 1';

    Dbms_output.put_line ('sql 3 ' | s_sql);

    end;

    /

    exec copy_sequence();

    COPY_SEQUENCE compiled PROCEDURE

    Error from the 168 in the command line:

    exec copy_sequence()

    Error report:

    ORA-01403: no data found

    ORA-06512: at "SYSTEM. COPY_SEQUENCE', line 6

    ORA-06512: at line 1

    01403 00000 - "no data found".

    * Cause:

    * Action:

    That I captured:

    SET SERVEROUTPUT ON;

    create or replace procedure copy_sequence

    as

    Val number (21);

    s_sql varchar2 (200);

    Start

    Select last_number in the Vale of all_sequences where sequence_owner = upper('TSS') and sequence_name = upper('ADDRESS_SEQ');

    Dbms_output.put_line ('val' |) Val);

    s_sql: = ' remove the TEST1 sequence. ADDRESS_SEQ';

    Dbms_output.put_line ('sql 2 ' | s_sql);

    s_sql: = ' create sequence TEST1. ADDRESS_SEQ minvalue maxvalue 1 999999999999999999999 begin by ' | Val | 'increment of 1';

    Dbms_output.put_line ('sql 3 ' | s_sql);

    exception when TOO_MANY_ROWS then DBMS_OUTPUT.put_line ('too many authors in this State');

    When NO_DATA_FOUND then DBMS_OUTPUT.put_line ('NO_DATA_FOUND');

    While other then raise_application_error ("-20011," unknown Exception ");

    end;

    /

    exec copy_sequence();

    COPY_SEQUENCE compiled PROCEDURE

    anonymous block filled

    NO_DATA_FOUND

    No idea what is the problem?

    OK, here's the answer

    Procedure failed with ORA-01403, associated with immediate execution, captured

    It was related to the privileges given to the owner of the procedure. I gave then SELECT sequence and it worked

  • DAC 11.1.1.6.4 fails with the error cannot get columns: ORA-01403: no data found

    Hello

    We strive to run a full charge in DAC, but it is a failure.

    The S_ASSET table is empty and therefore, we get the error

    Could not get column: ORA-01403: no data found

    We were not facing this error in DAC 10 g but after upgrade to DCA 11 g, this task has no place if the array is empty. How remove this restriction and DAC will work perfectly even if the tables are empty to full charge?

    CAD DETAILS

    Console Administration Oracle BI DW

    CAD build a 11.1.1.6.4.20121119.2022 Build date: November 19, 2012

    Management Console to install, configure, and administer the Warehouse Analytics of Oracle Business

    Schema version - 47, Index version - 36, repository version - 6, data version Seed - 16

    INFORMATICA - VERSION9.0.1 HF2


    Here's the log of IMG_BUILD - S_ASSET when this task was running in DAC 10 g. The task facing any problem when S_ASSET table was empty.

    [code]

    2013-12-23 15:34:29.644 CHANGE CAPTURE: IMG_BUILD - internal S_ASSET began.

    the number of days of prunes: 4

    After change data capture: 2013-12-19 12:23:19.332 in full Mode.

    2013-12-23 15:34:29.69 - execution:

    TRUNCATE TABLE S_ETL_I_IMG_6

    2013-12-23 15:34:29.89 - executed successfully.

    2013-12-23 15:34:29.9 - execution:

    TRUNCATE TABLE S_ETL_R_IMG_6

    2013-12-23 15:34:30.145 - executed successfully.

    2013-12-23 15:34:30.16 - execution:

    TRUNCATE TABLE S_ETL_D_IMG_6

    2013-12-23 15:34:30.198 - executed successfully.

    2013-12-23 15:34:30.236 - execution:

    INSERT / * + APPEND * / INTO S_ETL_R_IMG_6

    (ROW_ID, MODIFICATION_NUM, LAST_UPD)

    SELECT

    ROW_ID

    MODIFICATION_NUM

    LAST_UPD

    Of

    S_ASSET

    WHERE

    LAST_UPD > TO_DATE ('2013-12-19 12:23:19 ',' ' YYYY-MM-DD HH24:MI:SS)

    2013-12-23 15:34:30.968 - executed successfully.

    2013 12-23 15:34:30.989 - execution of deleting duplicates rowid.

    2013-12-23 15:34:31.01 - successfully deleting duplicates rowid.

    2013-12-23 15:34:31.27 - execution:

    DROP VIEW V_ASSET

    2013-12-23 15:34:31.566 - executed successfully.

    2013-12-23 15:34:31.569 - execution:

    CREATE VIEW V_ASSET AS

    SELECT

    *

    Of

    S_ASSET

    2013-12-23 15:34:31.743 - executed successfully.

    2013-12-23 15:34:31.78 - execution:

    SELECT COUNT (*) IN S_ASSET

    The County is: 0

    Executed successfully: CHANGE CAPTURE: IMG_BUILD - internal S_ASSET

    (Number of attempts: 1).

    Executed orders:

    IMG_BUILD - internal

    2013-12-23 15:34:31.851 CHANGE CAPTURE: IMG_BUILD - internal S_ASSET has finished running with the completed state.

    The same task, IMG_BUILD - S_ASSET fails when it is running in DAC 11 g, because the table is empty. Here is the log for the failure of the task to 11g.

    [code]

    2013-12-27 21:21:47.497 acquisition of resources

    2013-12-27 21:22:20.33 acquired resources

    2013-12-27 21:22:20.787 CHANGE CAPTURE: IMG_BUILD - internal S_ASSET began.

    the number of days of plum: 5760

    After change data capture: 2013-12-23 21:19:19.233 in full Mode.

    21:22:21.211 2013-12-27 - execution:

    TRUNCATE TABLE S_ETL_I_IMG_6

    2013-12-27 21:22:22.384 - executed successfully.

    21:22:22.389 2013-12-27 - execution:

    TRUNCATE TABLE S_ETL_R_IMG_6

    2013-12-27 21:22:22.532 - executed successfully.

    21:22:22.534 2013-12-27 - execution:

    TRUNCATE TABLE S_ETL_D_IMG_6

    2013-12-27 21:22:22.546 - executed successfully.

    21:22:22.55 2013-12-27 - execution:

    INSERT / * + APPEND * / INTO S_ETL_R_IMG_6

    (ROW_ID, MODIFICATION_NUM, LAST_UPD)

    SELECT

    ROW_ID

    MODIFICATION_NUM

    LAST_UPD

    Of

    S_ASSET

    WHERE

    LAST_UPD > TO_DATE ('2013-12-23 21:19:19 ',' ' YYYY-MM-DD HH24:MI:SS)

    2013-12-27 21:22:22.614 - executed successfully.

    2013 12-27 21:22:22.616 - execution of deleting duplicates rowid.

    2013-12-27 21:22:24.72 - successfully deleting duplicates rowid.

    Could not get column: ORA-01403: no data found

    FAULT INFO: Error executing: CHANGE CAPTURE: IMG_BUILD - internal S_ASSET

    MESSAGE: com. Siebel.Analytics.etl.Execution.exceptions.ChangeCaptureTaskFailedException: Change Capture failed.

    EXCEPTION CLASS: java.lang.RuntimeException

    com.siebel.analytics.etl.etltask.GenericTaskImpl.doExecuteWithRetries(GenericTaskImpl.java:536)

    com.siebel.analytics.etl.etltask.GenericTaskImpl.execute(GenericTaskImpl.java:372)

    com.siebel.analytics.etl.etltask.GenericTaskImpl.execute(GenericTaskImpl.java:253)

    com.siebel.analytics.etl.etltask.GenericTaskImpl.run(GenericTaskImpl.java:655)

    com.siebel.analytics.etl.taskmanager.XCallable.call(XCallable.java:63)

    java.util.concurrent.FutureTask$ Sync.innerRun (FutureTask.java:303)

    java.util.concurrent.FutureTask.run(FutureTask.java:138)

    java.util.concurrent.Executors$ RunnableAdapter.call (Executors.java:441)

    java.util.concurrent.FutureTask$ Sync.innerRun (FutureTask.java:303)

    java.util.concurrent.FutureTask.run(FutureTask.java:138)

    java.util.concurrent.ThreadPoolExecutor$ Worker.runTask (ThreadPoolExecutor.java:886)

    java.util.concurrent.ThreadPoolExecutor$ Worker.run (ThreadPoolExecutor.java:908)

    java.lang.Thread.run(Thread.java:619)

    : CAUSE:

    MESSAGE: change Capture failed.

    EXCEPTION CLASS: com.siebel.analytics.etl.execution.exceptions.ChangeCaptureTaskFailedException

    com.siebel.analytics.etl.etltask.ChangeCaptureTask.executeChangeCapture(ChangeCaptureTask.java:93)

    com.siebel.analytics.etl.etltask.ChangeCaptureTask.doExecute(ChangeCaptureTask.java:46)

    com.siebel.analytics.etl.etltask.GenericTaskImpl.doExecuteWithRetries(GenericTaskImpl.java:477)

    com.siebel.analytics.etl.etltask.GenericTaskImpl.execute(GenericTaskImpl.java:372)

    com.siebel.analytics.etl.etltask.GenericTaskImpl.execute(GenericTaskImpl.java:253)

    com.siebel.analytics.etl.etltask.GenericTaskImpl.run(GenericTaskImpl.java:655)

    com.siebel.analytics.etl.taskmanager.XCallable.call(XCallable.java:63)

    java.util.concurrent.FutureTask$ Sync.innerRun (FutureTask.java:303)

    java.util.concurrent.FutureTask.run(FutureTask.java:138)

    java.util.concurrent.Executors$ RunnableAdapter.call (Executors.java:441)

    java.util.concurrent.FutureTask$ Sync.innerRun (FutureTask.java:303)

    java.util.concurrent.FutureTask.run(FutureTask.java:138)

    java.util.concurrent.ThreadPoolExecutor$ Worker.runTask (ThreadPoolExecutor.java:886)

    java.util.concurrent.ThreadPoolExecutor$ Worker.run (ThreadPoolExecutor.java:908)

    java.lang.Thread.run(Thread.java:619)

    (Number of attempts: 1).

    IMG_BUILD - internal

    2013-12-27 21:22:31.526 CHANGE CAPTURE: IMG_BUILD - internal S_ASSET has finished running with the Failed state.

    [[code


    The CREATE VIEW privilege was missing from the CAD database user, therefore, was not to create the step. I have granted CREATE VIEW and all is well.

  • OCI error ORA-01403: no data found in oracle goldengate replication after tts instaniation

    I recently migrated our central system of tg (11.1.0.7) solaris from Sun to linux (11.2.0.3) environment using goldengate (tablespace transportable method used for instantiation).

    Initial replication has worked with HANDLECOLLISIONS and after I took over LAG, I took off Handlecollisions and noticed updated report discarded with OIC error ORA-01403: no data available in two repetitions.


    I followed all the steps in the migration tts steps provided by oracle best practices.


    Can anyone provide any clue how to fix this?


    Thank you in advance.

    For that error, the common problem is missing data, GoldenGate cannot find it because there is no key (search KEYCOLS in the installation guide), or a null is present (trying to update a record and a constraint is not null).

  • Technical information (only visible to developers) ORA-01403:

    My Apex was working fine, but now when I create any application and try to change any folder that I am facing following error...?

    http://192.9.21.232:8080/i/htmldb/builder/rollup_minus_dgray.gifTechnical information (only visible to developers)
    • is_internal_error: false
    • ora_sqlcode: 100
    • ora_sqlerrm: ORA-01403: no data found
    • Component.type: APEX_APPLICATION_PAGE_PROCESS
    • Component.ID: 3049630242871846
    • Component.Name: SL_AUTONUMBER line
    • error_backtrace:ORA - 06512: at line 1 ORA-06512: at "SYS." DBMS_SYS_SQL", line 1815 ORA-06512: at"SYS." WWV_DBMS_SQL', line 1064 ORA-06512: at "SYS." WWV_DBMS_SQL', line 1090 ORA-06512: at the "APEX_040200.WWV_FLOW_DYNAMIC_EXEC", line 832 ORA-06512: at "APEX_040200.WWV_FLOW_DML", line 551 ORA-06512: at the "APEX_040200.WWV_FLOW_PROCESS", line 333

    Check that the "before header" process "Line of SL_AUTONUMBER" on the page in your application also interrogate this table SL_AUTONUMBER to check whether or not data exist in this table. For simple verification, you can give the State as 'Never' for this process and run the page.

    Thank you

    Lacombe

  • ORA-01403: no data found

    Hello

    The following procedure works fine when the select statement returns a line.
    However, it creates "ORA-01403: no data found" error when no data is returned for select.

    When I put the following exception after select it, It doest go inside the if block. (It stops after selection). Do not know why.
    exception
    when NO_DATA_FOUND then null;
    How can I set an exception for this?
    CREATE OR REPLACE PROCEDURE kill_blocking
    IS
    l_sid number(10); 
    l_serial number(10);
    l_wait number(10);
    l_username varchar2(20);
    sqlStmt VARCHAR2(1000);
    BEGIN
    
    SELECT s1.sid,s1.serial#,s2.seconds_in_wait,s2.username
    into l_sid,l_serial,l_wait,l_username
    FROM v$lock l1, v$session s1, v$lock l2,v$session s2,v$sql sqlt1, v$sql sqlt2
    WHERE s1.sid =l1.sid
    AND s2.sid =l2.sid AND sqlt1.sql_id= s2.sql_id AND sqlt2.sql_id= s1.prev_sql_id AND l1.BLOCK =1
    AND l2.request > 0 AND l1.id1 = l2.id1 AND l2.id2 = l2.id2;
    
    if l_username='APP' and l_wait > 100
    then 
    sqlStmt := 'ALTER SYSTEM KILL SESSION ''' || TO_CHAR(l_sid) ||',' || TO_CHAR(l_serial) ||'''' ;
    dbms_output.put_line( sqlStmt );
    
    EXECUTE IMMEDIATE sqlStmt;
    
    
    END IF;
    END;
    / 

    Check this box

    SQL> CREATE OR REPLACE PROCEDURE kill_blocking IS
      2     l_sid        NUMBER (10);
      3     l_serial     NUMBER (10);
      4     l_wait       NUMBER (10);
      5     l_username   VARCHAR2 (20);
      6     sqlstmt      VARCHAR2 (1000);
      7  BEGIN
      8     SELECT s1.SID, s1.serial#, s2.seconds_in_wait, s2.username
      9       INTO l_sid, l_serial, l_wait, l_username
     10       FROM v$lock l1,
     11            v$session s1,
     12            v$lock l2,
     13            v$session s2,
     14            v$sql sqlt1,
     15            v$sql sqlt2
     16      WHERE s1.SID = l1.SID
     17        AND s2.SID = l2.SID
     18        AND sqlt1.sql_id = s2.sql_id
     19        AND sqlt2.sql_id = s1.prev_sql_id
     20        AND l1.BLOCK = 1
     21        AND l2.request > 0
     22        AND l1.id1 = l2.id1
     23        AND l2.id2 = l2.id2;
     24
     25     IF l_username = 'APP' AND l_wait > 100
     26     THEN
     27        sqlstmt :=
     28              'ALTER SYSTEM KILL SESSION '''
     29           || TO_CHAR (l_sid)
     30           || ','
     31           || TO_CHAR (l_serial)
     32           || '''';
     33        DBMS_OUTPUT.put_line (sqlstmt);
     34
     35        EXECUTE IMMEDIATE sqlstmt;
     36     END IF;
     37  EXCEPTION
     38     WHEN NO_DATA_FOUND
     39     THEN
     40
     41        DBMS_OUTPUT.put_line ('No Data Found');
     42  END;
     43  /
    No Data Found
    
    PL/SQL procedure successfully completed.
    
  • get ORA-01403: when it should not

    Hello, I apologize in advance for my spelling, name (takes 6 hours to change) and the headaches you migth get, however,.
    I bring you the following code and test results:
    -----------------------------------------------------------
    -The procedure that throws the error.
    -----------------------------------------------------------
    create or replace
    procedure P_COLEGAS(x in number) as
    ctipo varchar2(20);
    asd varchar2(20);
    
    cursor curnombre is
    select nombre from unidad,elemento where (elemento.id_elem=unidad.id_elem and unidad.tipo=ctipo and elemento.ciudad=asd);
    
    begin
    select unidad.tipo, elemento.ciudad into ctipo,asd from unidad,elemento where unidad.id_elem=x and elemento.id_elem=x;
    for blah in curnombre loop
    DBMS_OUTPUT.PUT_LINE('nombre unidad: '||blah.nombre||' ');
    end loop;
    end;
    -what i get when executing the procedure-
    Error que empieza en la línea 1 del comando:
    exec p_colegas(19)
    Informe de error:
    ORA-01403: no data found
    ORA-06512: at "BD00.P_COLEGAS", line 9
    ORA-06512: at line 1
    01403. 00000 - "no data found"
    *Cause:
    *Action:
    -----------------------------------------------------------
    -the real problem-
    -----------------------------------------------------------
    in the case of this procedure I had to write
    (1)
    select unidad.tipo into ctipo from unidad where unidad.id_elem=x;
    (2)
    select elemento.ciudad into asd from elemento where elemento.id_elem=x;
    Instead the single query I wrote, we get the following:
    (1) wonderful works, gets only error when there is no match for x.
    (2) throws the error that I was before.

    However when I do the following query in the spreadsheet and run it:
    (3)
    select elemento.ciudad from elemento where elemento.id_elem=x;
    I get what I expect to get 1 row 1 column. (Yes it has data)
    Note: (3) the only difference is that I remove the clause, and x is the same number that I used when I run the procedure.

    -----------------------------------------------------------
    --------------------the question------------------------
    -----------------------------------------------------------
    Why in the procedure, the failure of the (2) query to retrieve the data, the same which data the query (3) doesn't fail to pick up?
    I get ORA-01403, when I shouldn't?
    is there a work around for this problem?

    -----------------------------------------------------------
    --------------------what i try------------------------------
    -----------------------------------------------------------
    Nestled the request with its own handle exception error, get the same results, a few screenshots of the error with a different treatment.

    used tool: sql developer

    ----------
    -Example of data-
    ----------
    tested the procedure with the following sample data in a new workspace, make the same mistake.
    --------------------------------------------------------
    --  DDL for Table ELEMENTO
    --------------------------------------------------------
    
      CREATE TABLE "ELEMENTO" 
       (     "ID_ELEM" NUMBER, 
         "CIUDAD" VARCHAR2(20), 
         "TIPO" CHAR(1), 
         "X" NUMBER, 
         "Y" NUMBER, 
         "FECHAHORA_CREACION" TIMESTAMP (6)
       ) ;
    /
    --------------------------------------------------------
    --  DDL for Table UNIDAD
    --------------------------------------------------------
    
      CREATE TABLE "UNIDAD" 
       (     "ID_ELEM" NUMBER, 
         "PORCENTAJE_SALUD" NUMBER, 
         "NOMBRE" VARCHAR2(20), 
         "TIPO" VARCHAR2(20)
       ) ;
    /
    REM INSERTING into ELEMENTO
    SET DEFINE OFF;
    Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (12,'Infernalia','U',10,10,to_timestamp('12-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
    Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (15,'Infernalia','U',10,7,to_timestamp('12-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
    Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (19,'Infernalia','U',15,9,to_timestamp('12-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
    Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (23,'Infernalia','U',16,8,to_timestamp('12-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
    Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (27,'Infernalia','C',15,10,to_timestamp('12-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
    Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (52,'Humania','U',26,10,to_timestamp('22-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
    Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (58,'Humania','U',24,9,to_timestamp('22-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
    Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (62,'Humania','U',27,11,to_timestamp('22-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
    Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (64,'Humania','C',25,8,to_timestamp('22-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
    Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (78,'GruntVille','U',47,32,to_timestamp('29-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
    Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (84,'GruntVille','U',42,28,to_timestamp('29-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
    Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (89,'GruntVille','U',43,29,to_timestamp('29-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
    Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (91,'GruntVille','C',44,37,to_timestamp('29-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
    Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (29,'Infernalia','C',16,7,to_timestamp('12-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
    Insert into ELEMENTO (ID_ELEM,CIUDAD,TIPO,X,Y,FECHAHORA_CREACION) values (90,'GruntVille','U',49,36,to_timestamp('29-NOV-20 12.00.00.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
    REM INSERTING into UNIDAD
    SET DEFINE OFF;
    Insert into UNIDAD (ID_ELEM,PORCENTAJE_SALUD,NOMBRE,TIPO) values (12,100,'Grang','Soldado');
    Insert into UNIDAD (ID_ELEM,PORCENTAJE_SALUD,NOMBRE,TIPO) values (15,100,'Krout','Médico');
    Insert into UNIDAD (ID_ELEM,PORCENTAJE_SALUD,NOMBRE,TIPO) values (19,100,'Warf','Obrero');
    Insert into UNIDAD (ID_ELEM,PORCENTAJE_SALUD,NOMBRE,TIPO) values (23,100,'Puaj','Obrero');
    Insert into UNIDAD (ID_ELEM,PORCENTAJE_SALUD,NOMBRE,TIPO) values (52,100,'Marcelus','Soldado');
    Insert into UNIDAD (ID_ELEM,PORCENTAJE_SALUD,NOMBRE,TIPO) values (58,100,'Claudius','Soldado');
    Insert into UNIDAD (ID_ELEM,PORCENTAJE_SALUD,NOMBRE,TIPO) values (62,100,'Arturius','Obrero');
    Insert into UNIDAD (ID_ELEM,PORCENTAJE_SALUD,NOMBRE,TIPO) values (78,100,'Klaknot','Médico');
    Insert into UNIDAD (ID_ELEM,PORCENTAJE_SALUD,NOMBRE,TIPO) values (84,100,'Staisht','Médico');
    Insert into UNIDAD (ID_ELEM,PORCENTAJE_SALUD,NOMBRE,TIPO) values (89,100,'Bjorkson','Soldado');
    Insert into UNIDAD (ID_ELEM,PORCENTAJE_SALUD,NOMBRE,TIPO) values (90,100,'Sknot','Médico');
    --------------------------------------------------------
    --  Constraints for Table ELEMENTO
    --------------------------------------------------------
    
      ALTER TABLE "ELEMENTO" ADD CONSTRAINT "ELEMENTO_CHK1_TIPO" CHECK (TIPO IN ('U', 'C')) ENABLE;
     
      ALTER TABLE "ELEMENTO" ADD CONSTRAINT "ELEMENTO_PK" PRIMARY KEY ("ID_ELEM") ENABLE;
     
      ALTER TABLE "ELEMENTO" MODIFY ("ID_ELEM" NOT NULL ENABLE);
     
      ALTER TABLE "ELEMENTO" MODIFY ("CIUDAD" NOT NULL ENABLE);
     
      ALTER TABLE "ELEMENTO" MODIFY ("TIPO" NOT NULL ENABLE);
     
      ALTER TABLE "ELEMENTO" MODIFY ("X" NOT NULL ENABLE);
     
      ALTER TABLE "ELEMENTO" MODIFY ("Y" NOT NULL ENABLE);
     
      ALTER TABLE "ELEMENTO" MODIFY ("FECHAHORA_CREACION" NOT NULL ENABLE);
    /
    --------------------------------------------------------
    --  Constraints for Table UNIDAD
    --------------------------------------------------------
    
      ALTER TABLE "UNIDAD" MODIFY ("ID_ELEM" NOT NULL ENABLE);
     
      ALTER TABLE "UNIDAD" MODIFY ("PORCENTAJE_SALUD" NOT NULL ENABLE);
     
      ALTER TABLE "UNIDAD" MODIFY ("NOMBRE" NOT NULL ENABLE);
     
      ALTER TABLE "UNIDAD" MODIFY ("TIPO" NOT NULL ENABLE);
     
      ALTER TABLE "UNIDAD" ADD CONSTRAINT "UNIDAD_PK" PRIMARY KEY ("ID_ELEM") ENABLE;
    /
    --------------------------------------------------------
    --  Ref Constraints for Table ELEMENTO
    --------------------------------------------------------
    
    --------------------------------------------------------
    --  Ref Constraints for Table UNIDAD
    --------------------------------------------------------
    
      ALTER TABLE "UNIDAD" ADD CONSTRAINT "UNIDAD_ELEMENTO_FK1" FOREIGN KEY ("ID_ELEM")
           REFERENCES "ELEMENTO" ("ID_ELEM") ENABLE;
     
    /
    Edited by: 975362 04:47 12/06/2012

    Published by: BluShadow on December 6, 2012 12:51
    addition of {noformat}
    {noformat} tags for readability of code/data.  Please read {message:id=9360002} and learn to do this yourself in future.
    
    Edited by: 975362 on 06-12-2012 05:44 AM
    added example data.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    This is because you use X as the parameter to the procedure, and X is a column in the table :)

    So use a table alias in the query or use another name for the parameter.

    Published by: ascheffer on December 6, 2012 15:04

  • Replicate source fails with ORA-01403

    Hello

    I've set up a two-way replication between two bases of Oracle 11 g R2 (WIN11SRC and WIN11TRG). Initially, the data was consistent between the two databases.

    Now, when I update a record in the source, I find that it has replicated successfully in the target.
    But when I update a record in the target, it is not getting through to the source. It fails in the source and rejected by his reply. The discard file displays the following error when I tried to update the Department_Name column:
    OCI Error ORA-01403: no data found, SQL 
    <UPDATE "HR"."DEPARTMENTS" SET "DEPARTMENT_NAME" = :a1,"DML_TIMESTAMP" = :a2 
    WHERE "DEPARTMENT_ID" = :b0 AND "DEPARTMENT_NAME" = :b1 AND "DML_TIMESTAMP" = :b2>
    Operation failed at seqno 3 rba 1740
    Discarding record on action DISCARD on error 1403
    Problem replicating HR.DEPARTMENTS to HR.DEPARTMENTS
    Record not found
    Mapping problem with compressed update record (target format)...
    *
    DEPARTMENT_ID = 
    DEPARTMENT_NAME = Administration7
    DML_TIMESTAMP = 2012-08-16 09:30:04.068000000
    *
    In the source, I have the following files to pararmeter set up:
    Extract LHRDEV1
    DISCARDFILE discard.dsc, PURGE, MEGABYTES 200
    DiscardRollover at 02:00 ON SUNDAY
    TRANLOGOPTIONS EXCLUDEUSER ggs_owner COMPLETEARCHIVEDLOGTIMEOUT 600
    USERID GGS_OWNER@ORA11SRC, PASSWORD g
    ExtTrail dirdat/L1
    TABLE HR.DEPARTMENTS, GETBEFORECOLS (ON UPDATE KEYINCLUDING (DML_TIMESTAMP), ON DELETE KEYINCLUDING (DML_TIMESTAMP));
    
    
    Replicat RHRDEV1
    DISCARDFILE ./dirrpt/rhrdev1_discards.dsc, APPEND, MEGABYTES 100
    DISCARDROLLOVER at 02:00 ON SUNDAY
    USERID GGS_OWNER@ORA11SRC, PASSWORD g
    ASSUMETARGETDEFS
    REPERROR (DEFAULT, DISCARD)
    MAP HR.DEPARTMENTS, Target HR.DEPARTMENTS, COMPARECOLS (ON UPDATE KEYINCLUDING (DML_TIMESTAMP), ON DELETE KEYINCLUDING (DML_TIMESTAMP)), &
    RESOLVECONFLICT (UPDATEROWEXISTS, (DEFAULT, USEMAX (DML_TIMESTAMP))), &
    RESOLVECONFLICT (INSERTROWEXISTS, (DEFAULT, USEMAX (DML_TIMESTAMP))), &
    RESOLVECONFLICT (DELETEROWEXISTS, (DEFAULT, OVERWRITE)), &
    RESOLVECONFLICT (UPDATEROWMISSING, (DEFAULT, OVERWRITE)), &
    RESOLVECONFLICT (DELETEROWMISSING, (DEFAULT, DISCARD));
    In the target, I have the following files to pararmeter set up:
    Note: Exactly like the Source except the DB in USERID connection
    Extract LHRDEV1
    DISCARDFILE discard.dsc, PURGE, MEGABYTES 200
    DiscardRollover at 02:00 ON SUNDAY
    TRANLOGOPTIONS EXCLUDEUSER ggs_owner COMPLETEARCHIVEDLOGTIMEOUT 600
    USERID GGS_OWNER@ORA11TRG, PASSWORD g
    ExtTrail dirdat/L1
    TABLE HR.DEPARTMENTS, GETBEFORECOLS (ON UPDATE KEYINCLUDING (DML_TIMESTAMP), ON DELETE KEYINCLUDING (DML_TIMESTAMP));
    
    
    Replicat RHRDEV1
    DISCARDFILE ./dirrpt/rhrdev1_discards.dsc, APPEND, MEGABYTES 100
    DISCARDROLLOVER at 02:00 ON SUNDAY
    USERID GGS_OWNER@ORA11TRG, PASSWORD g
    ASSUMETARGETDEFS
    REPERROR (DEFAULT, DISCARD)
    MAP HR.DEPARTMENTS, Target HR.DEPARTMENTS, COMPARECOLS (ON UPDATE KEYINCLUDING (DML_TIMESTAMP), ON DELETE KEYINCLUDING (DML_TIMESTAMP)), &
    RESOLVECONFLICT (UPDATEROWEXISTS, (DEFAULT, USEMAX (DML_TIMESTAMP))), &
    RESOLVECONFLICT (INSERTROWEXISTS, (DEFAULT, USEMAX (DML_TIMESTAMP))), &
    RESOLVECONFLICT (DELETEROWEXISTS, (DEFAULT, OVERWRITE)), &
    RESOLVECONFLICT (UPDATEROWMISSING, (DEFAULT, OVERWRITE)), &
    RESOLVECONFLICT (DELETEROWMISSING, (DEFAULT, DISCARD));
    There's a trigger activated on the table on the two dbs as follows:
    CREATE OR REPLACE TRIGGER HR.set_DEPART_dmltstmp
    BEFORE UPDATE
    ON HR.DEPARTMENTS 
    REFERENCING NEW AS New OLD AS Old
    FOR EACH ROW
    BEGIN
     IF SYS_CONTEXT ('USERENV', 'SESSION_USER') != 'GGS_OWNER' THEN
       :NEW.DML_TIMESTAMP := SYSTIMESTAMP;
     END IF;
    END;
    /
    I'm working on version 11g R2 of GG.

    Thanks in advance.

    You forgot to "TRANDATA ADD" logging PK on the target. You did on the source but just forgot to do it on the target. Here's how I know:

    1 it s 1403 - no data found. Usually a question of extra newspaper.
    2. rejects the shows:
    DEPARTMENT_ID =

    I guess it would be all or part of a PK. No additional data not connecting...

    Good luck
    -joe

Maybe you are looking for