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

Tags: Database

Similar Questions

  • ORA-06533: index beyond County ORA-06512:

    Hello

    I tried to insert the collection of data (below) in two individual tables, when I tried to insert a unique collection of data in two individual tables, it has been introduced.

    But when I tired to insert several collections into two individual tables, I am getting below error.

    Einf is my PLSQL CODE with details of the error,

    could you please give me solution.

    Thanks in advance .

    Set serveroutput on

    DECLARE

    /*

    PL ORG_ADDRESSES_PHONES_TAB: = ORG_ADDRESSES_PHONES_TAB (ORG_ADDRESSES_PHONES_TYPE ('a1', 'c1', 's1', 'p1', 1, ORG_PHONES_TAB (ORG_PHONES_TYPE ('a2', 'p1', 's1', 'e1')));)

    If inserted unique collections

    */

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

    ------------------------------------------------------------------------          But Below data is not inserting because of multiple collections          ----------------------------------------------------------------------------------------------

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

    PL ORG_ADDRESSES_PHONES_TAB: = ORG_ADDRESSES_PHONES_TAB (ORG_ADDRESSES_PHONES_TYPE ("a1", "c1", "s1", "p1", 1, ORG_PHONES_TAB (ORG_PHONES_TYPE ("a2", "p1", "s1", "e1"))), ORG_ADDRESSES_PHONES_TYPE ('a2', 'c2', 's3', 'p4', 2, ORG_PHONES_TAB (ORG_PHONES_TYPE ('d3', 'f3', 'ws3', 're3')));)

    BEGIN

    I'm IN pl. FIRST... LAST pl.

    LOOP

    PL. EXTEND;

    dbms_output.put_line (i);

    dbms_output.put_line ('next': pl (i) .ORG_PHONES.) Next (1));

    PL of YEW. (I) exists, THEN - if the element exists then display

    dbms_output.put_line (' ADDRESS ': pl (i).) ADDRESS);

    dbms_output.put_line (' CITY ' | pl (i).) IN TOWN);

    dbms_output.put_line ('STATE_CODE' | pl (i).) STATE_CODE);

    dbms_output.put_line (' zip_code ' | pl (i).) ZIP_CODE);

    dbms_output.put_line ('PRIMARY_YESNO': (i) pl.) PRIMARY_YESNO);

    dbms_output.put_line ('POSTAL Code': pl (i) .ORG_PHONES (i).) AREA CODE);

    dbms_output.put_line ('PREFIX': pl (i) .ORG_PHONES (i).) PREFIX);

    dbms_output.put_line ('SUFFIX' | pl (i) .ORG_PHONES (i).) SUFFIX);

    dbms_output.put_line ('EXTENSION' | pl (i) .ORG_PHONES (i).) EXTENSION);

    -pl. EXTEND;

    -pl (i) .ORG_PHONES. EXTEND;

    END IF;

    PL (i) .ORG_PHONES. EXTEND;

    END LOOP;

    COMMIT;

    -dbms_output.put_line ('hii');

    end;

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

    Failed query see the settings

    Error from line: 3 in command.

    DECLARE

    -declare a variable of type projecttable

    PL ORG_ADDRESSES_PHONES_TAB: = ORG_ADDRESSES_PHONES_TAB (ORG_ADDRESSES_PHONES_TYPE ("a1", "c1", "s1", "p1", 1, ORG_PHONES_TAB (ORG_PHONES_TYPE ("a2", "p1", "s1", "e1"))), ORG_ADDRESSES_PHONES_TYPE ('ta2', 'uc2', 'vs3', 'wp4', 2, ORG_PHONES_TAB (ORG_PHONES_TYPE ('d3', 'f3', 'ws3', 're3')));)

    -How to display the values in the table

    BEGIN - beginning of the main block

    I'm in pl.first... pl. Last

    loop

    dbms_output.put_line (i);

    dbms_output.put_line (' ADDRESS ': pl (i).) ADDRESS);

    dbms_output.put_line (' CITY ' | pl (i).) IN TOWN);

    dbms_output.put_line ('STATE_CODE' | pl (i).) STATE_CODE);

    dbms_output.put_line (' zip_code ' | pl (i).) ZIP_CODE);

    dbms_output.put_line ('PRIMARY_YESNO': (i) pl.) PRIMARY_YESNO);

    dbms_output.put_line ('POSTAL Code': pl (i) .ORG_PHONES (i).) AREA CODE);

    dbms_output.put_line ('PREFIX': pl (i) .ORG_PHONES (i).) PREFIX);

    dbms_output.put_line ('SUFFIX' | pl (i) .ORG_PHONES (i).) SUFFIX);

    dbms_output.put_line ('EXTENSION' | pl (i) .ORG_PHONES (i).) EXTENSION);

    -pl. EXTEND;

    PL (i) .ORG_PHONES. EXTEND;

    end loop;

    COMMIT;

    -dbms_output.put_line ('hii');

    end;

    Error report-

    ORA-06533: index beyond County

    ORA-06512: at line 19

    06533 00000 - 'County beyond index'

    * Cause: A limit index was greater than the number of a varray

    or too big for a nested table.

    * Action: Verify program logic and extend explicitly if necessary.

    1

    ADDRESS a1

    CITY c1

    STATE_CODE s1

    Zip_code p1

    PRIMARY_YESNO 1

    CODEZONE a2

    PREFIX p1

    SUFFIX s1

    E1 EXTENSION

    2

    ADDRESS ta2

    Uc2 CITY

    STATE_CODE vs3

    Zip_code wp4

    PRIMARY_YESNO 2

    You have to LOOP in your table of pl (I) .ORG_PHONES (I)

    CREATE OR REPLACE PROCEDURE myproc AS
    
       pl ORG_ADDRESSES_PHONES_TAB := ORG_ADDRESSES_PHONES_TAB(ORG_ADDRESSES_PHONES_TYPE('a1'
                                                                                        ,'c1'
                                                                                        ,'s1'
                                                                                        ,'p1'
                                                                                        ,1
                                                                                        ,ORG_PHONES_TAB(ORG_PHONES_TYPE('a2'
                                                                                                                       ,'p1'
                                                                                                                       ,'s1'
                                                                                                                       ,'e1')
                                                                                                       )
                                                                                       )
                                                              ,ORG_ADDRESSES_PHONES_TYPE('a2'
                                                                                        ,'c2'
                                                                                        ,'s3'
                                                                                        ,'p4'
                                                                                        ,2
                                                                                        ,ORG_PHONES_TAB(ORG_PHONES_TYPE('d3'
                                                                                                                       ,'f3'
                                                                                                                       ,'ws3'
                                                                                                                       ,'re3')
                                                                                                       )
                                                                                        )
                                                              );
    
    BEGIN
    
       DBMS_OUTPUT.PUT_LINE('First: ' || TO_CHAR(pl.FIRST));
       DBMS_OUTPUT.PUT_LINE('Last: ' || TO_CHAR(pl.LAST));
    
       FOR I IN pl.FIRST..pl.LAST LOOP
    
          pl.EXTEND;
    
          DBMS_OUTPUT.PUT_LINE(I);
          DBMS_OUTPUT.PUT_LINE('next ' || pl(I).ORG_PHONES.NEXT(1));
    
          IF(pl.EXISTS(I)) THEN                       -- if item exists then display
    
             DBMS_OUTPUT.PUT_LINE('ADDRESS  ' || pl(I).ADDRESS);
             DBMS_OUTPUT.PUT_LINE('CITY  ' || pl(I).CITY);
             DBMS_OUTPUT.PUT_LINE('STATE_CODE  ' || pl(I).STATE_CODE);
             DBMS_OUTPUT.PUT_LINE('POSTAL_CODE  ' || pl(I).POSTAL_CODE);
             DBMS_OUTPUT.PUT_LINE('PRIMARY_YESNO  ' || pl(I).PRIMARY_YESNO);
    
             FOR j IN pl(I).org_phones.FIRST..pl(I).org_phones.LAST LOOP
    
                DBMS_OUTPUT.PUT_LINE('AREACODE  ' || pl(I).ORG_PHONES(j).AREACODE);
                DBMS_OUTPUT.PUT_LINE('PREFIX  ' || pl(I).ORG_PHONES(j).PREFIX);
                DBMS_OUTPUT.PUT_LINE('SUFFIX  ' || pl(I).ORG_PHONES(j).SUFFIX);
                DBMS_OUTPUT.PUT_LINE('EXTENSION  ' || pl(I).ORG_PHONES(j).EXTENSION);
    
             END LOOP;
    
          --pl.EXTEND;
          --pl(i).ORG_PHONES.EXTEND;
    
          END IF;
    
          pl(I).ORG_PHONES.EXTEND;
    
       END LOOP;
    
       COMMIT;
    
       --dbms_output.put_line('hii');
    
    EXCEPTION
    
       WHEN OTHERS THEN
          DBMS_OUTPUT.PUT_LINE(DBMS_UTILITY.FORMAT_ERROR_STACK);
    
    END myproc;
    
  • dmp Impdp file error: ORA-29283: operation invalid file ORA-06512: at "SYS." UTL_FILE", line 536

    Hi all.

    Sorry to ask this error again, I read a lot of topic in this forum on this subject, but I can't fix it.

    So I create this topic.

    My computer is running oracle database 11 g 2 express edition on ubuntu LTS 14.04.

    I'm trying to import the database of dmp file. That's what I do:


    > sqplus

    opening session with sys as sysdba, then run:

    Hoangnv CREATE USER IDENTIFIED BY hoangnv;

    GRANT CONNECT TO hoangnv;

    GRANT RESOURCE, s/n hoangnv;

    CREATE OR REPLACE DIRECTORY dmpdir AS ' / home/hoangnv/downloads/db ";

    GRANT read, write the DIRECTORY ON dmpdir TO hoangnv;


    my_project.dmp file is stored on /home/hoangnv/Downloads/db folder.

    Finally, I ran the command below in terminal:

    impdp hoangnv/hoangnv@xe directory = dmpdir dumpfile = my_project.dmp logfile = my_project.log


    That's what see the Terminal:

    ORA-39002: invalid operation

    ORA-39070: unable to open the log file.

    ORA-29283: invalid file operation

    ORA-06512: at "SYS." UTL_FILE", line 536

    ORA-29283: invalid file operation

    Any ideas? I run these commands on window and import the database successfully.

    Hello

    Please try the suggestions below:

    1. make sure that the roles granted to the user are 'default' for him.

    SQL > change the user hoangnv the role by default all;

    then try to re-import.

    Note: the DBA role contains the IMP_FULL_DATABASE with it.

    2. try import with the use of the 'System' this time, which is the result then? don't forget to give the system read, write on directory dmpdir.

    3. is the permission to/home/hoangnv/Downloads/db fine OS?

  • ORA-06512: at "RQSYS. RQEVALIMPL', line 77

    Hello

    I test our add-on R Oracle and I get errors when I try a use of the ore.lm function using the example in the "User Guide". Here's the example and errors:

    Example 4-2 using ore.lm

    longley_of <- ore.push(longley) # Fit full model oreFit1 <- ore.lm(Employed ~ ., data = longley_of) class(oreFit1) summary(oreFit1)

    > longley_of <-ore .push (longley)

    > oreFit1 <-ore.lm (employees ~., data = longley_of)

    Error in .oci. GetQuery (Conn., instruction, data = data = prefetch prefetch,):

    ORA-20000: RQuery error internal [rqerExec, 3, 0, 0]

    ORA-06512: at "RQSYS. RQEVALIMPL', line 77

    ORA-06512: at "RQSYS. RQEVALIMPL', line 74

    Thanks Sherry for your quick response on this issue.

    We have uninstalled company Oracle R and reinstalled and everything works now. Thanks again for your support! RA

  • 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.

  • 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.

  • ORA-06512: at "SYS." UTL_HTTP"ORA-29259: end-of-entry available on UTL_HTTP. GET_RESPONSE

    Hi all

    I call using UTL_HTTP and SOAP_API Web services, mentioned below, similarly

    FUNCTION to CREATE or REPLACE add_numbers (p_int_1 in NUMBER, p_int_2 number)

    RETURN NUMBER

    AS

    l_request soap_api.t_request;

    l_response soap_api.t_response;

    l_return VARCHAR2 (32767).

    l_url VARCHAR2 (32767).

    l_namespace VARCHAR2 (32767).

    l_method VARCHAR2 (32767).

    l_soap_action VARCHAR2 (32767).

    l_result_name VARCHAR2 (32767).

    BEGIN

              l_url := ' http://oracle-base.com/webservices/server.php';

    " l_namespace: = ' xmlns =" http://Oracle-base.com/webservices/ "';

    l_method: = 'ws_add ';

    l_soap_action: = ' http://oracle-base.com/webservices/server.php/ws_add';

    l_result_name: = 'back ';

    l_request: = soap_api.new_request (p_method = > l_method,)

    p_namespace = > l_namespace);

    soap_api.add_parameter (p_request = > l_request,)

    p_name = > 'int1 ',.

    p_type = > ' xsd: Integer.

    p_value = > p_int_1);

    soap_api.add_parameter (p_request = > l_request,)

    p_name = > "int2"

    p_type = > ' xsd: Integer.

    p_value = > p_int_2);

    l_response: = soap_api.invoke (p_request = > l_request,)

    p_url = > l_url,

    p_action = > l_soap_action);

    l_return: = soap_api.get_return_value (p_response = > l_response,)

    p_name = > l_result_name,

    p_namespace = > NULL);

    RETURN l_return;

    END;

    It works very well when the number of records is less (the XML output is small), but when the number of records in the source database is passed then I'm not able to get the output XML file.

    I get the error message,

    error code:-29273, msg error: ORA-29273: HTTP request failed

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

    ORA-29259: end-of-input reached

    I am gettting error on line,

    L_HTTP_RESPONSE: = UTL_HTTP. GET_RESPONSE (L_HTTP_REQUEST);

    Can someone help me with this problem? Is it possible to increase the size HTTP_RESPONSE?

    Thank you

    Abbas Qureshi

    Hello

    have you checked the end of your XML data? You wrote:

    > Looped it returns two values XML we have a length 32767 and other is 122.
    Perhaps you can see which part of your HTTP response is missing.

    Kind regards

    WoG

  • Error when inserting a record - a feature not taken in charge with clause RETURNING ORA-06512: at line 1

    Hello

    I have a created an EO based on a synonym (synonym is created for a Table by using binding remote Db)

    I created a from VO of the EO above and added to an AM. When I run the AM and try to insert a record I get following error

    [164] BEGIN INSERT INTO TRACK_TRANSACTION_STATUS_BIZ (TRANS_NO, TRANS_ID, START_DATE, LOGIN_USER_ID, SESSION_ID, REFUND_APPLICABLE_IND) VALUES (: 1,: 2,: 3,: 4:5:6) TRANS_STATUS, ISHOP_LOGIN_IND, EMAIL_ADDR_AT_SIGN, TEL_NO_INT_PREFIX, REFUND_APPLICABLE_IND, REFUNDED_IND, CSP_IND RETURNING: 7: 8: 9,: 10,: 11,: 12,: 13; END;

    [165] insert link param 1: test

    [166] insert link param 2: you

    [167] insert link param 3: 2014-10-16 21:37:09.0

    [168] insert link param 4: your

    [169] insert link param 5: you

    [170] insert link param 6: N

    OracleSQLBuilderImpl.doEntityDML [171] failed...

    [172] X / Open SQL State is: 99999

    [173] java.sql.SQLException: ORA-22816: feature not supported with RETURNING clause

    ORA-06512: at line 1

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)

    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)

    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)

    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)

    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)

    at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:213)

    at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1111)

    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1488)

    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3769)

    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3904)

    at oracle.jdbc.driver.OracleCallableStatement.executeUpdate(OracleCallableStatement.java:9417)

    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1512)

    at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:429)

    at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:8575)

    at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6816)

    at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3290)

    at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:3093)

    at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2097)

    at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2378)

    at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1615)

    at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1417)

    at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1437)

    at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2150)

    at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:740)

    at oracle.jbo.uicli.jui.JUActionBinding.actionPerformed(JUActionBinding.java:193)

    at oracle.jbo.uicli.controls.JUNavigationBar.doAction(JUNavigationBar.java:412)

    at oracle.jbo.jbotester.NavigationBar.doAction(NavigationBar.java:111)

    to oracle.jbo.uicli.controls.JUNavigationBar$ NavButton.actionPerformed (JUNavigationBar.java:118)

    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

    in javax.swing.AbstractButton$ Handler.actionPerformed (AbstractButton.java:2318)

    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)

    at java.awt.Component.processMouseEvent(Component.java:6289)

    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)

    at java.awt.Component.processEvent(Component.java:6054)

    at java.awt.Container.processEvent(Container.java:2041)

    at java.awt.Component.dispatchEventImpl(Component.java:4652)

    at java.awt.Container.dispatchEventImpl(Container.java:2099)

    at java.awt.Component.dispatchEvent(Component.java:4482)

    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)

    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)

    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)

    at java.awt.Container.dispatchEventImpl(Container.java:2085)

    at java.awt.Window.dispatchEventImpl(Window.java:2478)

    at java.awt.Component.dispatchEvent(Component.java:4482)

    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)

    to java.awt.EventQueue.access$ 000 (EventQueue.java:85)

    in java.awt.EventQueue$ 1.run(EventQueue.java:603)

    in java.awt.EventQueue$ 1.run(EventQueue.java:601)

    at java.security.AccessController.doPrivileged (Native Method)

    in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:87)

    in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:98)

    in java.awt.EventQueue$ 2.run(EventQueue.java:617)

    in java.awt.EventQueue$ 2.run(EventQueue.java:615)

    at java.security.AccessController.doPrivileged (Native Method)

    in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:87)

    at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)

    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

    [174] OracleSQLBuilder: ROLLBACK WORK point registration "BO_SP".

    [175] DCBindingContainer.reportException: oracle.jbo.DMLException

    oracle.jbo.DMLException [176]: Houston-26041: could not publish data from database in "Insert": SQL statement ' BEGIN INSERT INTO TRACK_TRANSACTION_STATUS_BIZ (TRANS_NO, TRANS_ID, START_DATE, LOGIN_USER_ID, SESSION_ID, REFUND_APPLICABLE_IND) VALUES (: 1,: 2,: 3,: 4: 5:6) TRANS_STATUS, ISHOP_LOGIN_IND, EMAIL_ADDR_AT_SIGN, TEL_NO_INT_PREFIX, REFUND_APPLICABLE_IND. , REFUNDED_IND, CSP_IND INTO TURNING: 7: 8: 9: 10: 11:12:13; END; ».

    at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:583)

    at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:8575)

    at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6816)

    at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3290)

    at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:3093)

    at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2097)

    at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2378)

    at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1615)

    at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1417)

    at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1437)

    at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2150)

    at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:740)

    at oracle.jbo.uicli.jui.JUActionBinding.actionPerformed(JUActionBinding.java:193)

    at oracle.jbo.uicli.controls.JUNavigationBar.doAction(JUNavigationBar.java:412)

    at oracle.jbo.jbotester.NavigationBar.doAction(NavigationBar.java:111)

    to oracle.jbo.uicli.controls.JUNavigationBar$ NavButton.actionPerformed (JUNavigationBar.java:118)

    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

    in javax.swing.AbstractButton$ Handler.actionPerformed (AbstractButton.java:2318)

    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)

    at java.awt.Component.processMouseEvent(Component.java:6289)

    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)

    at java.awt.Component.processEvent(Component.java:6054)

    at java.awt.Container.processEvent(Container.java:2041)

    at java.awt.Component.dispatchEventImpl(Component.java:4652)

    at java.awt.Container.dispatchEventImpl(Container.java:2099)

    at java.awt.Component.dispatchEvent(Component.java:4482)

    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)

    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)

    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)

    at java.awt.Container.dispatchEventImpl(Container.java:2085)

    at java.awt.Window.dispatchEventImpl(Window.java:2478)

    at java.awt.Component.dispatchEvent(Component.java:4482)

    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)

    to java.awt.EventQueue.access$ 000 (EventQueue.java:85)

    in java.awt.EventQueue$ 1.run(EventQueue.java:603)

    in java.awt.EventQueue$ 1.run(EventQueue.java:601)

    at java.security.AccessController.doPrivileged (Native Method)

    in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:87)

    in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:98)

    in java.awt.EventQueue$ 2.run(EventQueue.java:617)

    in java.awt.EventQueue$ 2.run(EventQueue.java:615)

    at java.security.AccessController.doPrivileged (Native Method)

    in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:87)

    at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)

    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

    Caused by: java.sql.SQLException: ORA-22816: feature not supported with RETURNING clause

    ORA-06512: at line 1

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)

    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)

    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)

    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)

    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)

    at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:213)

    at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1111)

    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1488)

    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3769)

    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3904)

    at oracle.jdbc.driver.OracleCallableStatement.executeUpdate(OracleCallableStatement.java:9417)

    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1512)

    at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:429)

    ... 52 more

    # # 0 in detail

    java.sql.SQLException: ORA-22816: feature not supported with RETURNING clause

    ORA-06512: at line 1

    Ask for help in this regard

    ADF will generate default DML statement with RETURNING clause, and it is not applicable to your use case: ORA-22816: feature not supported with RETURNING clause

    Instead, you can try with setUseReturningClause (false): http://docs.oracle.com/middleware/1213/adf/develop/adf-bc-entity-objects.htm#BABJAJCA

    Dario

  • 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

  • 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 >

  • ORA-01002: extraction out of sequence ORA-06512

    Hi team,

    I tried the below block to check out of it.

    I do not understand why the block below gives error ora-01002.

    Could you please advice on this.

    declare

    cursor c1 is select * from emp for update;

    z c1% rowtype;

    Start

    Open c1;

    Fetch c1 into z.

    commit;

    Fetch c1 into z.

    end;

    Thank you

    Your mistake himself say about your mistake and how to rectify

    You must check out inside a loop

    RA-01002: extraction out of sequence

    ORA-06512: at line 11 level

    01002 00000 - "fetch out of sequence.

    * Cause: This error means that a fetch tried a slider

    that is no longer valid.  Note that a PL/SQL cursor loop

    implicitly made extractions and so can also cause this error.

    There are a number of possible causes of this error, including:

    (1) extraction of a cursor after the last row has been recovered

    and the ORA-1403 error returned.

    (2) if the cursor has been opened with the FOR UPDATE clause,

    recovery after a COMMIT has been made will return the error.

    (3) the reallocation of the placeholders in the SQL statement, and then deliver

    before rerunning the fetch statement.

    * Action: 1) do not issue not a statement of extraction after the last line has been

    not recovered - there are no lines to retrieve.

    (2) do not issue a VALIDATION inside a loop of extraction of cursor

    the UPDATE that was opened.

    (3) rerun the statement after the rebinding, then try to

    search again.

    DECLARE

    CURSOR c1

    IS

    SELECT * FROM emp FOR UPDATE;

    z c1% rowtype;

    BEGIN

    OPEN c1;

    loop

    FETCH c1 INTO z.

    When exit c1% notfound;

    end loop;

    COMMIT;

    END;

  • 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

  • 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

  • ORA-01578: block of data corrupted ORACLE ORA-01110: data file 46:, ORA-06512: at line 1 ScanningError 1038246

    We get error below of the application team. Please find attached the file backup rman error.

    ORA-01578: ORACLE corrupt data (file # 46, block # 64626) ORA-01110: data file 46: ' / db04_hlt/PHCLMDB/PHCLMDB_DATA/phclm21.dbf' ORA-06512: at "HCLM_ADMIN. SCANPROC_INSUPLOADTEMP", line 16 ORA-06512: at line 1 ScanningError 1038246

    fe40282660394026b5f76bf3f5d649e4 SCANPROC_INSUPLOADTEMP-ORA-01578: data block (file # 46, block # 64626) corrupted ORACLE ORA-01110: data file 46:

    Hello

    Please follow the steps to format corrupt block a used the procedure mentioned in the document below, please note that you need to do several times for all the block corrupted in free space.
    Doc-ID 336133.1===> how corrupt Format block is not part of any Segment.

    Following the notes 293515.1 -->> ORA-1578 ORA-26040 in a LOB segment - Script to resolve errors

    This note is for these errors, but the procedure is exactly the same, we must:

    1 - identify the ROWID affected
    2 - Put the ROWID corrupted on EMPTY_LOB
    3. When you MOVE the LOB to a new Tablespace

    These are essentially the steps, the note shows how

    Kind regards

    Alok

  • ORA-06512: at "SYS." DBMS_XMLGEN", (ORA-00942: table or view does not exist)

    Hey guys, it's Xev.

    I decide to use SQL and XML and it works in a scenario, but in another scenario, is not.

    Here's the Code, I'm passing to two variables, first of all, I spend in the table table_name, and then I spend in the schema.

    If I connected it with "user" and that it seeks it's own pattern, he found the results, as for example, but if I try to run this code while not

    connected to the same user I'm looking for more, I get this error.

    ORA-19202: an error has occurred in the processing of XML

    ORA-00942: table or view does not exist

    ORA-06512: at "SYS." DBMS_XMLGEN", line 288

    ORA-06512: at line 1

    19202 00000 - "an error has occurred in the treatment of XML %s.

    * Cause: An error occurred during the processing of the XML function

    * Action: Check the given error message and resolve the problem appropriate

    /*-------------------------------------------------------------------------------

    This code works only you are connected to the user you are looking on.

    But if you're looking for a different user tables, it is kicking up and gives the above XML error...

    */

    SET SERVEROUTPUT ON

    exec DBMS_OUTPUT. ENABLE (1000000);

    Search_string VAR VARCHAR2 (28)

    EXEC: search_string: = ' ^ [0-9]{3}-[0-9]{2}-[0-9]{4}$']

    COLUMN "Keyword" FORMAT A28

    COLUMN 'Table' FORMAT A9

    COLUMN ' column value / "FORMAT A50

    SELECT DISTINCT SUBSTR (: search_string, 1: 28) "keyword."

    SUBSTR (table_name, 1, 14) "table."

    SUBSTR (t.column_value.getstringval (), 1, 50) ' / value of the column.

    OF dba_tab_cols.

    -where owner = ('& SCHEMA_NAME')

    TABLE

    (XMLSEQUENCE

    (DBMS_XMLGEN. GETXMLTYPE

    ("SELECT" | column_name |)

    'FROM ' | table_name |

    "WHERE REGEXP_LIKE.

    (' | column_name |) ','''

    || : search_string. ''')'

    () .extract (' LINES/rowset / * ""))) t

    -WHERE table_name IN ("FIND_TEST")

    WHERE table_name = upper ('& table_name')

    AND the OWNER = upper ('& SCHEMA_NAME')

    ORDER BY "Table".

    /

    Can someone please explain how works (DBMS_XMLGEN) and why it is throwing this error?

    Thank you

    Xev.

    It has nothing to do with DBMS_XMLGEN. GETXMLTYPE. It simply means the user running your SQL has no select privileges on the table & SCHEMA_NAME. & TABLE_NAME.

    SY.

Maybe you are looking for

  • What is the latest Version of 5.0 for Windows XP Destop?

    I currently have Firefox 6.0 beta on my Windows XP desktop. I want to return to the version of Firefox 5.0. How can I be sure to download the correct version 5 updated? Version 6.0 beta is too for my limited expertise and I don't want to deal with th

  • Mystery on 1606dn supported sizes of paper for automatic duplex printing

    I'm trying to find out if the 1606dn supports automatic duplex copy legal paper size, but the info is not in the user's manual, which just refers to "that the driver supports. Of course, I cannot and will not install the driver if I do not have the p

  • USB not recognized, usb has malfunctioned

    I have two or three usbs working properly using the usb ports on my computer, but one of my usb decided to not work, can someone help me on this problem and solve the problem. thnxz

  • BlackBerry smartphones can not navigate or receive my mails via WiFi

    Since getting my Torch9800 I was unable to use the WiFi connection only to surf the web, use the applications or simply download my mails. To do all that I always have 'data services' on (i.e. go through my network provider). Can anyone help please.

  • Dagen na 21 trial precisi

    Op 17 juli 2016 heb ik Adobe first Pro CC test geinstalleerd via Creative Cloud. Said is voor mij niet nieuw, due very clean. IK kan echter me herinneren dat deze test 30 dagen available starket, "momenteel" het is niet wat is. Sinds vandaag (21 dage