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;

Tags: Database

Similar Questions

  • ORA-01002: extraction out of sequence

    Hi all

    I start with pl - sql and sliders. I get this error when executing this procedure:

    Procedure gestor_gestoria AS

    CURSOR cambio_m IS
    Select dossiernumber in the a9_dossierfinancialentry where agentid = 0 and = 0 and dossiernumber like «% MT» agencyid
    UPDATE;

    record varchar2 (255 Char);
    a number (10);
    AG number (10);
    x number;

    BEGIN
    x: = 0;
    Open cambio_m;
    loop
    extract the cambio_m in the folder;
    When the output cambio_m % notfound;
    a: = Obtener_agente_m (folder);
    If a = 0 then
    a: = Obtener_agente_m2 (folder);
    end if;
    AG: = Obtener_agencia_m (folder);
    If ag = 0 then
    AG: = Obtener_agencia_m2 (folder);
    end if;
    If (<>0 or ag <>0) then
    update set a9_dossierfinancialentry = agentid, agencyid = ag location being cambio_m;
    x: = x + 1;
    end if;
    If x = 200 then
    commit;
    x: = 0;
    end if;
    end loop;
    close cambio_m;
    commit;
    END;

    Please can you help me find the error?

    Thanks in advance!
    dbajug

    You are engaged in your loop.

    If x = 200 then
    commit;

    This is the error.

    Please read:
    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:4951966319022
    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:7661190956484

  • ORA-01002 fetch out of sequence - do not commit all data

    We have a bunch of seller that returns a Ref Cursor, we want to go through the results of cursor and perform additional processing, and then return the results of the update of the slider.

    The problem, I'm running in at the back of the slider is the error "ORA-01002 fetch out of sequence.

    Calls a procedure to obtain the results of cursor, through results of cursor, then return the cursor even possible? My other thought was to empty the cursor results in a Global Temp table, but did not know if there was an easier way with the construction of a temporary table.

    Here is the code:

    create or replace

    PACKAGE BODY NU_MANPOWER AS

    PROCEDURE GETAVAILABLETIMEWINDOWS

    (acOrderType IN VARCHAR2,

    Accompany in VARCHAR2,

    acOffice IN VARCHAR2,

    acPromote IN VARCHAR2,

    adateStart in TIMESTAMP,

    adateEnd in TIMESTAMP,

    anResultCode OUT DIGITAL,

    curResults OUT SYS_REFCURSOR) AS

    -Variables

    curAvailTimeWindows sys_refcursor;

    v_START_DATE DATE;

    v_FINISH_DATE DATE;

    DIGITAL v_DAYS_BETWEEN: = 0;

    v_SEARCHDATE_START VARCHAR2 (16);

    v_SEARCHDATE_END VARCHAR2 (16);

    v_START_CHAR VARCHAR2 (16);

    v_END_CHAR VARCHAR2 (16);

    BEGIN

    QUICK. MANPOWER. GETAVAILABLETIMEWINDOWS (acOrderType, accompany, acOffice,)

    acPromote, adateStart, adateEnd, anResultCode, curAvailTimeWindows);

    IF anResultCode = 0 THEN

    v_START_DATE: = adateStart;

    v_FINISH_DATE: = adateEnd;

    v_DAYS_BETWEEN: = v_FINISH_DATE - v_START_DATE;

    LOOP

    SEEK curAvailTimeWindows INTO recAvailableTime;

    EXIT WHEN curAvailTimeWindows % NOTFOUND;

    BECAUSE me in 1.v_DAYS_BETWEEN

    LOOP

    v_SEARCHDATE_START: = to_char(v_START_DATE,'YYYY-MM-DD') | ' 00:01 ';

    v_SEARCHDATE_END: = to_char(v_START_DATE,'YYYY-MM-DD') | "23:59 ';

    IF to_char (recAvailableTime.time_window_start, 'YYYY-MM-DD HH24') = v_SEARCHDATE_START

    AND to_char (recAvailableTime.time_window_stop, 'YYYY-MM-DD HH24') = v_SEARCHDATE_END THEN

    t_dates (i): = v_START_DATE;

    t_available_time (i): = recAvailableTime.available_minutes;

    SELECT SUM (order_time)

    IN t_scheduled_time (i)

    OF fast.orders

    WHERE ORDER_SCHED_DATE > = to_date (to_char(v_START_DATE,'YYYY-MM-DD') |) "00:00:00 ',"YYYY-MM-DD HH24:MI:SS").

    AND ORDER_SCHED_DATE < = to_date (to_char(v_START_DATE,'YYYY-MM-DD') |) ' 23:59:59 ', "YYYY-MM-DD HH24:MI:SS").

    Neighborhood AND = to accompany | '-' || acOffice;

    IF t_available_time (i) < t_scheduled_time (i) THEN

    t_time_full (i): = 't';

    ON THE OTHER

    t_time_full (i): = null;

    END IF;

    END IF;

    v_START_DATE: = v_START_DATE + 1;

    END LOOP;

    v_START_DATE: = adateStart;

    END LOOP;

    ON THE OTHER

    NULL;

    END IF;

    curResults: = curAvailTimeWindows;

    EXCEPTION

    WHILE OTHERS THEN

    dbms_output.put_line (DBMS_UTILITY. FORMAT_ERROR_STACK);

    anResultCode: = 1;

    END GETAVAILABLETIMEWINDOWS;

    END NU_MANPOWER;

    Oracle version: 10.2.0.3.0

    He's not getting caught by the EXCEPTION block - it appears when you try to call the procedure and display the results of cursor.

    Thanks for your help.

    Jon

    In addition to the previous user of the link [somenumberi'llneverremember] posted, remove bugs that you call "exception handlers.

    Read, re-read, until you understand why here:

    Ask Tom & quot; Y at - it an easy way to make a DEC & quot;

  • ORA-01002 fetch out of sequence

    Dear all,
    While data recovery, application is out ORA-01002 recovery sequence error. This table is nearly 20 million records and its taking time to 2 hours and the end of the session the display error. Please suggest me how can I solve the problem. One thing I do not understand it is question of development or the issue of database. Someone help me please as soon as POSSIBLE.

    Kind regards
    Praveen K

    One thing I do not understand it is question of development or the issue of database.

    It is a development issue. Your coders made a mistake.
    Here are some 'common' situations that will lead to this error:
    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:546822742166

  • Procedure give me "OUT OF SEQUENCE".

    Anyone has an idea why I get an extraction out of sequence with this procedure error?

    PROCEDURE GenerateProductInventoryFeed)

    ON SYS_REFCURSOR RCT1
    )

    IS

    reference type is the inventory.sku%TYPE table;
    type last_inv is table of the inventory.lastinventorysent%TYPE;
    type new_inv is table of the inventory.newinv%TYPE;

    SKU l_sku.
    l_last_inv last_inv;
    l_new_inv new_inv;


    BEGIN

    / * GET REF CURSOR * /.
    RCT1: = Amazon_PKG. F_GETINVENTORYPRODUCTS();


    Go SEARCH the RCT1 COLLECT in BULK IN l_sku, l_last_inv, l_new_inv;
    ForAll indx in l_sku.first... l_sku. Last

    The aa inventory update
    The value of aa. LastInventorySent = l_new_inv (indx)
    Where aa. SKU = l_sku (indx);


    COMMIT;

    EXCEPTION
    WHILE OTHERS THEN
    ROLLBACK;
    DBMS_OUTPUT. PUT_LINE (SQLERRM);

    END GenerateProductInventoryFeed;

    Try something like this (untested)

    CREATE OR REPLACE PROCEDURE generateproductinventoryfeed(rct1 OUT SYS_REFCURSOR) IS
      TYPE sku IS TABLE OF inventory.sku%TYPE;
      TYPE last_inv IS TABLE OF inventory.lastinventorysent%TYPE;
      TYPE new_inv IS TABLE OF inventory.newinv%TYPE;
      l_sku      sku;
      l_last_inv last_inv;
      l_new_inv  new_inv;
    BEGIN
      /************GET REF CURSOR************/
      rct1 := amazon_pkg.f_getinventoryproducts();
      IF rct1%NOTFOUND
      THEN
        RETURN;
      ELSE
        FETCH rct1 BULK COLLECT
          INTO l_sku, l_last_inv, l_new_inv;
        FORALL indx IN l_sku.first .. l_sku.last
          UPDATE inventory aa SET aa.lastinventorysent = l_new_inv(indx) WHERE aa.sku = l_sku(indx);
        --COMMIT; committing here could be the cause also, you need to test it
      END IF;
    EXCEPTION
      WHEN OTHERS THEN
        ROLLBACK;
        dbms_output.put_line(SQLERRM);
    END generateproductinventoryfeed;
    

    Because your cursor SQL have a clause of update?

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

  • 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

  • Ore.Connect gives me ORA-06512: at "RQSYS. RQEVALIMPL', line 47

    I want to install Oracle Enterprise R, and I'm in step "Start the Oracle R Enterprise Client on Linux" in the installation guide. My output is as follows:
    $library (ORE)
    Loading required package: OREbase

    Package pricing: "OREbase."

    The following objects are hidden from "package: base:

    cbind data.frame, eval, interaction, order, dough, pmax, pmin,
    rbind, table

    Loading required package: OREstats
    Loading required package: MASS
    Loading required package: OREgraphics
    Loading required package: OREeda
    Loading required package: OREdm
    Loading required package: lattice
    Loading required package: OREpredict
    Loading required package: ORExml
    $ore.connect (user = "josh", sid = "orcl", host is"cascade", password = *, port = 1521, all = TRUE)
    Loading required package: ROracle
    Loading package perl: DBI
    Error in .oci. GetQuery (Conn., instruction, data = data = prefetch prefetch,):
    ORA-20000: RQuery error internal [24323, rqetPrepare, 2, 0]
    ORA-06512: at "RQSYS. RQEVALIMPL', line 47
    ORA-06512: at "RQSYS. RQEVALIMPL', line 43
    ORA-06512: at line 4 level
    I looked at the code for RQSYS. RQEVALIMPL and line 47 is the beginning of a static function called StubTablePrepare, which looks like it called rqeLib rqetNilPrepare. I checked and my $LD_LIBRARY_PATH contains librqe.so and librqe.so contains a function named rqetNilPrepare.

    It is quite possible, I missed a step when installing, but I don't know what it could be. Is it possible that I can get diagnoses more detailed telling me why StubTablePrepare seem to be failing?

    Here are my details of environment:
    Oracle version: 11.2.0.1.0 Enterprise Edition for Linux x 64
    Version R: R Oracle version 2.15.1 Distribution (-)-"of toasted marshmallows.
    Oracle Enterprise R version: 1.3_R_x86_64

    The client is installed on the same computer as the server. I can connect to the database as the user 'josh' through SQL Developer. The user 'josh' has the following grants:
    RUN A PROCEDURE
    CREATE TABLE
    EXECUTE ANY TYPE
    CREATE SESSION
    CREATE MINING MODEL
    CREATE PROCEDURE
    CREATE SEQUENCES
    CREATE VIEW
    RQADMIN
    CONNECT
    RUN RQSYS. RQEVALIMPL

    Thank you
    Josh Davis

    Josh,

    In point 1.3 of the ORE ore.connect use R shipped to check the version of R in the server. Embedded R won't work without an RDBMS bug fix available in 11.2.0.3.

    Denis

  • 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

  • Collecting Table statistics get error ORA-20001 and ORA-06512 on 11g

    Hi Forum!

    I'm trying to collect statistics on a DB 11.2.0.1 for Siebel application.
    The script that generates the statistical errors out and I don't know why. So I tried to interview sys.dba_tab_statistics manually, but the event, and then I got an error message:

    Select * from sys.dba_tab_statistics


    ORA-20001: BIN$ PV5XQQHLSAYJ0KPMEY1MHG == $0 is an invalid identifier
    ORA-06512: in "SYS-DBMS_STATS", line 2082
    ORA-06512: in "SYS-DBMS_STATS", line 2098
    ORA-06512: in "SYS-DBMS_STATS", line 26789


    Any ideas?

    Edited by: Penky October 10, 2011 14:51

    Penky wrote:
    Note that I have not even the error when you make a right selection * of dba_tab_statistics which I think should work fine, no?

    It is that:

    select * from dba_tab_statistics
    

    or

    select * from sys.dba_tab_statistics
    

    It is unusual for a view error SYS, unless it is a specific bug in this version of the database, but I wonder if there are other patterns, such as SYS who have something in their basket (not that anyone should have to be create or drop things in SYS)?

  • ORA-06512: at "WMSYS. WM_CONCAT_IMPL', line 30

    Select No, wm_concat (cleared) in the clr of the association_1 group by the;

    That's what I get at the end;

    ERROR:
    ORA-06502: PL/SQL: digital or value error: character string buffer too small
    ORA-06512: at "WMSYS. WM_CONCAT_IMPL', line 30


    even if I use the 2nd method by creating type I still get the same error

    Select No, row_col (cleared) in the clr of the association_1 group by the;


    ORA-06502: PL/SQL: digital or value error: character string buffer too small
    ORA-06512: at "ALI. T_ROW_COL', line 22

    REATE OR REPLACE TYPE t_row_col AS OBJECT
    (
      g_string  VARCHAR2(32767),
    
      STATIC FUNCTION ODCIAggregateInitialize(sctx  IN OUT  t_row_col)
        RETURN NUMBER,
    
      MEMBER FUNCTION ODCIAggregateIterate(self   IN OUT  t_row_col,
                                           value  IN      VARCHAR2 )
         RETURN NUMBER,
    
      MEMBER FUNCTION ODCIAggregateTerminate(self         IN   t_row_col,
                                             returnValue  OUT  VARCHAR2,
                                             flags        IN   NUMBER)
        RETURN NUMBER,
    
      MEMBER FUNCTION ODCIAggregateMerge(self  IN OUT  t_row_col,
                                         ctx2  IN      t_row_col)
        RETURN NUMBER
    );
    /
    
    
    CREATE OR REPLACE TYPE BODY t_row_col IS
      STATIC FUNCTION ODCIAggregateInitialize(sctx  IN OUT  t_row_col)
        RETURN NUMBER IS
      BEGIN
        sctx := t_row_col(NULL);
        RETURN ODCIConst.Success;
      END;
    
      MEMBER FUNCTION ODCIAggregateIterate(self   IN OUT  t_row_col,
                                           value  IN      VARCHAR2 )
        RETURN NUMBER IS
      BEGIN
        SELF.g_string := self.g_string || '/' || value;
        RETURN ODCIConst.Success;
      END;
    
      MEMBER FUNCTION ODCIAggregateTerminate(self         IN   t_row_col,
                                             returnValue  OUT  VARCHAR2,
                                             flags        IN   NUMBER)
        RETURN NUMBER IS
      BEGIN
        returnValue := RTRIM(LTRIM(SELF.g_string, '/'), '/');
        RETURN ODCIConst.Success;
      END;
    
      MEMBER FUNCTION ODCIAggregateMerge(self  IN OUT  t_row_col,
                                         ctx2  IN      t_row_col)
        RETURN NUMBER IS
      BEGIN
        SELF.g_string := SELF.g_string || '/' || ctx2.g_string;
        RETURN ODCIConst.Success;
      END;
    END;
    /
    
    
    CREATE OR REPLACE FUNCTION row_col (p_input VARCHAR2)
    RETURN VARCHAR2
    PARALLEL_ENABLE AGGREGATE USING t_row_col;
    /
    ************************************************************************************
    How can I fix this erros

    It is because there is a limit to how big a varchar2 can result (4000 bytes), and you exceed.

    What you need is to use a version of the CLOB basis rather for example

    create or replace
      type clobagg_type as object(
                                  text clob,
                                  static function ODCIAggregateInitialize(
                                                                          sctx in out clobagg_type
                                                                         )
                                    return number,
                                  member function ODCIAggregateIterate(
                                                                       self  in out clobagg_type,
                                                                       value in     clob
                                                                      )
                                    return number,
                                  member function ODCIAggregateTerminate(
                                                                         self        in     clobagg_type,
                                                                         returnvalue    out clob,
                                                                         flags       in     number
                                                                        )
                                    return number,
                                  member function ODCIAggregateMerge(
                                                                     self in out clobagg_type,
                                                                     ctx2 in     clobagg_type
                                                                    )
                                    return number
                                 );
    /
    create or replace
      type body clobagg_type
        is
          static function ODCIAggregateInitialize(
                                                  sctx in out clobagg_type
                                                 )
            return number
            is
            begin
                sctx := clobagg_type(null) ;
                return ODCIConst.Success ;
          end;
          member function ODCIAggregateIterate(
                                               self  in out clobagg_type,
                                               value in     clob
                                              )
            return number
            is
            begin
                self.text := self.text || value ;
                return ODCIConst.Success;
          end;
          member function ODCIAggregateTerminate(
                                                 self        in     clobagg_type,
                                                 returnvalue    out clob,
                                                 flags       in     number
                                                )
            return number
            is
            begin
                returnValue := self.text;
                return ODCIConst.Success;
            end;
          member function ODCIAggregateMerge(
                                             self in out clobagg_type ,
                                             ctx2 in     clobagg_type
                                            )
            return number
            is
            begin
                self.text := self.text || ctx2.text;
                return ODCIConst.Success;
            end;
    end;
    /
    create or replace
      function clobagg(
                       input clob
                      )
        return clob
        deterministic
        parallel_enable
        aggregate using clobagg_type;
    / 
    
    SQL> select trim(',' from clobagg(ename||',')) as enames from emp;
    
    ENAMES
    -----------------------------------------------------------------------------------
    SMITH,ALLEN,WARD,JONES,MARTIN,BLAKE,CLARK,SCOTT,KING,TURNER,ADAMS,JAMES,FORD,MILLER
    
    SQL>
    
  • Help me solve pls error ORA-06512

    I create a full dump of database with the following command:
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    expdp %DB_USERNAME%/%DB_PASSWORD%@%TNS_ALIAS% full = Y CONTENT = all THE directory = % ORADMPDIRNAME % % DMP_BKP_FILENAME % logfile LOGFILE = % = dumpfile
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------

    But when I try to created import dump file, with the command:
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Impdp %DB_USERNAME%/%DB_PASSWORD%@%TNS_ALIAS% full = Y CONTENT = all THE TABLE_EXISTS_ACTION = REPLACE directory = % ORADMPDIRNAME % % DMP_BKP_FILENAME % logfile LOGFILE = % = dumpfile
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------

    I get the following in my console error:
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    ...
    Treatment of type of object DATABASE_EXPORT, SYSTEM_PROCOBJACT, PRE_SYSTEM_ACTIONS, PROCACT_SYSTEM
    ORA-39083: Type as procact_system cannot be created with the object error:
    ORA-01843: not one month valid
    Because sql is:
    BEGIN
    If (system.wm$ _check_install) then
    return;
    end if;
    start to run immediately ' insert into wmsys.wm$ workspaces_table
    values ("LIVE",
    '''',
    ''0'',
    '''',
    ''-1'',
    '''',
    "' SYS
    Treatment of type of object DATABASE_EXPORT, SYSTEM_PROCOBJACT, POST_SYSTEM_ACTIONS, PROCACT_SYSTEM
    ORA-39083: Type as procact_system cannot be created with the object error:
    ORA-06550: line 2, column 93:
    PLS-00302: component 'OPERATOR_NONE' must be declared.
    ORA-06550: line 2, column 1:
    PL/SQL: Statement ignored
    Because sql is:
    BEGIN
    dbms_server_alert.set_threshold (2104, dbms_server_alert.operator_GT, '1200', dbms_server_alert.operator_NONE, ", 1,3, 'ias', dbms_server_alert.object_type_SYSTEM,"); COMMIT; END;
    DATABASE_EXPORT/SCHEMA/PROCACT_SCHEMA processing object type
    DATABASE_EXPORT/SCHEMA/TABLE/TABLE processing object type
    ORA-39126: worker unexpected fatal worker error of $ MAIN. PROCESS_TABLE_EXISTS_ACTION [TABLE: 'IX'.] ["" AQ$ _STREAMS_QUEUE_TABLE_T ']
    ORA-24019: QUEUE_TABLE identifier too long, should not exceed 24 characters
    ORA-00955: name is already used by an existing object

    ORA-06512: at "SYS." DBMS_SYS_ERROR', line 95
    ORA-06512: at "SYS." "MAIN$ WORKER", line 6266

    -PL/SQL call stack-
    the line object
    serial number of handle
    14916 package body SYS 3069F2A0. MAIN$ WORKER
    3069F2A0 6293 SYS package body. MAIN$ WORKER
    3069F2A0 11663 SYS package body. MAIN$ WORKER
    3069F2A0 SYS 12429 package body. MAIN$ WORKER
    3069F2A0 11969 SYS package body. MAIN$ WORKER
    3069F2A0 3278 SYS package body. MAIN$ WORKER
    3069F2A0 6882 SYS package body. MAIN$ WORKER
    3069F2A0 1259 SYS package body. MAIN$ WORKER
    2D7B6B4C anonymous block 2
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    short failure message:
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    ...
    ORA-31684: SEQUENCE object type: 'GMT_META '. "' MD_ERRORSEQ ' already exists
    ORA-39083: Type LIBRARY THAT could not create object error:
    ORA-39083: Type as procact_system cannot be created with the object error:
    ORA-39083: Type as procact_system cannot be created with the object error:
    ORA-39126: worker unexpected fatal worker error of $ MAIN. PROCESS_TABLE_EXISTS_ACTION [TABLE: 'IX'.] ["" AQ$ _STREAMS_QUEUE_TABLE_T ']
    ORA-06512: at "SYS." DBMS_SYS_ERROR', line 95
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    in my D:\oracle\product\10.2.0\admin\ias\bdump\alert_ias.log:
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    ...
    WARNING: drop table queue: SYSMAN. Dictionary _MGMT_NOTIFY_QTABLE_T AQ$ does not exist
    WARNING: drop table queue: will try to move the table to the queue and other paintings, IOT, rules, rulesets associated queue table by force
    WARNING: drop_queue_table: no evaluation for the queue table: SYSMAN. AQ$ _MGMT_NOTIFY_QTABLE_T
    WARNING: drop table queue: SYSMAN. Dictionary _MGMT_NOTIFY_QTABLE_H AQ$ does not exist
    WARNING: drop table queue: will try to move the table to the queue and other paintings, IOT, rules, rulesets associated queue table by force
    WARNING: drop_queue_table: no evaluation for the queue table: SYSMAN. AQ$ _MGMT_NOTIFY_QTABLE_H
    WARNING: drop table queue: SYSMAN. Dictionary _MGMT_NOTIFY_QTABLE_G AQ$ does not exist
    WARNING: drop table queue: will try to move the table to the queue and other paintings, IOT, rules, rulesets associated queue table by force
    WARNING: drop_queue_table: no evaluation for the queue table: SYSMAN. AQ$ _MGMT_NOTIFY_QTABLE_G
    WARNING: drop table queue: SYSMAN. Dictionary _MGMT_NOTIFY_QTABLE_I AQ$ does not exist
    WARNING: drop table queue: will try to move the table to the queue and other paintings, IOT, rules, rulesets associated queue table by force
    WARNING: drop_queue_table: no evaluation for the queue table: SYSMAN. AQ$ _MGMT_NOTIFY_QTABLE_I
    WARNING: drop table queue: IX. AQ$ _ORDERS_QUEUETABLE_T dictionary does not exist
    WARNING: drop table queue: will try to move the table to the queue and other paintings, IOT, rules, rulesets associated queue table by force
    WARNING: drop_queue_table: no evaluation for the queue table: IX. AQ$ _ORDERS_QUEUETABLE_T
    WARNING: drop table queue: IX. AQ$ _ORDERS_QUEUETABLE_H dictionary does not exist
    WARNING: drop table queue: will try to move the table to the queue and other paintings, IOT, rules, rulesets associated queue table by force
    WARNING: drop_queue_table: no evaluation for the queue table: IX. AQ$ _ORDERS_QUEUETABLE_H
    WARNING: drop table queue: IX. AQ$ _ORDERS_QUEUETABLE_G dictionary does not exist
    WARNING: drop table queue: will try to move the table to the queue and other paintings, IOT, rules, rulesets associated queue table by force
    WARNING: drop_queue_table: no evaluation for the queue table: IX. AQ$ _ORDERS_QUEUETABLE_G
    WARNING: drop table queue: IX. AQ$ _ORDERS_QUEUETABLE_I dictionary does not exist
    WARNING: drop table queue: will try to move the table to the queue and other paintings, IOT, rules, rulesets associated queue table by force
    WARNING: drop_queue_table: no evaluation for the queue table: IX. AQ$ _ORDERS_QUEUETABLE_I
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    My settings:
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    SQL > select * from v version $;

    BANNER
    ----------------------------------------------------------------
    Oracle Database 10 g Enterprise Edition release 10.2.0.3.0 - production
    PL/SQL version 10.2.0.3.0 - Production
    CORE Production 10.2.0.3.0
    AMT for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    SQL > show parameter recov.
    VALUE OF TYPE NAME
    ------------------------------------ ----------- ------------------------------
    db_recovery_file_dest string D:\oracle\product\10.2.0\flash_recovery_area
    whole large db_recovery_file_dest_size 20G
    recovery_parallelism integer 0
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    SQL > archive logs list;
    Database log mode Archive Mode
    Active AutoArchive
    Destination of archive USE_DB_RECOVERY_FILE_DEST
    More old sequence of journal online 57
    Log sequence archive 59
    Current log sequence 59
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    D:\oracle\product\10.2.0\flash_recovery_area\IAS\ARCHIVELOG\2009_05_26 > dir
    ...
    26.05.2009 18:12 < DIR >.
    26.05.2009 18:12 < DIR >...
    26.05.2009 16:19 2 898 944 O1_MF_1_57_51QV2KC7_. ARC
    26.05.2009 17:15 48 465 408 O1_MF_1_58_51QYD4PG_. ARC
    26.05.2009 18:12 47 736 O1_MF_1_59_51R1QR5C_ 832. ARC
    3 file (s) on 99 101 184 bytes
    2 dir 473 158 713 344 bytes free

    D:\oracle\product\10.2.0\flash_recovery_area\IAS\ARCHIVELOG\2009_05_26 >
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------

    How can I solve this problem? Any suggestions would be very apprecialble.

    Thanks in advance!

    Please mark the rewards points for responses that answered your question.

  • Error ORA-00604/ORA-01422/ORA-06512 on trigger

    Hello

    I have a database of version 10.2.0.3.0 on Enterprise Edition.
    I want to prevent a user from use of a scheme. That's why I wrote a trigger, but I met with an other errors:

    ORA-00604: an error has occurred at the SQL level 1 recursive
    ORA-01422: exact fetch returns more than number of lines
    ORA-06512: at line 5

    Trigger is:
    --------------------

    SQL > create or replace trigger session_access
    2 after logon on database
    3. declare
    4 v_username varchar2 (30);
    VARCHAR2 (30) v_osuser 5.
    6 start
    7 select username, osuser in v_username, v v_osuser $ session;
    8 if v_username = "SUSANJO" v_osuser = 'ORACLE' and then
    9 raise_application_error (-20001, 'Restricted access for this USER');
    10 end if;
    11 end;
    12.

    Trigger created.

    SQL > show errors;
    No errors.
    SQL > connect susanjo
    Enter the password:
    ERROR:
    ORA-00604: an error has occurred at the SQL level 1 recursive
    ORA-01422: exact fetch returns more than number of lines
    ORA-06512: at line 5


    WARNING: You are more connected to ORACLE.

    I have run out of ideas of what to do now on the trigger.

    Kind regards.
    Susan John

    "First: have you checked note of Solomon on ' ADMINISTER DATABASE TRIGGER ' privilege?
    "Second: OSUsers (Unix-) are likely written in lowercase: So" sys_context ('userenv', 'os_user') = "ORACLE'"should perhaps be"sys_context ('userenv', 'os_user') = 'oracle'". "

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

Maybe you are looking for