ORA-06512: at the 'MDSYS. SDO_IDX.

Hi all

When our GIS developer try to add a feature of geo in a table called 'region' using geomedia battery 5.2 it gets following error:

Could not insert a record into the database
ORA-00604: an error has occurred at the SQL level 1 recursive
ORA-00604: an error has occurred at the SQL level 1 recursive
ORA-13236: internal error in the treatment of the R-tree: [read the node (mdrbin_mem_ins_rt)]
ORA-29400: data cartridge error
ORA-00942: table or view does not exist
ORA-06512: at the 'MDSYS. SDO_IDX", line 184
ORA-06512: at line 1

I'm stuck and I'm not an expert on the geo databases, please help me to get rid of here. I use Oracle 10 g version 10.1.0.20


Thanks in advance

Baldwin

Edited by: qurbi October 4, 2010 12:56 AM

Hello

I think you hit bug 3997272, "ORA-13236, ORA-942, inserting data in the spatial table [ID 3997272.8]. However, there is no patch for 10.1.0.2. There is a patch for 10.1.0.3 and above. So the advice would be to upgrade the Oracle database, or do a SR with Oracle how to solve the problem.

Herald tiomela
http://htendam.WordPress.com

Tags: Database

Similar Questions

  • ORA-06502: PL/SQL: digital or value error ORA-06512: at the 'APPS '. WF_NOTIFICATION', line 5754 ORA-06512: at line 5

    Hello

    I have a l_body variable in my pl/sql code with varchar2 (32767).

    It displays maximum 44 lines, more than 44 lines he gives buffer size error.

    If I use the clob data type then it gives value or digital erro on 44 lines.

    code is below

    concerning

    l_clob CLOB.

    l_body varchar2 (32767);

    BEGIN
    Dbms_lob. CreateTemporary (l_clob,TRUE);

    l_body: = null;

    l_body: =
    "< Html >";

    l_body: = l_body |
    "< Body >" ;

    -l_body: = l_body | "< do Face ="Verdana, Arial, Helvetica"Color ="#000000"> ';

    -l_body: = l_body | "< BR > < BR > < BR > ' | l_str | "< Br >".

    l_body: = l_body |
    "< BR >" || "Please note that receipt number < B > ' " || Trans_Id | ' with amount: ' | Trim (to_char (total_amount,'999G999G999G999D99')): ' < /B > has been sent for approval. Detail is given below:' | ' < Br BR > > < ' ;

    --------------------------


    l_body: = l_body |
    ' < / table > < Br > < Br > ' ;

    l_body: = l_body |
    '< table Border = 1 ">' ;

    -l_body: = l_body | "< Tr Bgcolor = rgb (0,154,61) > ';

    l_body: = l_body |
    "< Tr Bgcolor = rgb (162,202,230) >" ;

    l_body: = l_body |
    '< e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > Date' ;

    l_body: = l_body |
    ' < e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > name of the seller ' ;

    l_body: = l_body | '< e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > number of PO' ;

    l_body: = l_body |
    ' < e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > number ' ;

    l_body: = l_body | '< e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > line' ;

    l_body: = l_body |
    '< e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > Description of the object' ;

    l_body: = l_body |
    ' < e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > quantity ' ;

    l_body: = l_body |
    ' < e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > unit ' ;

    l_body: = l_body |
    ' < e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > unit price PO' ;

    l_body: = l_body |
    ' < e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > currency " " ;

    l_body: = l_body |
    ' < e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > amount ' ;

    l_body: = l_body |
    '< e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > Code combination' ;

    l_body: = l_body |
    "< /Tr >" ;

    FOR x in C LOOP

    l_body: = l_body | "< Tr >" ;

    l_body: = l_body |
    '< td > < P > < Font Size = 2 > < div align = left >' | x.transaction_date | "< Table >" ;

    l_body: = l_body |
    '< td > < P > < Font Size = 2 > < div align = left >' | x.VENDOR_NAME | "< Table >" ;

    l_body: = l_body |
    '< td > < P > < Font Size = 2 > < div align = left >' | x.po_number | "< Table >" ;

    l_body: = l_body |
    '< td > < P > < Font Size = 2 > < div align = left >' | x.release_num | "< Table >" ;

    l_body: = l_body | '< td > < P > < Font Size = 2 > < div align = left >' | x.line_num | "< Table >" ;

    l_body: = l_body |
    '< td > < P > < Font Size = 2 > < div align = left >' | x.item_description | "< Table >" ;

    l_body: = l_body |
    '< td > < P > < Font Size = 2 > < div align = right >' | x.Quantity | "< Table >" ;

    l_body: = l_body | '< td > < P > < Font Size = 2 > < div align = left >' | x.unit_of_measure | "< Table >" ;

    l_body: = l_body |
    '< td > < P > < Font Size = 2 > < div align = right >' | x.po_unit_price | "< Table >" ;

    l_body: = l_body |
    '< td > < P > < Font Size = 2 > < div align = left >' | x.currency_code | "< Table >" ;

    l_body: = l_body |
    '< td > < P > < Font Size = 2 > < div align = right >' | x.amount | "< Table >" ;

    l_body: = l_body |
    '< td > < P > < Font Size = 2 > < div align = left >' || x.cc|| "< Table >" ;

    l_body: = l_body |
    "< /Tr >" ;

    END LOOP;

    l_body: = l_body |
    ' < / table > < Br > < Br > ' ;

    l_body: = l_body |
    "< / body >" || CHR(10);

    l_body: = l_body |
    ' < / html > ' || CHR(10);

    DBMS_LOB. WriteAppend (l_clob, length (l_body), l_body);

    RETURN L_Clob;

    END Format_Notification_Msg;

    The maximum size allowed for l_body is 32767 who as varchar2 (32767)

    Even if the CLOB has no size limit, you store the actual data in "l_body", it throws the error when the "l_body" increases of 32,767 characters.

    Call the dbms_lob.writeappend () API in the for loop and cancel l_body after the API call, so that the 'l_body' will not go beyond the specified limit.

  • Index space problem ORA-29902 ORA-13200 ORA-13220 ORA-06512

    I have problems by running the following query. If I change the values of the SDO_ORDINATE_ARRAY, some of the values of work, some values are not. Here is an example of when it fails. I managed queries using SDO_NN, if something needs work...

    How can I get for appearing on this (very new to space) question? Work on operating system Windows 7 Prof

    Select p.building_polygon
    spat.building p, spat.firebuilding f
    where p.building_name = f.building_on_fire and
    SDO_RELATE (p.building_polygon,
    SDO_GEOMETRY (2003, NULL, NULL, SDO_ELEM_INFO_ARRAY (1,1003,1))
    SDO_ORDINATE_ARRAY (768,278,477,504,155,115)), 'mask = ANYINTERACT') = 'TRUE '.
    *
    Error on line 0
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-13200: internal error [WINDOW_OBJECT] in spatial indexing.
    ORA-13220: failed to compare the tile with the geometry
    ORA-06512: at the 'MDSYS. SDO_INDEX_METHOD_10I', line 333

    The script that is used to create objects:
    create user spat identified by spat;
    grant all privileges to spit;

    Conn spat/spat;
    ALTER session set current_schema = seed;
    TOGETHER TO DEFINE

    CREATE TABLE spit. BUILDING
    (
    BUILDING_ID VARCHAR2 (3),
    BUILDING_NAME VARCHAR2 (50).
    VERTICES_COUNT INT,
    MDSYS BUILDING_POLYGON. SDO_GEOMETRY,
    CONSTRAINT BUILDING_PK PRIMARY KEY (BUILDING_ID)
    );

    CREATE TABLE spit. FIREHYDRANT
    (
    FIREHYDRANT_ID VARCHAR2 (3),
    MDSYS HYDRANT_POINT. SDO_GEOMETRY,
    CONSTRAINT FIREHYDRANT_PK PRIMARY KEY (FIREHYDRANT_ID)
    );

    CREATE TABLE spit. FIREBUILDING
    (
    BUILDING_ON_FIRE VARCHAR (50),
    CONSTRAINT FIREBUILDING_PK PRIMARY KEY (BUILDING_ON_FIRE)
    );

    INSERT IN USER_SDO_GEOM_METADATA
    VALUES ('CONSTRUCTION', 'BUILDING_POLYGON',
    SDO_DIM_ARRAY (SDO_DIM_ELEMENT ('X', 0, 820, 0.005),
    SDO_DIM_ELEMENT ('Y', 0, 580, 0.005)), NULL);

    INSERT IN USER_SDO_GEOM_METADATA
    VALUES ('FIREHYDRANT', 'HYDRANT_POINT',
    SDO_DIM_ARRAY (SDO_DIM_ELEMENT ('X', 0, 820, 0.005),
    SDO_DIM_ELEMENT ('Y', 0, 580, 0.005)), NULL);

    COMMIT;

    CREATE classic INDEX. BUILDING_SPATIAL_IDX
    THE spat. BUILDING (BUILDING_POLYGON)
    INDEXTYPE IS MDSYS. SPATIAL_INDEX;

    CREATE classic INDEX. FIREHYDRANT_SPATIAL_IDX
    THE spat. FIREHYDRANT (HYDRANT_POINT)
    INDEXTYPE IS MDSYS. SPATIAL_INDEX;

    COMMIT;

    ==================UPDATE==========================
    OK, I noticed something interesting. If I have 3 points in my table ordered, errors are thrown. If I have more than 3 points in my table ordered, it works. Could someone explain why this is and if there is a way around it?

    Select p.building_polygon
    spat.building p, elkordy.firebuilding f
    where p.building_name = f.building_on_fire
    and SDO_ANYINTERACT (p.building_polygon
    , SDO_GEOMETRY (2003, NULL, NULL, SDO_ELEM_INFO_ARRAY (1,1003,1))
    ((, - SDO_ORDINATE_ARRAY (232,91,149,226,277,198))) = "TRUE"; -USE ONLY ONE
    ((, - SDO_ORDINATE_ARRAY (165,84,168,484,769,534,743,108))) = "TRUE"; -USE ONLY ONE

    Published by: AmeerE on March 17, 2013 12:19 AM

    Ameer,

    You say that you are new to the space.

    The issue that you are facing is that the 3 vertices are not enough for a polygon. For Oracle Spatial, an outside edge of the polygon (1003) must have 4 peaks with the first being the last.

    So:

    select sdo_geom.validate_geometry(SDO_GEOMETRY(2003,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,1003,1),SDO_ORDINATE_ARRAY(232,91,149,226,277,198)),0.05) as  from dual;
    VGEOM
    -----
    13343
    

    The Oracle error documentation;

    ORA-13343: less than four coordinates polygon geometry
    Cause: Specified geometry as a polygon, less than four coordinates in its definition.
    Action: A polygon must have at least four distinct coordinates. Correct the geometric definition or set the appropriate for this geometry SDO_GTYPE or SDO_ETYPE attribute.

    So, the solution is to repeat the first vertex:

    select sdo_geom.validate_geometry(SDO_GEOMETRY(2003,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,1003,1),SDO_ORDINATE_ARRAY(232,91,149,226,277,198,232,91)),0.05) as geom from dual;
    VGEOM
    -----
    13367
    

    13357 is another error...

    ORA-13367: misdirection of the rings interiors/exteriors
    Cause: In an Oracle Spatial geometry, the outer and/or inner rings are not geared properly.
    Action: Make sure that the outer rings are oriented to the left and the inner rings are oriented in a clockwise direction.

    Note that Action tells you exactly the right command for the rings.

    This has been solved by reversing the coordinates as follows:

    select sdo_geom.validate_geometry(SDO_GEOMETRY(2003,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,1003,1),SDO_ORDINATE_ARRAY(232,91,277,198,149,226,232,91)),0.05) as vgeom from dual;
    VGEOM
    -----
    TRUE
    

    It is now a geometry valid and will work in your sdo_anyinteract etc requests.

    Always make sure that your geometries times stored in the column of a table and provided to a request otherwise, are VALID.

    If this answers your query, please grant me the points that you think I deserve.

    concerning
    SImon

  • ORA-13033 ORA-06512 at 11.1.0.7

    I have a single shape that seems to cause of ORA-13033 11.1.0.7 but not 11.1.0.6. Wondering if I am missing something stupid, or if someone else has experienced this problem. I did a quick search of positions, but found nothing. It could also be that space has a problem on the 11.1.0.7 server...

    Thank you

    -on 11.1.0.7

    SQL > drop index foo_spatial_index;

    The index is deleted.

    SQL > drop table foo;

    Deleted table.

    SQL > delete from user_sdo_geom_metadata where table_name = 'FOO ';

    1 line removal.

    SQL >
    SQL > create table foo (shape sdo_geometry);

    Table created.

    SQL > insert into foo values (SDO_GEOMETRY (3002, NULL, NULL, SDO_ELEM_INFO_ARRAY (1, 4, 1, 1, 2, 2), SDO_ORDINATE_ARRAY (484893.192, 1845442.68))
    0, 484881.786, 1845444.7,.5, 484871.639, 1845450.28, 1)));

    1 line of creation.

    SQL > insert into user_sdo_geom_metadata values ("FOO", "SHAPE", SDO_DIM_ARRAY (SDO_DIM_ELEMENT(, 484719.102, 484904.266,.0000005), SDO_DI
    (M_ELEMENT(null, 1845366.11, 1845513.86,.0000005), SDO_DIM_ELEMENT (NULL, 0, 5368.70912,.0000005)), null);

    1 line of creation.

    SQL > create index foo_spatial_index on foo (shape) indextype is mdsys.spatial_index;
    create index foo_spatial_index on foo (shape) indextype is mdsys.spatial_index
    *
    ERROR on line 1:
    ORA-29855: an error has occurred in the execution of routine ODCIINDEXCREATE
    ORA-13249: internal error in the Spatial index: [mdidxrbd]
    ORA-13249: error in the Spatial index: index build failed
    ORA-13249: error in the spatial index: [mdrcrtxfergm]
    ORA-13249: error in the spatial index: [mdpridxtxfergm]
    ORA-13200: internal error [ROWID:AAFV8VAAHAAAGUtAAA] in spatial indexing.
    ORA-13206: [] internal error creating the spatial index
    ORA-13033: invalid data in the SDO_ELEM_INFO_ARRAY in the SDO_GEOMETRY object
    ORA-06512: at the 'MDSYS. SDO_INDEX_METHOD_10I', line 10

    -on a different 11.1.0.6

    SQL > drop index foo_spatial_index;
    Drop index foo_spatial_index
    *
    ERROR on line 1:
    ORA-01418: specified index does not exist


    SQL > drop table foo;
    drop table foo
    *
    ERROR on line 1:
    ORA-00942: table or view does not exist


    SQL > delete from user_sdo_geom_metadata where table_name = 'FOO ';

    0 rows deleted.

    SQL >
    SQL > create table foo (shape sdo_geometry);

    Table created.

    SQL > insert into foo values (SDO_GEOMETRY (3002, NULL, NULL, SDO_ELEM_INFO_ARRAY (1, 4, 1, 1, 2, 2), SDO_ORDINATE_ARRAY (484893.192, 1845442.68))
    0, 484881.786, 1845444.7,.5, 484871.639, 1845450.28, 1)));

    1 line of creation.

    SQL > insert into user_sdo_geom_metadata values ("FOO", "SHAPE", SDO_DIM_ARRAY (SDO_DIM_ELEMENT(, 484719.102, 484904.266,.0000005), SDO_DI
    (M_ELEMENT(null, 1845366.11, 1845513.86,.0000005), SDO_DIM_ELEMENT (NULL, 0, 5368.70912,.0000005)), null);

    1 line of creation.

    SQL > create index foo_spatial_index on foo (shape) indextype is mdsys.spatial_index;

    The index is created.

    There are a number of things wrong with your geometry.

    The record says that for compound geometries (sdo_etype = 4) SDO_INTERPRETATION (in this case with sdo_etype = 4) gives the number of subitems. This should be more then 1 large:

    http://download.Oracle.com/docs/CD/B28359_01/AppDev.111/b28400/sdo_objrelschema.htm#BGHDGCCE

    4

    n > 1

    Compound line string with some vertices connected by straight segments and some by circular arcs. The value n in the interpretation column specifies the number of contiguous subelements that make up the line string.

    The triplets following n in the Ansdo_elem_info table describe each of these sub-elements. Subitems cannot SDO_ETYPE 2. The last point of a subelement is the first point of the next subelement, and should not be repeated.

    In your case, you will either need a string of single line that makes the first triplet even unnecessary or incorrect in the Ansdo_elem_info, or you are missing a third triplet in the Ansdo_elem_info.

    You should always validate your geometry first, if you do this also on your 11.1.0.6 version you will get:

    SDO_GEOM. VALIDATE_GEOMETRY_WITH_CONTEXT

    ---------------------------------------

    54506 point: 0, Edge: 2,.

    ORA-54506: compound curve not supported for 3D geometries
    Cause: The 3D geometry contained one or more compound curves, which are not
    support for 3D geometries.
    Action: Remove all the curves of geometry.

    As you can see also compound curveare not supported in 3D geometries.

    IF it is not a compound (with SDO_ELEM_INFO_ARRAY = (1,2,2), you will see that this geometry will validate.

    Looks like the validation could be integrated now in creating indexes in 11.1.0.7.

    Published by: lucvanlinden on March 20, 2009 09:07

  • Exclude the ORA-06512 error message

    Hi all
    Lets have a simple example:

    declare
    EXP_FRZN_VER EXCEPTION;

    Start

    If (1 = 1) then
    raise EXP_FRZN_VER;
    end if;

    exception
    When EXP_FRZN_VER then
    raise_application_error (-20303, 'Frozen version is not modifiable!');
    While OTHERS then
    dbms_output.put_line ('TEST');
    end;

    I want to send the error message to my web application through raise_application_error.

    Error message looks like:
    Error report:
    ORA-20303: frozen Version is not editable.
    ORA-06512: at the level of line 12

    Question: Is it possible to exclude the string "ORA-06512: line 12" of this message? I need to deal with the side DB...

    Thank you
    Finec

    Your calling code should not get this line as you have not retransmitted it the error of the battery in your raise_application_error...

    for example

    SQL> ed
    Wrote file afiedt.buf
    
      1  declare
      2    EXP_FRZN_VER EXCEPTION;
      3    v_err varchar2(200);
      4    procedure x is
      5    begin
      6      if (1=1) then
      7        raise EXP_FRZN_VER;
      8      end if;
      9    exception
     10      when EXP_FRZN_VER then
     11        raise_application_error (-20303, 'Frozen version cannot be modified!');
     12    end;
     13  begin
     14    x;
     15  exception
     16    when others then
     17      v_err := SQLERRM;
     18      dbms_output.put_line('Error Message received is actually: '||v_err);
     19* end;
    SQL> /
    Error Message received is actually: ORA-20303: Frozen version cannot be modified!
    
    PL/SQL procedure successfully completed.
    

    If you return the entire stack, then you will get all this...

    SQL> ed
    Wrote file afiedt.buf
    
      1  declare
      2    EXP_FRZN_VER EXCEPTION;
      3    v_err varchar2(200);
      4    procedure x is
      5    begin
      6      if (1=1) then
      7        raise EXP_FRZN_VER;
      8      end if;
      9    exception
     10      when EXP_FRZN_VER then
     11        raise_application_error (-20303, 'Frozen version cannot be modified!', true); -- pass back whole error stack
     12    end;
     13  begin
     14    x;
     15  exception
     16    when others then
     17      v_err := SQLERRM;
     18      dbms_output.put_line('Error Message received is actually: '||v_err);
     19* end;
    SQL> /
    Error Message received is actually: ORA-20303: Frozen version cannot be modified!
    ORA-06512: at line 11
    ORA-06510: PL/SQL: unhandled user-defined exception
    
    PL/SQL procedure successfully completed.
    
  • ORA-12012: error on auto work 754461 ORA-29279: SMTP permanent error: ORA-29279: SMTP permanent error: 501 Syntax error, command parameters "RCPT TO:" ORA-06512 unrecognized or missing: at "SYS." UTL_SMTP", line 20 ORA-06512: at"SYS." UTL_SMTP.

    Hello


    I get below error frequently in the log database alerts.


    ORA-12012: error on auto work 754461

    ORA-29279: SMTP permanent error: ORA-29279: SMTP permanent error: 501 Syntax error, command parameters ' RCPT TO: ' unrecognized or missing

    ORA-06512: at "SYS." UTL_SMTP", line 20

    ORA-06512: at "SYS." UTL_SMTP", line 98

    ORA-06512: at "SYS." UTL_SMTP", line 240

    ORA-06512: at the 'APPS '. EIS_UTIL_PKG', line 94

    ORA-06512: at the 'APPS '. HKD_PO_ADDON_PKG', line 110

    ORA-06512: at line 1

    The syntax error comes from the SMTP server, not to the job itself, so I disagree with your solution.

  • ORA-06503: PL/SQL: function returned no value ORA-06512:

    Hi all

    SQL > set serveroutput on

    SQL > CREATE OR replace FUNCTION qty_value (p_item_id number)

    2 RETURN NUMBER

    3 EAST

    4 v_qty_arrival NUMBER;

    5 BEGIN

    6. SELECT THE CASE SENSITIVE OPTION

    7. WHAT (SUM (b.quantity) - SUM (b.quantity_received)) < = 0 THEN 0

    8 ELSE (SUM (b.quantity) - SUM (b.quantity_received))

    9 END Qty_Arrival

    10 INTO v_qty_arrival

    Po_lines_all 11 a,

    po_line_locations_all 12 b

    13 WHERE a.po_line_id = b.po_line_id

    14 AND a.item_id = p_item_id;

    15 EXCEPTION

    16 THEN THAN OTHERS THEN

    17 v_qty_arrival: = NULL;

    18 RETURN v_qty_arrival;

    19 END qty_value;

    20.

    The function is created.

    SQL >

    SQL > select xxc_qty_arrivale (214960) double

    2.

    Select xxc_qty_arrivale (214960) double

    *

    ERROR on line 1:

    ORA-06503: PL/SQL: function returned no value

    ORA-06512: at the 'APPS '. XXC_QTY_ARRIVALE', line 19

    Back AFTER using the exception block is fine as long as your code actually REACHED the exception block.

    When there are no errors, then your code will not enter the exception block, but you still NEED to return a value, since it is what functions a function wants to return a value, that's what the functions are made for.

    Spot the differences between the following 3 functions. Understand how they work.

    The first function has only a return in the exception block but runs correctly. Result: error, because the back is missing in the code block.

    The second function has a return in the exception block and one in the block of code and runs correctly. Result: no error, because the return is not missing in the code block.

    The third function has a return in the exception block and one in the block of code and is forced into an error. Result: no error, because the return of the exception handler is used (instead of retriggering of the error, which you would normally do).

    SQL > create or replace function myfunc

    2 return number

    3 as

    4 start

    5 dbms_output.put_line ('in the section of code');

    6 null;

    7 exception

    8 then than others

    9. can

    10 dbms_output.put_line (' in the exception handler ' |) SQLERRM);

    11      --

    12 return 0;

    13      --

    14 end;

    15.

    The function is created.

    SQL > select double myfunc;

    Select double myfunc

    *

    ERROR on line 1:

    ORA-06503: PL/SQL: function returned no value

    ORA-06512: at "GHPLUS. MYFUNC", line 14

    In the section of code

    SQL > create or replace function myfunc

    2 return number

    3 as

    4 start

    5 dbms_output.put_line ('in the section of code');

    6 null;

    7    --

    8 return 1;

    9    --

    10 exceptional

    11 so that others

    12. can

    13 dbms_output.put_line (' in the exception handler ' |) SQLERRM);

    14      --

    15 return 0;

    16      --

    end 17;

    18.

    The function is created.

    SQL > select double myfunc;

    MYFUNC

    ----------

    1

    1 selected line.

    In the section of code

    SQL > create or replace function myfunc

    2 return number

    3 as

    n number 4;

    5. start

    6 dbms_output.put_line ('in the section of code');

    7 n: = 1/0; -force an error (zero divisor) to join the exception handler

    8    --

    9 return 1;

    10-

    exception 11

    12 so that others

    13. can

    14 dbms_output.put_line (' in the exception handler ' |) SQLERRM);

    15      --

    16 return 0;

    17      --

    18 end;

    19.

    The function is created.

    SQL > select double myfunc;

    MYFUNC

    ----------

    0

    1 selected line.

    In the section of code

    In the handler for exception ORA-01476: divisor is equal to zero

    SQL >

  • Workspace Manager 11 GR 2: ORA-20145: "Under TENSION" workspace cannot be deleted ORA-06512

    Hi all

    I considered the possibility of use of the Workspace Manager on Oracle 11g 11.2.0.4 (Oracle Linux OS) as a way to allow developers to experiment in our Dev of the databases (s) on the changing data in application dev (for most code tables) schema support app. I used preview Workspace Manager Enterprise Manager 12 c against one of our Dev database after (briefly) examining the 2009 Oracle Database 11g and the more formal Workspace Manager Guide the developer 11g Release 2 (11.2).

    My initial work did not provide the correct results (do not ask for help on that), so I want to start by removing all child workspaces and workspace 'On-line'. However, when I try to use EM12C to remove the LIVE (which was created under SYS) workspace I get "ORA-20145: 'LIVE' workspace cannot be deleted ORA-06512: at the"WMSYS.LT", line 4994 ORA-06512: at line 2".»

    Before posting, I googled first, then questioned this forum and even the 'full search' option but have not found any other mention to this.

    Can someone help guide me to a fix? It's development, it is important for me as a DBA because it will help you avoid to create and maintain multiple copies of our data and application for each developer schemas.

    Thank you

    Ted

    I could have sworn that I replied to this a few hours ago.  Maybe the Web gremlins ate the post, maybe they will regurgitate a few hours (so apologies if it appears a second time).

    You can not remove the DIRECT workspace.  The DIRECT workspace still exists.  This is the workspace that you are in when you log in.  If you have a table without version 10 lines and activate the version, it will have 10 rows in the DIRECT workspace.  You can create children other areas of work where the table can have 9 lines or 11 and those that can be deleted, but can not be the DIRECT workspace.

    You can disable versioning on each of your tables (dbms_wm.disableVersioning) If you want to return to the State they were before that you have turned on versioning in the first place.

    Justin

  • raise errors ora-01426 truncating the table

    Hello

    We have a process that runs in the following process for some tabls game
    1 disable constraints
    2. the truncating tables
    3. activation of the constraints

    but after treatment for 5 tables, truncating up error

    BEGIN < process name >; END;



    *

    ERROR on line 1:

    ORA-01426: digital overflow

    ORA-06512: at the "< procedurename >", line 33

    ORA-06512: at line 1


    This line 33 point to run immeidate ' truncate table < table name >

    Can I know what is the reason for throwing "digital overflow" error truncating the table...

    Thanks in advance

    user9080289 wrote:
    Thank you.

    Is my verision of oracle 11g

    Then, you could have the described bug. Follow the instructions how to bypass (flush with low-value stats monitoring) or apply the #8226471 patch.

    Nicolas.

  • I get the error message like "error - ORA-29273 report: failure of the HTTP ORA-06512: at"SYS. " UTL_HTTP", line 1130 ORA-12535: TNS:operation expired ORA-06512: 37 29273 line. 00000 - "HTTP request failed" * Cause: package UTL_HTTP The Impossible to run

    I have tried the code

    DECLARE

    lv_url VARCHAR2 (1000): = ' http://shenzhoufellowship.org/main2/files/old/SpecialTopics/TheLoveDare.pdf';

    lc_return BLOB;

    lhttp_url httpuritype.

    Varriables - declared to have written the LOB to pdf file-

    l_file UTL_FILE. TYPE_DE_FICHIER;

    l_buffer RAW (32767).

    l_amount directory: = 32767;

    l_pos INTEGER: = 1;

    l_blob BLOB;

    l_blob_len INTEGER.

    BEGIN

    -create URIs

    lhttp_url: = httpuritype.createuri (lv_url);

    -get the PDF document

    lc_return: = lhttp_url.getblob ();

    -Open the destination file.

    l_file: = UTL_FILE. FOPEN ('MBO_INPUT_DIR', 'MBD.zip', 'wb');

    -Get the total length of the BLOB

    l_blob_len: = DBMS_LOB.getlength (lc_return);

    -Pieces of the BLOB to read and write to the file

    -full up.

    While l_pos < l_blob_len LOOP

    DBMS_LOB. READ (lc_return, l_amount, l_pos, l_buffer);

    UTL_FILE.put_raw (l_file, l_buffer, FALSE);

    l_pos: = l_pos + l_amount;

    END LOOP;

    -Closes the file.

    UTL_FILE. FCLOSE (l_file);

    EXCEPTION

    WHILE OTHERS THEN

    -Close the file if something goes wrong.

    IF UTL_FILE.IS_OPEN (l_file) THEN

    UTL_FILE. FCLOSE (l_file);

    END IF;

    LIFT;

    END;

    But make a mistake like:

    Error report-

    ORA-29273: HTTP request failed

    ORA-06512: at "SYS." UTL_HTTP", line 1130

    ORA-12535: TNS:operation expired

    ORA-06512: at line 37 level

    29273 00000 - "the HTTP request failed.

    * Cause: The UTL_HTTP package cannot run the HTTP request.

    * Action: Use get_detailed_sqlerrm to check the detailed error message.

    Correct the error and restart the HTTP request.

    Please suggest a solution. Is it possible to download a zip file with the same code?

    [oracle@localhost ~]$ sqlplus scott/tiger
    
    SQL*Plus: Release 11.2.0.1.0 Production on Mon Apr 6 13:59:09 2015
    
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> --My Database version
    SQL> ----------------------
    SQL> SELECT * FROM v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  DECLARE
      2        lv_url    VARCHAR2(500) := 'http://shenzhoufellowship.org/main2/files/old/SpecialTopics/TheLoveDare.pdf';
      3        lc_return BLOB;
      4        lhttp_url httpuritype;
      5        ---Varriables declared for writing the LOB to pdf file --
      6        l_file     UTL_FILE.FILE_TYPE;
      7        l_buffer   RAW(32767);
      8        l_amount   BINARY_INTEGER := 32767;
      9        l_pos      INTEGER := 1;
    10       l_blob     BLOB;
    11       l_blob_len INTEGER;
    12     BEGIN
    13       --create uri
    14       lhttp_url := httpuritype.createuri(lv_url);
    15       --get the PDF document
    16       lc_return := lhttp_url.getblob();
    17       -- Open the destination file.
    18       l_file := UTL_FILE.FOPEN('SAUBHIK', 'TheLoveDare.pdf', 'wb');
    19       --Get the total length of the BLOB
    20       l_blob_len := DBMS_LOB.getlength(lc_return);
    21       -- Read chunks of the BLOB and write them to the file
    22       -- until complete.
    23       WHILE l_pos < l_blob_len LOOP
    24         DBMS_LOB.READ(lc_return, l_amount, l_pos, l_buffer);
    25         UTL_FILE.put_raw(l_file, l_buffer, FALSE);
    26         l_pos := l_pos + l_amount;
    27       END LOOP;
    28       -- Close the file.
    29       UTL_FILE.FCLOSE(l_file);
    30     EXCEPTION
    31       WHEN OTHERS THEN
    32         -- Close the file if something goes wrong.
    33         IF UTL_FILE.IS_OPEN(l_file) THEN
    34           UTL_FILE.FCLOSE(l_file);
    35         END IF;
    36         RAISE;
    37*    END;
    38  /
    DECLARE
    *
    ERROR at line 1:
    ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1130
    ORA-24247: network access denied by access control list (ACL)
    ORA-06512: at line 36
    
    SQL> conn sys as sysdba
    Enter password:
    Connected.
    SQL> ed
    Wrote file afiedt.buf
    
      1  BEGIN
      2    DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(acl         => 'love.xml',
      3                                      description => 'Love ACL',
      4                                      principal   => 'SCOTT',
      5                                      is_grant    => true,
      6                                      privilege   => 'connect');
      7    DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(acl       => 'love.xml',
      8                                         principal => 'SCOTT',
      9                                         is_grant  => true,
    10                                         privilege => 'resolve');
    11    DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(acl  => 'love.xml',
    12                                      host => 'shenzhoufellowship.org');
    13  commit;
    14* END;
    15  /
    
    PL/SQL procedure successfully completed.
    
    SQL> conn scott/tiger
    Connected.
    SQL> ed
    Wrote file afiedt.buf
    
      1  DECLARE
      2        lv_url    VARCHAR2(500) := 'http://shenzhoufellowship.org/main2/files/old/SpecialTopics/TheLoveDare.pdf';
      3        lc_return BLOB;
      4        lhttp_url httpuritype;
      5        ---Varriables declared for writing the LOB to pdf file --
      6        l_file     UTL_FILE.FILE_TYPE;
      7        l_buffer   RAW(32767);
      8        l_amount   BINARY_INTEGER := 32767;
      9        l_pos      INTEGER := 1;
    10       l_blob     BLOB;
    11       l_blob_len INTEGER;
    12     BEGIN
    13       --create uri
    14       lhttp_url := httpuritype.createuri(lv_url);
    15       --get the PDF document
    16       lc_return := lhttp_url.getblob();
    17       -- Open the destination file.
    18       l_file := UTL_FILE.FOPEN('SAUBHIK', 'TheLoveDare.pdf', 'wb');
    19       --Get the total length of the BLOB
    20       l_blob_len := DBMS_LOB.getlength(lc_return);
    21       -- Read chunks of the BLOB and write them to the file
    22       -- until complete.
    23       WHILE l_pos < l_blob_len LOOP
    24         DBMS_LOB.READ(lc_return, l_amount, l_pos, l_buffer);
    25         UTL_FILE.put_raw(l_file, l_buffer, FALSE);
    26         l_pos := l_pos + l_amount;
    27       END LOOP;
    28       -- Close the file.
    29       UTL_FILE.FCLOSE(l_file);
    30     EXCEPTION
    31       WHEN OTHERS THEN
    32         -- Close the file if something goes wrong.
    33         IF UTL_FILE.IS_OPEN(l_file) THEN
    34           UTL_FILE.FCLOSE(l_file);
    35         END IF;
    36         RAISE;
    37*    END;
    38  /
    
    PL/SQL procedure successfully completed.
    
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [oracle@localhost ~]$ cd saubhik/
    [oracle@localhost saubhik]$ pwd
    /home/oracle/saubhik
    [oracle@localhost saubhik]$ ls -l *.pdf
    -rw-r--r-- 1 oracle oinstall 60055 Apr  6 14:03 TheLoveDare.pdf
    [oracle@localhost saubhik]$
    

    I love this pdf file. I would like to read this and mean while if you get an error then please post in its entirety and also think that it is an Oracle error or network.

  • ERROR / T_ITEMS in the TABLE is changing, function of triggering/can not see ORA-06512... ?

    Hi all

    I CREATED THE TRIGGER TO CHECK NOM_ELEMENT BEFORE UPDATE ON THE T_ITEMS TABLE IF AN ANOTHER NOM_ELEMENT LIKE NOM_ELEMENT CURRENT OR NOT, IF AS AN ANOTHER NOM_ELEMENT DON'T SAVE UPDATED CURRENT NOM_ELEMENT.

    MY NO IS:

    1 - I CREATED the FUNCTION CALL CH_UNIQUE_ITEM_NAME

    CREATE OR REPLACE FUNCTION CH_UNIQUE_ITEM_NAME
    (NUMBER OF P_ID, P_ITEM_NAME IN VARCHAR2)
    RETURN NUMBER
    AS
    NUMBER OF X_COUNT;
    -FUNCTION "CH_UNIQUE_ITEM_NAME" TO CHECK NOM_ELEMENT LIKE OTHER NOM_ELEMENT OR NOT.
    BEGIN
    SELECT COUNT (ITEM_NAME)
    IN X_COUNT
    OF T_ITEMS
    WHERE ID! P_ID =
    AND UPPER (ITEM_NAME) AS UPPER (P_ITEM_NAME);
    RETURN X_COUNT;
    END CH_UNIQUE_ITEM_NAME;

    2. I CREATED TRIGGER CALL TRG_CH_UNIQUE_T_ITEMS

    CREATE OR REPLACE 'TRG_CH_UNIQUE_T_ITEMS' before FIRING
    UPDATE
    ON T_ITEMS FOR EACH LINE
    DECLARE
    NUMBER OF X_CHECK;
    BEGIN
    SELECT CH_UNIQUE_ITEM_NAME (: OLD.ID,: NEW.) NOM_ELEMENT) IN DOUBLE X_CHECK;
    IF (: NEW.) NOM_ELEMENT DISLIKES: OLD. Nom_element AND X_CHECK > 0)
    THEN RAISE_APPLICATION_ERROR (-20007, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
    END IF;
    END;

    NOW WHEN I UPDATE ANY ITEMS FOUND ERROR "ERROR / T_ITEMS in the TABLE is changing, function of triggering/can not see ORA-06512.

    Form on T_ITEMS22222.png

    Please help me TO RESOLVE THIS ERROR. I TIRED TO SOLVE...

    Thank you

    You don't realize that you have just set a UNIQUE INDEX of several columns?

    create unique index index_name_uq on table_name( user#, upper(item_name) );
    

    In addition, a GUI Design point, (using the terms of the APEX) that you want to validate the data before submit you.

    (use a Page-level Validation)

    MK

  • OEM12c: Container of data in case of failure to schedule the backup-ORA 20411 - ORA-06512

    Oracle Enterprise Manager Cloud control 12 c - 12.1.0.3

    Oracle Database Enterprise Edition 11.2.0.3

    Oracle Enterprise Linux 5

    Database container:

    Oracle Database Enterprise Edition 12.1.0.5

    Windows Server 2012 R2 Standard

    OEM12c: Container for database fail to schedule backup

    ORA-20411: the following parameters have a NULL value: db_connect_string ORA-06512: at "SYSMAN.". EM_JOB_OPS', line 290 ORA-06512: at "SYSMAN.". GC_JOB', line 29 ORA-06512: at line 1

    Thank you

    Marcelo brands

    ESRI, technical director, OCP

    I solved the problem by following these steps.

    1 OEM12c > target > all targets > 'remove the motor pump target database '.

    2 OEM12c > target > all targets > systems > "to ensure that the target database system is also removed.

    3 OEM12c > Setup > manage Cloud control > Agents

    -Restart the agent database of the target container

    -It refreshes the C:\oracloud\agent_inst\sysman\emd\target.xml in the target database server where the agent is running

    4. in the server database, make a backup of the C:\oracloud\agent_inst\sysman\emd\target.xml file

    5 edit the file C:\oracloud\agent_inst\sysman\emd\target.xml

    -Remove all the entries that refer to the database of the target container

    -my case the xml file has several entries with different target system names pointing to the same target, weird container base, do not know how this could happen

    -J' removed all the and saved the xml file

    6, OEM12c > Setup > manage Cloud control > Agents

    -yet again, restart the agent database of the target container

    7 OEM12c > Add Target > manually add targets

    -Add the database to the target return container to oem12c

    8 OEM12c > target > databases

    -wait a few minutes for the target container of database state, to be 'green '.

    -Click on the database of the container link

    -Click availability > Backup & Recovery > scheduled backup...

    !!! It works fine now! I can create the backup job.

    Thank you

    Marcelo brands

    ESRI, technical director, OCP

  • Trigger the error ORA-06512: in SYS. Line SECURE_DML 5

    Hi all
    I am trying to create a procedure that is called by a trigger like this:

    CREATE or REPLACE PROCEDURE SECURE_DML is
    BEGIN
    If (TO_CHAR(SYSDATE, 'DY') IN ('SAB', 'DOM')) OR (TO_CHAR (SYSDATE, 'HH24')
    NOT FROM 08:00 ' 17:00 ') THEN
    RAISE_APPLICATION_ERROR (-20500, ' Insercoes funcionarios only no comercial Monday ');
    end if;
    end;
    /

    CREATE OR REPLACE TRIGGER secure_dml2
    INSERT BEFORE ON SCOTT. EMP2
    BEGIN
    exec SECURE_DML procedure;
    end;
    /
    ALTER SESSION set nls_date_format = 'HH24 DY';
    insert into SCOTT.emp2 (sal, empno, ename, deptno) values (7935, 'SANDRA', 1203, 10);

    The error that is:
    ORA-06512: In SYS. Line SECURE_DML 5
    ORA-06512: In SYS. SECURE_DML2 line 2

    What should I do to remove these erros?
    Thank you

    SQL * Plus still displays the full error stack. You raise an error in the stored procedure that is propagated to trigger that is propagated to SQL * more.

    SY.

  • How to solve the problem of the ORA-29273 and ORA-06512

    Hey, guys:

    I had a problem to get Google geocoding when I used a government licensed Google API key. This project is developed for the Government, so we should be able to use this API key. And the agent of the Government told me that as long as I use this API key and they add to the area of our company to their list, we should be able to get free Google geocoding indefinitely. I'm using Oracle 11 g 2, Apex 4.1. Google returns a result (1600 geocoding) and after awhile my program was exception. However, I got the following problem:

    ORA-29273: HTTP request failed
    ORA-06512: at "SYS." UTL_HTTP", line 1722
    ORA-29259: end-of-input reached
    ORA-06512: at "get OUT. SOR_TEST_SERVICE', line 24
    ORA-06512: at "get OUT. SOR_TEST_SERVICE', line 187
    ORA-06512: at line 6
    29273 00000 - "the HTTP request failed.
    * Cause: The UTL_HTTP package cannot run the HTTP request.
    * Action: Use get_detailed_sqlerrm to check the detailed error message.
    Correct the error and restart the HTTP request.

    and I searched online and found the thread following OTN:

    Anyone incorporating the Google Apps Provisioning via Oracle or APEX API?

    It looks like, I have to get Google API certificate and install it on Oracle wallet. I do not experience this issue. Can someone give me a roadmap to this topic? For example, how can I get a certificate of Google? Should I get in touch with Google, or send the request with API license key? or API key is a certificate? an example would be very useful!


    Here is my code
      procedure Get_Geocoding(P_s_Address in varchar2, P_s_Geocoding out varchar2, P_n_accuracy out number, P_b_success out boolean) is
      
      l_address varchar2(4000);
      l_url varchar2(32000);
      l_response varchar2(3200);
      n_first_comma number;
      n_second_comma number;
      n_level_length number;
      
      BEGIN
        /* TODO implementation required */
        
        l_address:=APEX_UTIL.URL_ENCODE(P_s_Address);
        l_address := replace(l_address,' ','+');
         
        l_url := 'http://maps.google.com/maps/geo?q='||l_address||'&'||'output=csv'||'&'||'key=my API key';
        l_response := utl_http.request(l_url, APEX_APPLICATION.G_PROXY_SERVER);
        
        --dbms_output.put_line(l_response);
        
        n_first_comma:=instr(l_response,',',1,1);
        n_second_comma:=instr(l_response,',',1,2);
        n_level_length:=n_second_comma-n_first_comma-1;
    
        P_n_accuracy:=to_number(substr(l_response,n_first_comma+1, n_level_length));
        
         l_response:=substr(l_response,instr(l_response,',',1,2)+1);
        
           
        
        P_s_Geocoding:=l_response;
        if (P_s_Geocoding<>'0,0') then
          P_b_success:=true;
         else
          P_b_success:=false;
        end if;
      
      END;
    Thank you very much!

    Sam

    Published by: lxiscas on August 22, 2012 16:33

    Published by: lxiscas on August 23, 2012 08:27

    To access the HTTPS site, you will need portfolio information.
    Portfolio is created through the Oracle Wallet Manager. It is available in standard edition database or Oracle HTTP server.
    If you have installed, go to Oracle Wallet Manager and create a portfolio.
    Then, you need to import the certificates on this portfolio.

    When you open the https://maps.google.com/ website in your web browser, you will see a lock symbol just before https. Double click on that and click on certificate information.
    Then click path of certificate, and then click the top node and click View Certificate and click on details and then copy in the file. The Certificate Export Wizard will start select
    Message Syntax cryptographice and check include all certification path.

    He followed even for all nodes in the main certificate

    This will create a file. Once the file is created. Double click on that and start the Certificate Import Wizard. Follow the online instructions. (It is need in the server)
    Once done. Open the Oracle Portfolio Manager and import it there also. Right-click on the wallet, and select Import.
    Then log in as administrator of the apex
    Workspace - internal
    User - Admin
    Password - passowrd you created everything by the installation

    Go to the setting of the instance and select portfolio information. And put the path of the portfolio in the file format: and password wallet.

    Once done, I think that you will be able to access.

    See you soon,.
    Mehabub

  • Error "ORA-01861: literal does not match the format ORA-06512 string.

    Hello
    I am getting error on EBS page when I click on the button

    I wrote the code in CO to insert values in table when the button is clicked

    but when I click the button it gives an error
    ORA-01861: literal does not match the format ORA-06512 string
    I think that his error of date format

    but I tried many styles of formatting but not yet able to fix it

    KAO

    You are right, that this is due to the error in the data type. Share the code that you have coded for button click here.

    Kind regards
    GYAN

Maybe you are looking for