Commit IMPDP = parameter y?

Hi all

Validation = y in old exp helped me a lot when I have little space allocated to cancel the TS.

I can't believe that it is deprecated in EXPDP? Is this true?

I'll take 100 GB size of discharge and I have only few as 120G disk space. How can I avoid the snapshot too old mistakes?


Thank you very much

Kinz

You started your validation question = y, then you were asked "how much space I allocate to him when it will be imported? It will be multiplied by 2? or 3 times? ", and now you ask on insert and rollback. Please do not mix/mess issue, stay on one, so that we can try our best to give you the right answer.

If you ask how to estimate the size of the dump file, and then use estimate_only = o with expdp command. This indicates that you estimated the size of the export dump. Size real dumpfile will be lower than those reported by the parameter estimate_only. But if you ask how long it will take, I think that its another issue for a new thread. But yes I do not know his answer.

But your question is:

How much space will allocate to him when it will be imported? It will be multiplied by 2? or 3 times?

Then read below thread:
Impdp: = estimated size diagram

For the next issue, please open a new thread. Close this, if you have any other answer continue to question only.

Concerning
Girish Sharma

Tags: Database

Similar Questions

  • compression during import

    I have exported (datapump) oracle 10g DB, which is uncompressed data...
    now I want to import into oracle 11g DB, which should be compress... I have little space... there at - there no way to compress and import (datapump)?

    user10268498 wrote:

    even the precompression of tablespace also not worked

    Of course it won't. But first, it is not the precompression, even that is not 'do the compressed tablespace' Dean said. She does by DEFAULT for any object created in this table space. If you set the tablespace default storage COMPRESS parameter and create a table in this tablespace without specifying explicitly COMPRESS or NOCOMPRESS table will inherit settings COMPRESS the default tablespace default storage. However, if d definition explicitly states NOCOMPRESS it will replace the default tablespace storage parameter COMPRESSES and will not be compressed. And when you export a table all THE attributes of the table are exported. If exported table is not compressed, export dump file contains the table definition which States explicitly NOCOMPRESS and import the dump file will be important table being NOCOMPRESS any default tablespace.
    Now how can solve you this problem. Problem importing with CONTENT = parameter METADATA_ONLY. It will import all the data but will just create all the objects. Then, for each imported (without data) issue table ALTER TABLE tbl COMPRESS. For ALTER INDEX REBUILD COMPRESS ind index number. Keep in mind, not all the clues can be compressed and for indexes partitioned, you may need to delete the index and recreate it as compressed. Now add impdp parameter TABLE_EXISTS_ACTION = APPEND and import. Obviously the import log will have errors like:

    ORA-39152: Table "XXX"."XXX" exists. Data will be appended to existing table
    but all dependent metadata will be skipped due to table_exists_action of append
    

    which can be ignored.

    SY.

  • export database complete 10gr 2 and import to the new installation 11 GR 2

    Hello, I installed a new database a new server to migrate to 10g and 11g.

    I need help, or a caraa step by step on how to export (if need exp or expdp) am confused with both and how to import (imp or impdp)
    "don't forget" the 10grelease2 export and import of 11g release2.
    the servers are on the same network and the file is about 7 GB

    I use OEL 4.5 (10g) and OEL 4.7(11g)

    Thank you. : D

    Consider using the impdp parameter called 'remap_datafile '.

    REMAP_DATAFILE = source_datafile:target_datafile
    Goal+.
    Changes the name of the data source file for the target data file name in all SQL statements where the source data file is referenced: TABLESPACE CREATE, CREATE LIBRARY, and CREATE a DIRECTORY.

    Settings here:
    http://download.Oracle.com/docs/CD/B13789_01/server.101/b10825/dp_import.htm

  • Reg. separated by commas of the values in the Text parameter

    Hello

    I tried to keep a text box parameter to contain multiple values by enabling the option 'field contains values separated by commas. But still, in my report, when I gave multiple values, I got the below error.

    ORA-00909: invalid number of arguments


    I have provided the values as below.

    001IB01141130003, 001IB01141170002


    use also all other special characters?


    Thanks in advance.

    Please try this

    Where (AC. TRN_REF_NO IN (: PM_REF_NO) OR LEAST(:PM_REF_NO) IS NULL)

  • How to use the NVL function to a parameter with comma delimited values

    Gurus,

    It is confusing to me.  I am trying to use the NVL function, but the setting that I'm passing in my cursor contains multiple values with commas.  The NVL function is confused when analyzing the values.

    'Where' cursor clause...

    and nvl (sn.c_attribute1,'x@#$%') in nvl (p_desig,'x@#$%'( )

    translated parameter values...

    and nvl (sn.c_attribute1,'x@#$%') in nvl ('SPRT''GOOD' 'BAD' 'x@#$%') -NVL does not parse the value correctly

    Any idea on how to get NVL recognize 'x@#$%' , if p_desig is null?

    Thank you

    Scott

    HI, Scott.

    Whenever you have a problem, please post a small example data (CREATE TABLE and only relevant columns, INSERT statements) of all the tables involved, so that people who want to help you can recreate the problem and test their ideas.

    Also post the results you want from this data, as well as an explanation of how you get these results from these data, with specific examples.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002#9362002

    My best guess, based on what you posted bone is present, that your problem is discussed in the following:

    http://tkyte.blogspot.com/2006/06/varying-in-lists.html

    http://www.Oracle-base.com/articles/Misc/DynamicInLists.php

  • passing values separated by commas of a single parameter

    Hi experts,

    I am writing a report where I need to pass the values (dates) separated by commas for one parameter in the query.

    parameter passing is 19810928, 19830112



    to do this, I wrote like this

    WITH AS's Data1
    (SELECT TRIM (SUBSTR (txt,
    INSTR (txt, "," 1, LEVEL) + 1.
    INSTR (txt, "," 1, LEVEL + 1)
    -INSTR (txt, "," 1, LEVEL)
    -1
    )
    ) Token.
    FROM (SELECT ',' |: txt |) ',' txt
    THE DOUBLE)
    CONNECTION OF LEVEL < = LENGTH (: txt)-LENGTH (REPLACE (: txt, ",", ")) + 1);

    Select ename, sal, deptno, job, hiredate
    WCP
    where hiredate between (19810928) and (19830112)

    above it is argued IN the list

    can you help me please

    Published by: mbb774 on May 10, 2013 16:07

    mbb774 wrote:
    Sorry, could not help me.

    Well, she would have done if you'd read and understood it. but it doesn't matter.

    SQL> with params as (select '19810928,19830112' as p from dual)
      2  --
      3  -- end of simulated parameters
      4  --
      5  select ename, deptno, sal, job, hiredate
      6  from   emp
      7        ,(select regexp_substr(p,'[^,]+',1,1) as start_date
      8                ,regexp_substr(p,'[^,]+',1,2) as end_date
      9          from params) p
     10  where  hiredate between to_date(p.start_date,'YYYYMMDD') and to_date(p.end_date,'YYYYMMDD')
     11  /
    
    ENAME          DEPTNO        SAL JOB       HIREDATE
    ---------- ---------- ---------- --------- --------------------
    MARTIN             30       1250 SALESMAN  28-SEP-1981 00:00:00
    KING               10       5000 PRESIDENT 17-NOV-1981 00:00:00
    JAMES              30        950 CLERK     03-DEC-1981 00:00:00
    FORD               20       3000 ANALYST   03-DEC-1981 00:00:00
    MILLER             10       1300 CLERK     23-JAN-1982 00:00:00
    
    SQL>
    
  • Using 'text field contains comma-separated values' on a parameter of %

    Hello

    I use a parameter that has more than one value to be entered, separated by commas. I checked the box 'text field contains values separated by commas' for the parameter and set the sql code by using the operator 'in' so that the column will look in the multiple input values (e.g. family name in (: surname_par)). However, as passing multiple values parameter must also be able to manage %'s. As the sql uses the 'in' operator, BI Publisher brings back an error because % is supposed to bring all family names and not people with a last name of %. Is there a way to get around this?

    Thank you

    If you try to pass multiple values separated by commas and in addition also takes the query to return the data when the user types just in '%', then you could write something like this in your query:

    Select * from table_name
    where ((1 = DECODE (: surname_par, '%', 1, 0)) OR family name in (: surname_par))

    I hope this helps. Please award points if helpful/correct.

  • Impdp sqlfile parameter

    Hello

    OPERATING SYSTEM: HP - UX
    Oracle10g

    My production dba team sent me a sqlfile comprising 30K tables. They used sqlfile = parameter to get the DDL of the tables. I need to create the same DDL commands on my dev database.

    My thought is rather than generate the ddl sqlfile orders and recreate all the ddl in the dev environment.
    Why not to use the command to create structures of table below...

    leader lines = abc.dmp user/pwd = n = aabb log patterns exp = abc.log

    Would not be in the above given command creates all the structures of table (DDL)?

    They are right for which one needs the sqlfile parameter take all DDLS and manually create?

    Also pls inform me the importance of the sqlfile parameter in expdp/impdp...


    Thank you
    KSG

    Published by: KSG on March 25, 2010 10:51

    My understanding is... After you run the impdp command, a sqlfile will be generated which contains the dumpfile DDL commands relavent. I'm good with that?

    Yes. It is somewhat similar to show = Yes command in imp

    And I want to run the script to create the DDL...

    Another is my doubt...

    It's a hard way to create all the DDL by using the sql script file?

    Why should I not go and take an export of all the table structure to help

    expdp user/pwd file = dumpfile.dmp lines = n = abc log owner = dumpfile.log

    and just import the dumpfile.dmp... Woundn can't create this all the DDL as long as same as the generation of the sqlfile script?

    It depends on the rquirement. lets see you want to exclude a few tables full dump for the creation of the structure, sqlfile will come handy.
    not sure what all the objects in your dump file are made up and you want to see the content (objects) of the dump file, instead of imporing to the database and check then you will be able to access it without actually importing. You can use lines = n only when you are sure and import the entire structure of the objects.

    Anil Malkai

  • Value of the parameter contains the comma (,) as a parameter in IR

    Hello

    I'm passing parameters in a link to the column in the interactive report.
    say for exp-
    f?p=&APP_ID.:1:&SESSION.::&DEBUG.::P1_ITEM1,P1_ITEM2:#ITEM1#,#ITEM2#
    The value of P1_ITEM2 now contains a comma (,)... So, how to solve what we use comma as a separator of our passing point name and value element in the URL


    Thank you
    Deepak

    Hello

    This might help
    Transfer of data via a URL

    Or the primary key value and then go get that using other values for example calculations in the page target

    BR, Jari

  • IMPDP - Table not found

    Hello

    I am trying to import a specific table. I tried to use the schema name directly and also '------as sysdba "in utility impdp. Both are giving the same error as shown below,

    ORA-39002: invalid operation

    ORA-39166: object not found Schemaname.OBJECT_LINKS.

    Impdp name username/password DIRECTORY = EXP_IMP_EM = dumpfile * .dmp logfile = import_160216.log tables = OBJECT_LINKS content = data_only table_exists_action = truncate (or)

    Impdp------"/ ACE sysdba\ ' DIRECTORY = EXP_IMP_EM = dumpfile * .dmp logfile = import_160216.log tables = schemaname. Content OBJECT_LINKS = data_only table_exists_action = truncate

    Above are the instructions that I used, in both cases that the table is not found. But I checked and the table exists. I don't understand the problem. Could someone help me on this please?

    > The dump file has details on objects SCHEMA1 and with this file I want to import a particular table in SCHEMA2. Below the synatx used,

    >

    > impdp/password system DIRECTORY = EXP_IMP_EM = dumpfile * .dmp logfile = import_160216.log tables = SCHEMA2.object_links content = data_only table_exists_action = truncate master_only = y job_name = master

    If the dumpfile has schema1 and schema2 want, then you have to a remap_schema = schema1:schema2

    The above-mentioned remap table will not work.  You can't remap a pattern with a remap_table parameter.

    > Now the select object_schema of the query, object_name of the master where object_type IN ('TABLE', 'TABLE_DATA') and object_name = "OBJECT_LINKS" give inferior results

    >

    > OBJECT_SCHEMA OBJECT_NAME
    > SCHEMA2 OBJECT_LINKS
    > SCHEMA1 OBJECT_LINKS
    > SCHEMA1 OBJECT_LINKS
    > SCHEMA1 OBJECT_LINKS

    I would have had you add more than a few columns to the query.

    Select parameter type_objet, object_schema, processing_state, processing_status of the master where object_type IN ('TABLE', 'TABLE_DATA') and object_name = 'OBJECT_LINKS' and process_order > 0 and duplicate = 0;

    You can post the modified query results?

    Thank you

    Dean

  • User header imported successfully, Impdp import the same user has: b getting object exists error

    Hello

    My scenario

    In our database of prod, we have user A that I recently imported A user in the Test database

    Now I need to import user A user B in the same Test database but get error object exists

    ORA-39151: Table "A.Table_Name" exists

    ORA-31684: Procedure 'A.Proc_Name' exists

    My impdp syntax is the following:

    Impdp USERID =------"/ ACE sysdba\ ' DIRECTORY = DATA_PUMP_DIR DUMPFILE = A.dmp EXCLUDE = USER LOGFILE = A_TO_B_imp.log

    REMAP_SCHEMA = A: B

    REMAP_TABLESPACE = USERS: B

    I thought that this was caused by the fact that the two user B in the database Test with same Tablespace by default, so I created a different tablespace for user B and provided remap tablespace parameter but still getting the same error.

    Please notify.

    Hello

    Seems for some reason any your part of remap_schema is not recognized.

    In the beginning of the impdp log, you should see the command it uses,

    Can you confirm the exact order impdp journal tries to run.

    Also run the impdp since the user of the system.

  • Procedure with dynamic parameter

    Hello

    Database version: 11.2.0.2

    create table emp
     (id  number,
     name  varchar2(100),
     dept  number,
     sal  number,
     address  varchar2(100));
    

    insert into emp values (1,'abc',10,1000,'a avenue');
     insert into emp values (2,'def',20,1000,'b avenue');
     insert into emp values (3,'ghi',30,1000,'c avenue');
     insert into emp values (4,'jkl',10,1000,'d avenue');
     insert into emp values (5,'mno',40,1000,'d avenue');
     insert into emp values (6,'xyz',50,1000,'e avenue');
     commit;
    

    I need assistance with a procedure. Here are the requirements.

    (i) the user can input parameter value for 'EMPLOYEE' as a NUMBER, or a VARCHAR. For example 1 or 'ABC '.
    (II) based on the input value, the procedure should return the desired folder. For example

    select * from emp where id=1 or select * from emp where name like 'abc'

    (III) all columns can be used as parameters to pass values for example CREATE PROCEDURE p_emp (OFFICIAL, DEPARTMENT, SALARY, ADDRESS, FILTER)
    (IV) not succeeded a few values of some parameters is acceptable for example exec p_emp('',10,1000,'')
    (v) output (OUT) should be a table format (I think that maybe SYS_REFCURSOR can be used) for example

    1 ABC 10 1000 A Avenue
    4 JKL 10 1000 D Avenue

    (VI) result (OUT) can be controlled by ROWNUMBER for example.

    select * from emp where rownum between 1 and 3

    If none is specified, then first 2000 records are represented.
    (VII) an additional parameter (FILTER) must determine what output result should look like. For example. If 1 then went only to show ID, NAME, if 2 is passed to see the ID and ADDRESS etc.

    Your help is highly appreciated

    Post edited by: saam001 changes after sol.beach response. Capital letters has dropped and added the version of database

    Personally, I avoid THE parameters, so rather have it as a function that returns a sys_refcursor...

    SQL > create or replace function get_emp (empno emp.empno%type: = null)
    2, ename emp.ename%type: = null
    3, emp.job%type job: = null
    4, Bishop emp.mgr%type: = null
    5, hiredate emp.hiredate%type: = null
    6, sal emp.sal%type: = null
    7, comm emp.comm%type: = null
    8, deptno emp.deptno%type: = null
    9, number of rows: = 2000
    sys_refcursor 10 return) is
    11 r sys_refcursor;
    12 start
    13 r opened for Bishop, employment ename, empno select hiredate, sal, comm, deptno
    14 from (select ename, empno, mgr, hiredate, sal, comm, deptno
    15, row_number() over (order 1): the nurse
    16 of the emp
    17 where empno = nvl (get_emp.empno, empno)
    18 and ename = nvl (get_emp.ename, ename)
    19 and work = nvl (get_emp.job, employment)


    20 and mgr = nvl (get_emp.mgr, mgr)
    21 and hiredate = nvl (get_emp.hiredate, hiredate)
    22 and sal = nvl (get_emp.sal, sal)
    23 and (comm = nvl (get_emp.comm, comm) or (get_emp.comm is null and comm is null))
    24 and deptno = nvl (get_emp.deptno, deptno)
    25                    )
    where the 26 rn<=>
    27 return r;
    28 end;
    29.

    The function is created.

    SQL > e var refcursor;
    SQL > exec: e: = get_emp (deptno-online 10, lines-online 2);

    PL/SQL procedure successfully completed.

    SQL > print;

    EMPNO, ENAME, JOB HIREDATE DEPTNO COMM SAL MGR
    ---------- ---------- --------- ---------- -------------------- ---------- ---------- ----------
    7782 CLARK MANAGER 7839 9 JUNE 1981 00:00:00 2450 10
    7934 MILLER CLERK 7782 23 JANUARY 1982 00:00:00 1300 10

    SQL > exec: e: = get_emp (mgr-online 7839).

    PL/SQL procedure successfully completed.

    SQL > print;

    EMPNO, ENAME, JOB HIREDATE DEPTNO COMM SAL MGR
    ---------- ---------- --------- ---------- -------------------- ---------- ---------- ----------
    7566 JONES MANAGER 7839 2 APRIL 1981 00:00:00 2975 20
    7698 BLAKE MANAGER 7839 1 MAY 1981 00:00:00 2850 1000 30
    7782 CLARK MANAGER 7839 9 JUNE 1981 00:00:00 2450 10

  • In passing the huge parameter to oracle procedure have a performance hit?

    I have a script attached, in which I am trying process/XML parsing in a table (STAGE_TBL) in the XMLTYPE column and insert the data analyzed in another table (PROCESSED_DATA_TBL). The XML file can be huge up to 2MB, which translates into approximately 2000 + lines of analyzed data. The issue I see is when I pass an XML object to a procedure (STAGE_TBL_PROCESS) to analyze its takes about 10 seconds per XML, but rather than from XML if I directly pick up table in the procedure (STAGE_TBL_PROCESS) passing the ID to be about 0.15 seconds. According to the document while params are passed by reference, so why is this variation of performance?

    Details of database Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64-bit version of PL/SQL Production 11.2.0.3.0 - Production "CORE 11.2.0.3.0 Production" TNS for Linux: Version 11.2.0.3.0 - Production NLSRTL Version 11.2.0.3.0 - Production

    Note: I could not perform SQL_TRACE or DBMS_STATS as I don't have access to them.

    /*
    This one is taking .15 seconds to process an XML with about 2000 rp_sendRow elements
    */

    DECLARE
     
    CURSOR NewStage IS
      
    SELECT *
      
    FROM STAGE_TBL
      
    WHERE  status = 'N'
      
    ORDER BY PUT_TIME ASC;
      SUBTYPE rt_NewStage
    IS NewStage % rowtype;

      ROW_COUNT INTEGER
    := 0;   -- Return value from calling the procedure
      READ_COUNT INTEGER
    := 0;   -- Number of rows read from the stage table
      INSERT_COUNT_TOTAL INTEGER
    := 0;   -- Number of Inserts Inven records
      ERROR_COUNT INTEGER
    := 0;   -- Number of Inven inserts that did inserted more then 1 row in Inven
      PROCESS_STATUS STATUS
    .MmsStatus;
      STATUS_DESCRIPTION STATUS
    .MmsStatusReason;
      ERRMSG VARCHAR2
    (500);

    PROCEDURE STAGE_TBL_PROCESS (IDDATA IN RAW, PROCESS_STATUS OUT VARCHAR2, STATUS_DESCRIPTION OUT VARCHAR2, ROW_COUNT OUT NUMBER) AS
    /*
      This procedure is to parse the XML from STAGE_TBL and populate the data from XML to PROCESSED_DATA_TBL table

      IN PARAMS
      ----------
      IDDATA - ID from STAGE_TBL
      xData - XMLType field from XML_DOCUMENT of STAGE_TBL

      OUT PARAMS
      -----------
      PROCESS_STATUS - The STATUS of parsing and populating PROCESSED_DATA_TBL
      STATUS_DESCRIPTION - The description of the STATUS of parsing and populating PROCESSED_DATA_TBL
      ROW_COUNT - Number of rows inserted into PROCESSED_DATA_TBL
    */

    BEGIN
      
    INSERT ALL INTO PROCESSED_DATA_TBL 
      
    (PD_ID, 
      STORE
    , 
      SALES_NBR
    , 
      UNIT_COST
    , 
      ST_FLAG
    , 
      ST_DATE
    , 
      ST
    , 
      START_QTY
    , 
      START_VALUE
    , 
      START_ON_ORDER
    , 
      HAND
    , 
      ORDERED
    , 
      COMMITED
    , 
      SALES
    , 
      RECEIVE
    , 
      VALUED
    , 
      ID_1
    , 
      ID_2
    , 
      ID_3
    , 
      UNIT_PRICE
    , 
      EFFECTIVE_DATE
    , 
      STATUS
    , 
      STATUS_DATE
    , 
      STATUS_REASON
    ) 
      
    VALUES (IDDATA 
      
    ,store 
      
    ,SalesNo 
      
    ,UnitCost 
      
    ,StWac 
      
    ,StDt 
      
    ,St 
      
    ,StartQty 
      
    ,StartValue 
      
    ,StartOnOrder 
      
    ,Hand 
      
    ,Ordered 
      
    ,COMMITED 
      
    ,Sales 
      
    ,Rec 
      
    ,Valued 
      
    ,Id1 
      
    ,Id2 
      
    ,Id3 
      
    ,UnitPrice 
      
    ,to_Date(EffectiveDate||' '||EffectiveTime, 'YYYY-MM-DD HH24:MI:SS') 
      
    ,'N'  
      
    ,SYSDATE 
      
    ,'XML PROCESS INSERT')  
      
    WITH T AS
      
    ( SELECT STG.XML_DOCUMENT FROM STAGE_TBL STG WHERE STG.ID = IDDATA)  
    -- This is to parse and fetch the data from XML 
      
    SELECT E.* FROM T, XMLTABLE('rp_send/rp_sendRow' PASSING T.XML_DOCUMENT COLUMNS
      store VARCHAR
    (20) PATH 'store'  
      
    ,SalesNo VARCHAR(20) PATH 'sales' 
      
    ,UnitCost NUMBER PATH 'cost' 
      
    ,StWac VARCHAR(20) PATH 'flag' 
      
    ,StDt DATE PATH 'st-dt' 
      
    ,St NUMBER PATH 'st' 
      
    ,StartQty NUMBER PATH 'qty' 
      
    ,StartValue NUMBER PATH 'value' 
      
    ,StartOnOrder NUMBER PATH 'start-on-order' 
      
    ,Hand NUMBER PATH 'hand' 
      
    ,Ordered NUMBER PATH 'order' 
      
    ,Commited NUMBER PATH 'commit' 
      
    ,Sales NUMBER PATH 'sales' 
      
    ,Rec NUMBER PATH 'rec' 
      
    ,Valued NUMBER PATH 'val' 
      
    ,Id1 VARCHAR(30) PATH 'id-1' 
      
    ,Id2 VARCHAR(30) PATH 'id-2' 
      
    ,Id3 VARCHAR(30) PATH 'id-3' 
      
    ,UnitPrice NUMBER PATH 'unit-pr' 
      
    ,EffectiveDate VARCHAR(30) PATH 'eff-dt' 
      
    ,EffectiveTime VARCHAR(30) PATH 'eff-tm' 
      
    ) E;  
      ROW_COUNT 
    := SQL%ROWCOUNT;  -- Not the # of all the rows inserted.
      PROCESS_STATUS 
    := STATUS.PROCESSED;
      
    IF ROW_COUNT < 1 THEN   -- The insert failed Row Count = 0 No exception thrown
      PROCESS_STATUS 
    := STATUS.ERROR;
      STATUS_DESCRIPTION 
    := 'ERROR Did not insert into Pos Inventory. Reason Unknown';
      
    END IF;
      EXCEPTION
      
    WHEN OTHERS THEN
      ROW_COUNT 
    := 0;
      PROCESS_STATUS 
    := STATUS.ERROR;
      STATUS_DESCRIPTION 
    := 'SqlCode:' || SQLCODE || ' SqlErrMsg:' || SQLERRM;
    END;


    BEGIN
      DBMS_OUTPUT
    .enable(NULL);
     
    FOR A_NewStage IN NewStage
      LOOP
      READ_COUNT
    := READ_COUNT + 1;
      STAGE_TBL_PROCESS
    (A_NewStage.ID, PROCESS_STATUS, STATUS_DESCRIPTION, ROW_COUNT);
      INSERT_COUNT_TOTAL
    := INSERT_COUNT_TOTAL + ROW_COUNT;
      
    IF(ROW_COUNT <= 0 OR PROCESS_STATUS = STATUS.ERROR) THEN
      ERROR_COUNT
    := ERROR_COUNT + 1;
      
    UPDATE STAGE_TBL
      
    SET status  = PROCESS_STATUS,
      status_DATE 
    = SYSDATE,
      status_DESCRIPTION 
    = STATUS_DESCRIPTION
      
    WHERE ID  = A_NewStage.ID;
      
    ELSE
      
    UPDATE STAGE_TBL
      
    SET status  = PROCESS_STATUS,
      status_DATE 
    = SYSDATE,
      status_DESCRIPTION 
    = STATUS_DESCRIPTION,
      SHRED_DT 
    = SYSDATE
      
    WHERE ID  = A_NewStage.ID;
      
    END IF;
      
    COMMIT;
     
    END LOOP;
     
    COMMIT;
     
    IF ERROR_COUNT > 0 THEN
      ERRMSG
    := '** ERROR: ' || ERROR_COUNT || ' Stage records did not insert in to the Processed table correctly';
      RAISE_APPLICATION_ERROR
    (-20001,ErrMsg); 
     
    END IF;
      EXCEPTION
      
    WHEN OTHERS THEN
      RAISE
    ;
    END ;

    /*
    This one is taking 10 seconds to process an XML with about 2000 rp_sendRow elements
    */

    DECLARE
     
    CURSOR NewStage IS
      
    SELECT *
      
    FROM STAGE_TBL
      
    WHERE  status = 'N'
      
    ORDER BY PUT_TIME ASC;
      SUBTYPE rt_NewStage
    IS NewStage % rowtype;

      ROW_COUNT INTEGER
    := 0;   -- Return value from calling the procedure
      READ_COUNT INTEGER
    := 0;   -- Number of rows read from the stage table
      INSERT_COUNT_TOTAL INTEGER
    := 0;   -- Number of Inserts Inven records
      ERROR_COUNT INTEGER
    := 0;   -- Number of Inven inserts that did inserted more then 1 row in Inven
      PROCESS_STATUS STATUS
    .MmsStatus;
      STATUS_DESCRIPTION STATUS
    .MmsStatusReason;
      ERRMSG VARCHAR2
    (500);

    PROCEDURE STAGE_TBL_PROCESS (IDDATA IN RAW, xData IN STAGE_TBL.XML_DOCUMENT%TYPE, PROCESS_STATUS OUT VARCHAR2, STATUS_DESCRIPTION OUT VARCHAR2, ROW_COUNT OUT NUMBER) AS
    /*
      This procedure is to parse the XML from STAGE_TBL and populate the data from XML to PROCESSED_DATA_TBL table

      IN PARAMS
      ----------
      IDDATA - ID from STAGE_TBL
      xData - XMLType field from XML_DOCUMENT of STAGE_TBL

      OUT PARAMS
      -----------
      PROCESS_STATUS - The STATUS of parsing and populating PROCESSED_DATA_TBL
      STATUS_DESCRIPTION - The description of the STATUS of parsing and populating PROCESSED_DATA_TBL
      ROW_COUNT - Number of rows inserted into PROCESSED_DATA_TBL
    */

    BEGIN
      
    INSERT ALL INTO PROCESSED_DATA_TBL 
      
    (PD_ID, 
      STORE
    , 
      SALES_NBR
    , 
      UNIT_COST
    , 
      ST_FLAG
    , 
      ST_DATE
    , 
      ST
    , 
      START_QTY
    , 
      START_VALUE
    , 
      START_ON_ORDER
    , 
      HAND
    , 
      ORDERED
    , 
      COMMITED
    , 
      SALES
    , 
      RECEIVE
    , 
      VALUED
    , 
      ID_1
    , 
      ID_2
    , 
      ID_3
    , 
      UNIT_PRICE
    , 
      EFFECTIVE_DATE
    , 
      STATUS
    , 
      STATUS_DATE
    , 
      STATUS_REASON
    ) 
      
    VALUES (IDDATA 
      
    ,store 
      
    ,SalesNo 
      
    ,UnitCost 
      
    ,StWac 
      
    ,StDt 
      
    ,St 
      
    ,StartQty 
      
    ,StartValue 
      
    ,StartOnOrder 
      
    ,Hand 
      
    ,Ordered 
      
    ,COMMITED 
      
    ,Sales 
      
    ,Rec 
      
    ,Valued 
      
    ,Id1 
      
    ,Id2 
      
    ,Id3 
      
    ,UnitPrice 
      
    ,to_Date(EffectiveDate||' '||EffectiveTime, 'YYYY-MM-DD HH24:MI:SS') 
      
    ,'N'  
      
    ,SYSDATE 
      
    ,'XML PROCESS INSERT')  
    -- This is to parse and fetch the data from XML 
      
    SELECT E.* FROM XMLTABLE('rp_send/rp_sendRow' PASSING xDATA COLUMNS
      store VARCHAR
    (20) PATH 'store'  
      
    ,SalesNo VARCHAR(20) PATH 'sales' 
      
    ,UnitCost NUMBER PATH 'cost' 
      
    ,StWac VARCHAR(20) PATH 'flag' 
      
    ,StDt DATE PATH 'st-dt' 
      
    ,St NUMBER PATH 'st' 
      
    ,StartQty NUMBER PATH 'qty' 
      
    ,StartValue NUMBER PATH 'value' 
      
    ,StartOnOrder NUMBER PATH 'start-on-order' 
      
    ,Hand NUMBER PATH 'hand' 
      
    ,Ordered NUMBER PATH 'order' 
      
    ,Commited NUMBER PATH 'commit' 
      
    ,Sales NUMBER PATH 'sales' 
      
    ,Rec NUMBER PATH 'rec' 
      
    ,Valued NUMBER PATH 'val' 
      
    ,Id1 VARCHAR(30) PATH 'id-1' 
      
    ,Id2 VARCHAR(30) PATH 'id-2' 
      
    ,Id3 VARCHAR(30) PATH 'id-3' 
      
    ,UnitPrice NUMBER PATH 'unit-pr' 
      
    ,EffectiveDate VARCHAR(30) PATH 'eff-dt' 
      
    ,EffectiveTime VARCHAR(30) PATH 'eff-tm' 
      
    ) E;  
      ROW_COUNT 
    := SQL%ROWCOUNT;  -- Not the # of all the rows inserted.
      PROCESS_STATUS 
    := STATUS.PROCESSED;
      
    IF ROW_COUNT < 1 THEN   -- The insert failed Row Count = 0 No exception thrown
      PROCESS_STATUS 
    := STATUS.ERROR;
      STATUS_DESCRIPTION 
    := 'ERROR Did not insert into Pos Inventory. Reason Unknown';
      
    END IF;
      EXCEPTION
      
    WHEN OTHERS THEN
      ROW_COUNT 
    := 0;
      PROCESS_STATUS 
    := STATUS.ERROR;
      STATUS_DESCRIPTION 
    := 'SqlCode:' || SQLCODE || ' SqlErrMsg:' || SQLERRM;
    END;


    BEGIN
      DBMS_OUTPUT
    .enable(NULL);
     
    FOR A_NewStage IN NewStage
      LOOP
      READ_COUNT
    := READ_COUNT + 1;
      STAGE_TBL_PROCESS
    (A_NewStage.ID, A_NewStage.XML_DOCUMENT, PROCESS_STATUS, STATUS_DESCRIPTION, ROW_COUNT);
      INSERT_COUNT_TOTAL
    := INSERT_COUNT_TOTAL + ROW_COUNT;
      
    IF(ROW_COUNT <= 0 OR PROCESS_STATUS = STATUS.ERROR) THEN
      ERROR_COUNT
    := ERROR_COUNT + 1;
      
    UPDATE STAGE_TBL
      
    SET status  = PROCESS_STATUS,
      status_DATE 
    = SYSDATE,
      status_DESCRIPTION 
    = STATUS_DESCRIPTION
      
    WHERE ID  = A_NewStage.ID;
      
    ELSE
      
    UPDATE STAGE_TBL
      
    SET status  = PROCESS_STATUS,
      status_DATE 
    = SYSDATE,
      status_DESCRIPTION 
    = STATUS_DESCRIPTION,
      SHRED_DT 
    = SYSDATE
      
    WHERE ID  = A_NewStage.ID;
      
    END IF;
      
    COMMIT;
     
    END LOOP;
     
    COMMIT;
     
    IF ERROR_COUNT > 0 THEN
      ERRMSG
    := '** ERROR: ' || ERROR_COUNT || ' Stage records did not insert in to the Processed table correctly';
      RAISE_APPLICATION_ERROR
    (-20001,ErrMsg); 
     
    END IF;
      EXCEPTION
      
    WHEN OTHERS THEN
      RAISE
    ;
    END ;

    My
    XML with just one rp_sendRow element, it can go upto 2000 rp_sendRow elements
    <?xml version = \"1.0\" encoding = \"UTF-8\"?> 
    <rp_send xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"> 
      
    <rp_sendRow> 
      
    <store>0123</store> 
      
    <sales>022399190</sales> 
      
    <cost>0.01</cost> 
      
    <flag>true</flag> 
      
    <st-dt>2013-04-19</st-dt> 
      
    <st>146.51</st> 
      
    <qty>13.0</qty> 
      
    <value>0.0</value> 
      
    <start-on-order>0.0</start-on-order> 
      
    <hand>0.0</hand> 
      
    <order>0.0</order> 
      
    <commit>0.0</commit> 
      
    <sales>0.0</sales> 
      
    <rec>0.0</rec> 
      
    <val>0.0</val> 
      
    <id-1/> 
      
    <id-2/> 
      
    <id-3/> 
      
    <unit-pr>13.0</unit-pr> 
      
    <eff-dt>2015-06-16</eff-dt> 
      
    <eff-tm>09:12:21</eff-tm> 
      
    </rp_sendRow> 
    </rp_send> 

    The issue I see is when I pass an XML object to a procedure (STAGE_TBL_PROCESS) to analyze its takes about 10 seconds per XML, but rather than from XML if I directly pick up table in the procedure (STAGE_TBL_PROCESS) passing the ID to be about 0.15 seconds.

    In version 11.1, Oracle introduced a new model of storage for the data type XMLType called XML binary.

    Binary XML become the default in 11.2.0.2, to disparage the old storage based on CLOB.

    Binary XML is a format optimized after analysis for the storage and treatment of the XQuery.

    When an XQuery expression is evaluated (through for example XMLTABLE) on an XMLType column stored as binary XML, Oracle can use an ongoing evaluation of XPath that surpasses the query even crushed a transitional XMLType of several order of magnitude.

    You can see that in the action plan of the explain command:

    SQL> SELECT E.*
      2  FROM stage_tbl t
      3     , XMLTABLE('rp_send/rp_sendRow' PASSING t.xml_document
      4         COLUMNS store VARCHAR(20) PATH 'store'
      5               , SalesNo VARCHAR(20) PATH 'sales'
      6               , UnitCost NUMBER PATH 'cost'
      7         ) E ;
    
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 1134903869
    
    --------------------------------------------------------------------------------
    | Id  | Operation          | Name      | Rows  | Bytes | Cost (%CPU)| Time     |
    --------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT   |           |     1 |  2008 |    32   (0)| 00:00:01 |
    |   1 |  NESTED LOOPS      |           |     1 |  2008 |    32   (0)| 00:00:01 |
    |   2 |   TABLE ACCESS FULL| STAGE_TBL |     1 |  2002 |     3   (0)| 00:00:01 |
    |   3 |   XPATH EVALUATION |           |       |       |            |          |
    --------------------------------------------------------------------------------
    

    When the query is executed on a passenger XMLType (for example, a parameter, or a PL/SQL variable), Oracle cannot run the binary model and use a functional assessment based on memory of the XML DOM-like representation.

    You can see that in the plan to explain it by spoting a 'COLLECTION ITERATOR PICKLER FETCH' operation.

    So what explains the difference (in your version) between treatment from a column of XMLType (stored in binary XML format) or a variable or a parameter.

    From 11.2.0.4 and beyond, things have changed a bit with Oracle, introducing a new transitional level of optimization on XMLType.

    The plan of the explain command will show a "XMLTABLE ASSESSMENT' in this case.

  • file system to archive &amp; impdp

    After the upgrade of a database of GR 11, 2 to 12cR1 (12.1.0.2), I noticed that whenever I run impdpd to import data, the journal file system archive fills up very fast and consumes the whole file system which stops the impdp treat.

    one of the solutions, I discovered is the stop of the database and run it in "no archive log", then I re - run impdp again.

    any suggestions?

    I don't think that the upgrade of your database has a relationship with your problem you have described. one of the things you need to do is to increase the size of your file system of the journal of the archives.

    Also, a new parameter introduced in release 12 c "transform = disable_archive_logging:y" use it in your impdp command (archives less will be generated and its more quickly by importing data).

    I hope this helps.

  • How to switch the input of command in the DAL script parameter

    Hello guys,.

    I want to pass the name to extract xml (one of the input for the batch of documaker parameter) to one of my trigger DAL.

    I plan to use the Ext2GVM function for this. I need to know the syntax of the following parameters:

    Say-exporter variable XMLNAME am for the batch.


    (1) what should be of syntax for the AFGJOB file

    Is this correct-> ; Ext2Gvm; 2; ParameterName = ~ GETENV XMLNAME ;

    (2) what should be my entry in the trndfdfl. DFD

    Is this correct->

    < FIELD: parametername>

    EXT_LENGTH = 21

    EXT_TYPE = CHAR_ARRAY_NO_NULL_TERM

    INT_LENGTH = 20

    INT_TYPE = CHAR_ARRAY

    KEY = O

    REQUIRED = Y

    FIELDNAME = parametername


    (3) is it necessary to go into details as < Trn_Fields > in the ini files?

    If so, please help me with sytnax


    (4) final, how can I call this variable in the script DAL ?

    Is this-> OK

    Metafilename = GVM ('parametername')


    Thank you


    I reformulerai what I think you do.

    You have a file name that you want to reference it in a script DAL. This file is NOT the snippet file should be able to use in the creation and mapping of your transactional data, but a few additional files that you expect to process directly from DAL.

    If this is correct, two possibilities come to mind.

    1. assuming it's a file that you can copy using your linux script, copy the file to a consistent name. Your script DAL can then use the code name hard you still copied.

    2. a method that does not have a copy of the file would require that you create an environment variable of the linux script that contains the name of the file passed. In your INI, you must define your own INI, something like this:

    Filename = ~ GetEnv MyExternalFile

    The DAL script would do this to get the name:

    xmlFileName = GetINIString ("MyINIGroup", "Filename");

    When DAL is requesting the INI value, see the logic underlying the ~ GetEnv which is a built-in function to get the environment variable named following. So if you have assigned your script linux environment variables, the name going through now and DAL has a way to get it.

    (Note there is no magic in the name of the INI option or group or the name of variable environment you choose to use.) The magic is to use the ~ GetEnv to retrieve the value of the environment when the option is requested.)

    Second note, the GetINIString function has an optional first parameter to name a context INI. In this case, I do not pretend that you use this setting. Just include a comma to indicate that the first parameter is omitted.)

Maybe you are looking for

  • Computer has two users &amp; I want to give both users access to Firefox but don't know how

    Hello. Auto & woman on computer (W7) and two of us log in with password to access mail etc. There is NO problem of privacy.So we have 2 separate workstations on the computer, BUT the start of Mozilla button shows only when I am logged in as a user.Th

  • How to configure and use canned responses

    I don't know how to create a canned response. I'm not sure I know how to contact to a message even if I knew how to create

  • Wie kann ich die Systemfotomediathek neu zuordnen?

    El Capitan takes die erste angelegte Foto-Meidathek als Systemfotomediathek-und das lasst sich offenbar nicht mehr hand- Oder doch? Wie kann ich das selbst bestimmen oder q? Wie man looks, ist das fragliche non accessible Menu:

  • photomart 5520: cannot delete a print job from Quebec City

    I noticed that my printer was not print projects. I opened the Quebec and discovered that a draft that I sent to print two nights ago was still in Quebec and had not been printed. I deleted all of the projects that have been sent to the printer today

  • Construction of an executable

    I am trying to build an executable for my project, but when I right click on the mouse on the new source distribution and construction specifications is the only option that is displayed for selection. I know there are supposed to be more options (ie