DML operations improves perfomance on a Partioned Table?

Hi
We have a simple table (non-partitioned) and we do normal DML operations on it. If we convert that table into 5 partitions then does DML performance improves on it by 5times? To be very specific will READ and WRITES on table will improve? if YES than to which extent. *(considering Table size in TB)*. DB is 11g R2.
Regards
Edited by: 905133 on Dec 29, 2011 10:08 PM
Edited by: 905133 on Dec 29, 2011 10:33 PM

CKLP,
I populated a table in my test environment called test with 10 columns and 7 million records.
its structure is
col1..col5 are of data type number and are locally indexed
col6..col 9 are of data type number (not indexed)
col 10 is of  data type Date
table is partitioned on col10 by Range. (7 partition for a week (1 partition/day), 1million records in a partition)
when i inserted 7 million records (i.e one million record/partition). Avg insertion time/partition was 7.5 min. (I inserted records individually in a partition)
Then I created another table test2 with same no. of columns Indexed and equal amount of records. But increased the no. of partitions. 4 partitions/day 28 partitions for week
When I inserted 7 million records (one million records/ 4 partitions), Avg insertion Time was 7.1 min. (I inserted records individually in these 4 partition at a single time)
Insert into test values(...) format was used. and now i know Parallelism can't be used on this format.
So the point to discuss here is "why did not I achieve a better Insertion Time when i divided a daily partition to 4 partition per day". OR " How can i improve insertion time in such scenarios"
Oracle DB 11g R2, OS Linux 5, Sun Server x4200 with shared storage.

Similar Messages

  • How to know which DML operation is taking place on a table within a procedu

    Hii all,
    My DB Version
    SQL> select *
      2  from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for Solaris: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - ProductionHow to find what DML Operation is taking place on a particular table within a procedure??
    For suppose I've the below procedure
    create table r_dummy
    name varchar2(4000),
    emp_id number
    Create or replace procedure r_dummy_proc
    p_name          in     varchar2,
    p_emp_id     in     number
    is
    Begin
              Update r_dummy
              set name = p_name
              where emp_id = p_emp_id;
              if sql%rowcount > 1 then
                   dbms_output.put_line('Successfully updated employee name');
              end if;
    End;Here from the code I can identify that an update operation is taking place on table 'R_DUMMY'
    But how to find that without actually viewing the code?? I've hundreds of procedures in my DB and would like to find what DML is taking place on which table and in which procedure.
    Please help with some suggestions.

    And here is the solution
    with t as
      select distinct name,type,text,line
      from user_source s
      where regexp_like(s.text,'cp_ca_dtls','i')
    x as
      select name,line,text
      from
      select name,case when (regexp_instr(text,'(update)|(insert)|(delete)',1,1,1,'i') >0) and regexp_instr(ld,'CP_CA_DTLS',1,1,1,'i') >0
             then line
             else null
             end as line,text
      from
      Select   name,text,line,lead(text) over(partition by name order by line) ld
      from user_source
      where name in
          select distinct name
          from user_source
          where upper(text) like '%CP_CA_DTLS%'
      order by 1 nulls last
      )where line is not null
    select name,line,text
    from t t1
    where regexp_instr(text,'(update)|(insert)|(delete)',1,1,1,'i') >0
    and exists
         select 1
         from t t2
         where t1.name = t2.name
            and t1.type = t2.type
            and t1.line = t2.line
    union
    select name,line,text
    from x

  • Problem in Performing DML Operations

    Hi,
    I am performing DML operations(add,edit,delete) on some table 'X'.
    Question:
    After i perform a create operation for the first time, it works fine.
    Now if i tried to perform second consequitive create operation all the fields have first create operations data.
    How will i clear the data in this field.
    Same thing is happening for update operation also.
    This is same even when i use cancel operation followed by create operation.
    How shall i resolve this UI issue.
    Thanks,
    Mithun

    retainAM - If true, all the cached application modules will be retained. If false, all the cached application modules will be released. Developers must use this parameter to control the release behavior of the cached appplication modules. This method will ignore any retainAM=true or retainAM=false as a URL parameter or as part of parameters.
    You should not set retainAM to false in all the cases that can cause performance issue as the AM cache has to be recreated for every navigation. But in your case, it's acceptable.
    Best scenarios for retainAM = true
    1. When you open a page in update mode from List page.
    2. When you want the current values to be retained, after any navigation.
    3. When you add bradcrumb, it is recommended to use reatainAM to true.
    Best scenarios for retainAM = false
    1. When you don't want to retain the AM cache since everytime it should be created. or you want to release manually.
    2. Your current case.
    3. To reset the form values. But this should be the last option.
    Basically, reatainAM parameter is used to tell the OA Caching Framework to retain the current AM cache when the new AM cache gets created by navigating to new page.
    Please set the thread to answered if your issue is solved.

  • Query performance on same table with many DML operations

    Hi all,
    I am having one table with 100 rows of data. After that, i inserted, deleted, modified data so many times.
    The select statement after DML operations is taking so much of time compare with before DML operations (There is no much difference in data).
    If i created same table again newly with same data and fire the same select statement, it is taking less time.
    My question is, is there any command like compress or re-indexing or something like that to improve the performance without creating new table again.
    Thanks in advance,
    Pal

    Try searching "rebuilding indexes" on http://asktom.oracle.com. You will get lots of hits and many lively discussions. Certainly Tom's opinion is that re-build are very rarley required.
    As far as I know, Oracle has always re-used deleted rows in indexes as long as the new row belongs in that place in the index. The only situation I am aware of where deleted rows do not get re-used is where you have a monotonically increasing key (e.g one generated by a seqence), and most, but not all, of the older rows are deleted over time.
    For example if you had a table like this where seq_no is populated by a sequence and indexed
    seq_no         NUMBER
    processed_flag VARCHAR2(1)
    trans_date     DATEand then did deletes like:
    DELETE FROM t
    WHERE processed_flag = 'Y' and
          trans_date <= ADD_MONTHS(sysdate, -24);that deleted the 99% of the rows in the time period that were processed, leaving only a few. Then, the index leaf blocks would be very sparsely populated (i.e. lots of deleted rows in them), but since the current seq_no values are much larger than those old ones remaining, the space could not be re-used. Any leaf block that had all of its rows deleted would be reused in another part of the index.
    HTH
    John

  • "cannot perform a DML operation inside a query" error when using table func

    hello please help me
    i created follow table function when i use it by "select * from table(customerRequest_list);"
    command i receive this error "cannot perform a DML operation inside a query"
    can you solve this problem?
    CREATE OR REPLACE FUNCTION customerRequest_list(
    p_sendingDate varchar2:=NULL,
    p_requestNumber varchar2:=NULL,
    p_branchCode varchar2:=NULL,
    p_bankCode varchar2:=NULL,
    p_numberOfchekbook varchar2:=NULL,
    p_customerAccountNumber varchar2:=NULL,
    p_customerName varchar2:=NULL,
    p_checkbookCode varchar2:=NULL,
    p_sendingBranchCode varchar2:=NULL,
    p_branchRequestNumber varchar2:=NULL
    RETURN customerRequest_nt
    PIPELINED
    IS
    ob customerRequest_object:=customerRequest_object(
    NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
    condition varchar2(2000 char):=' WHERE 1=1 ';
    TYPE rectype IS RECORD(
    requestNumber VARCHAR2(32 char),
    branchRequestNumber VARCHAR2(32 char),
    branchCode VARCHAR2(50 char),
    bankCode VARCHAR2(50 char),
    sendingDate VARCHAR2(32 char),
    customerAccountNumber VARCHAR2(50 char),
    customerName VARCHAR2(200 char),
    checkbookCode VARCHAR2(50 char),
    numberOfchekbook NUMBER(2),
    sendingBranchCode VARCHAR2(50 char),
    numberOfIssued NUMBER(2)
    rec rectype;
    dDate date;
    sDate varchar2(25 char);
    TYPE curtype IS REF CURSOR; --RETURN customerRequest%rowtype;
    cur curtype;
    my_branchRequestNumber VARCHAR2(32 char);
    my_branchCode VARCHAR2(50 char);
    my_bankCode VARCHAR2(50 char);
    my_sendingDate date;
    my_customerAccountNumber VARCHAR2(50 char);
    my_checkbookCode VARCHAR2(50 char);
    my_sendingBranchCode VARCHAR2(50 char);
    BEGIN
    IF NOT (regexp_like(p_sendingDate,'^[[:digit:]]{4}/[[:digit:]]{2}/[[:digit:]]{2}$')
    OR regexp_like(p_sendingDate,'^[[:digit:]]{4}/[[:digit:]]{2}/[[:digit:]]{2}[[:space:]]{1}[[:digit:]]{2}:[[:digit:]]{2}:[[:digit:]]{2}$')) THEN
    RAISE_APPLICATION_ERROR(-20000,cbdpkg.get_e_m(-1,5));
    ELSIF (p_sendingDate IS NOT NULL) THEN
    dDate:=TO_DATE(p_sendingDate,'YYYY/MM/DD hh24:mi:ss','nls_calendar=persian');
    dDate:=trunc(dDate);
    sDate:=TO_CHAR(dDate,'YYYY/MM/DD hh24:mi:ss');
    condition:=condition|| ' AND ' || 'sendingDate='||'TO_DATE('''||sDate||''',''YYYY/MM/DD hh24:mi:ss'''||')';
    END IF;
    IF (p_requestNumber IS NOT NULL) AND (cbdpkg.isspace(p_requestNumber)=0) THEN
    condition:=condition|| ' AND ' || ' requestNumber='||p_requestNumber;
    END IF;
    IF (p_bankCode IS NOT NULL) AND (cbdpkg.isspace(p_bankCode)=0) THEN
    condition:=condition|| ' AND ' || ' bankCode='''||p_bankCode||'''';
    END IF;
    IF (p_branchCode IS NOT NULL) AND (cbdpkg.isspace(p_branchCode)=0) THEN
    condition:=condition|| ' AND ' || ' branchCode='''||p_branchCode||'''';
    END IF;
    IF (p_numberOfchekbook IS NOT NULL) AND (cbdpkg.isspace(p_numberOfchekbook)=0) THEN
    condition:=condition|| ' AND ' || ' numberOfchekbook='''||p_numberOfchekbook||'''';
    END IF;
    IF (p_customerAccountNumber IS NOT NULL) AND (cbdpkg.isspace(p_customerAccountNumber)=0) THEN
    condition:=condition|| ' AND ' || ' customerAccountNumber='''||p_customerAccountNumber||'''';
    END IF;
    IF (p_customerName IS NOT NULL) AND (cbdpkg.isspace(p_customerName)=0) THEN
    condition:=condition|| ' AND ' || ' customerName like '''||'%'||p_customerName||'%'||'''';
    END IF;
    IF (p_checkbookCode IS NOT NULL) AND (cbdpkg.isspace(p_checkbookCode)=0) THEN
    condition:=condition|| ' AND ' || ' checkbookCode='''||p_checkbookCode||'''';
    END IF;
    IF (p_sendingBranchCode IS NOT NULL) AND (cbdpkg.isspace(p_sendingBranchCode)=0) THEN
    condition:=condition|| ' AND ' || ' sendingBranchCode='''||p_sendingBranchCode||'''';
    END IF;
    IF (p_branchRequestNumber IS NOT NULL) AND (cbdpkg.isspace(p_branchRequestNumber)=0) THEN
    condition:=condition|| ' AND ' || ' branchRequestNumber='''||p_branchRequestNumber||'''';
    END IF;
    dbms_output.put_line(condition);
    OPEN cur FOR 'SELECT branchRequestNumber,
    branchCode,
    bankCode,
    sendingDate,
    customerAccountNumber ,
    checkbookCode ,
    sendingBranchCode
    FROM customerRequest '|| condition ;
    LOOP
    FETCH cur INTO my_branchRequestNumber,
    my_branchCode,
    my_bankCode,
    my_sendingDate,
    my_customerAccountNumber ,
    my_checkbookCode ,
    my_sendingBranchCode;
    EXIT WHEN (cur%NOTFOUND) OR (cur%NOTFOUND IS NULL);
    BEGIN
    SELECT requestNumber,
    branchRequestNumber,
    branchCode,
    bankCode,
    TO_CHAR(sendingDate,'yyyy/mm/dd','nls_calendar=persian'),
    customerAccountNumber ,
    customerName,
    checkbookCode ,
    numberOfchekbook ,
    sendingBranchCode ,
    numberOfIssued INTO rec FROM customerRequest FOR UPDATE NOWAIT;
    --problem point is this
    EXCEPTION
    when no_data_found then
    null;
    END ;
    ob.requestNumber:=rec.requestNumber ;
    ob.branchRequestNumber:=rec.branchRequestNumber ;
    ob.branchCode:=rec.branchCode ;
    ob.bankCode:=rec.bankCode ;
    ob.sendingDate :=rec.sendingDate;
    ob.customerAccountNumber:=rec.customerAccountNumber ;
    ob.customerName :=rec.customerName;
    ob.checkbookCode :=rec.checkbookCode;
    ob.numberOfchekbook:=rec.numberOfchekbook ;
    ob.sendingBranchCode:=rec.sendingBranchCode ;
    ob.numberOfIssued:=rec.numberOfIssued ;
    PIPE ROW(ob);
    IF (cur%ROWCOUNT>500) THEN
    CLOSE cur;
    RAISE_APPLICATION_ERROR(-20000,cbdpkg.get_e_m(-1,4));
    EXIT;
    END IF;
    END LOOP;
    CLOSE cur;
    RETURN;
    END;

    Now what exactly would be the point of putting a SELECT FOR UPDATE in an autonomous transaction?
    I think OP should start by considering why he has a function with an undesirable side effect in the first place.

  • On DML operations Locked held on Parent tables.

    Hi All,
    Am trying to delete records from a table such as
    DELETE /*+ index(EVENT_JOURNAL row_ts_idx) */  FROM EVENT_JOURNAL WHERE trunc(ROW_TS)= TO_date('09/05/2012','DD/MM/YYYY');table has function based index on row_ts column
    Plan
    DELETE STATEMENT  ALL_ROWSCost: 138  Bytes: 502 K  Cardinality: 8 K             
        3 DELETE BENCHMARKDEV.EVENT_JOURNAL        
            2 TABLE ACCESS BY INDEX ROWID TABLE BENCHMARKDEV.EVENT_JOURNAL Cost: 138  Bytes: 502 K  Cardinality: 8 K     
                1 INDEX RANGE SCAN INDEX BENCHMARKDEV.ROW_TS_IDX Cost: 23  Cardinality: 8 K  Above delete operation takes much time to delete 273 rows
    I have check that above DML perform getting locked on its parent table. such as
    select    OS_USER_NAME os_user,
        PROCESS os_pid,
        ORACLE_USERNAME oracle_user,
        l.SID oracle_id,
        decode(TYPE,
            'MR', 'Media Recovery',
            'RT', 'Redo Thread',
            'UN', 'User Name',
            'TX', 'Transaction',
            'TM', 'DML',
            'UL', 'PL/SQL User Lock',
            'DX', 'Distributed Xaction',
            'CF', 'Control File',
            'IS', 'Instance State',
            'FS', 'File Set',
            'IR', 'Instance Recovery',
            'ST', 'Disk Space Transaction',
            'TS', 'Temp Segment',
            'IV', 'Library Cache Invalidation',
            'LS', 'Log Start or Switch',
            'RW', 'Row Wait',
            'SQ', 'Sequence Number',
            'TE', 'Extend Table',
            'TT', 'Temp Table', type) lock_type,
        decode(LMODE,
            0, 'None',
            1, 'Null',
            2, 'Row-S (SS)',
            3, 'Row-X (SX)',
            4, 'Share',
            5, 'S/Row-X (SSX)',
            6, 'Exclusive', lmode) lock_held,
        decode(REQUEST,
            0, 'None',
            1, 'Null',
            2, 'Row-S (SS)',
            3, 'Row-X (SX)',
            4, 'Share',
            5, 'S/Row-X (SSX)',
            6, 'Exclusive', request) lock_requested,
        decode(BLOCK,
            0, 'Not Blocking',
            1, 'Blocking',
            2, 'Global', block) status,
        OWNER,
        OBJECT_NAME
    from    v$locked_object lo,
        dba_objects do,
        v$lock l
    where     lo.OBJECT_ID = do.OBJECT_ID
    AND     l.SID = lo.SESSION_ID
    oracle     6624     BENCHMARKDEV     216     DML     Row-X (SX)     None     Not Blocking     BENCHMARKDEV     BUSINESS_UNIT
    oracle     6624     BENCHMARKDEV     216     DML     Row-X (SX)     None     Not Blocking     BENCHMARKDEV     BUSINESS_UNIT
    oracle     6624     BENCHMARKDEV     216     DML     Row-X (SX)     None     Not Blocking     BENCHMARKDEV     BUSINESS_UNIT
    oracle     6624     BENCHMARKDEV     216     DML     Row-X (SX)     None     Not Blocking     BENCHMARKDEV     BUSINESS_UNIT
    oracle     6624     BENCHMARKDEV     216     DML     Row-X (SX)     None     Not Blocking     BENCHMARKDEV     BUSINESS_UNIT
    oracle     6624     BENCHMARKDEV     216     DML     Row-X (SX)     None     Not Blocking     BENCHMARKDEV     BUSINESS_UNIT
    oracle     6624     BENCHMARKDEV     216     DML     Row-X (SX)     None     Not Blocking     BENCHMARKDEV     BUSINESS_UNIT
    oracle     6624     BENCHMARKDEV     216     DML     Row-X (SX)     None     Not Blocking     BENCHMARKDEV     BUSINESS_UNIT
    oracle     6624     BENCHMARKDEV     216     DML     Row-X (SX)     None     Not Blocking     BENCHMARKDEV     BUSINESS_UNIT
    oracle     6624     BENCHMARKDEV     216     Transaction     Exclusive     None     Not Blocking     BENCHMARKDEV     BUSINESS_UNIT
    oracle     6624     BENCHMARKDEV     216     DML     Row-X (SX)     None     Not Blocking     BENCHMARKDEV     BUSINESS_UNITI don't know on what basis parent tables are get locked?
    Please help me out to resolve..
    Thanks & Regards
    Sami
    Edited by: Sami on May 16, 2012 3:14 PM
    Edited by: Sami on May 16, 2012 3:15 PM

    Hi Sami,
    Your dont event need Function Based Index on ROW_TS. A normal B*Tree index on ROW_TS will do the trick and also reduce the time for index sorting.
    DELETE FROM EVENT_JOURNAL WHERE ROW_TS >= TO_date('09/05/2012','DD/MM/YYYY') AND ROW_TS < TO_date('10/05/2012','DD/MM/YYYY');
    {code}
    {code}
    Above delete operation takes much time to delete 273 rows
    {code}
    # Is EVENT_JOURNAL parent table and has foreign key references from other tables ?
    # How many records are there in EVENT_JOURNAL ?
    # Check data dictionary view - DBA_WAITERS to see waiting/holding session                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to Load 100 Million Rows in Partioned Table

    Dear all,
    I a workling in VLDB application.
    I have a Table with 5 columns
    For ex- A,B,C,D,DATE_TIME
    I CREATED THE RANGE (DAILY) PARTIONED TABLE ON COLUMN (DATE_TIME).
    AS WELL CREATED NUMBER OF INDEX FOR EX,
    INDEX ON A
    COMPOSITE INDEX ON DATE_TIME,B,C
    REQUIREMENT
    NEED TO LOAD APPROX 100 MILLION RECORDS IN THIS TABLE EVERYDAY ( IT WILL LOAD VIA SQL LOADER OR FROM TEMP TABLE (INSERT INTO ORIG SELECT * FROM TEMP)...
    QUESTION
    TABLE IS INDEXED SO I AM NOT ABLE TO USE SQLLDR FEATURE DIRECT=TRUE.
    SO LET ME KNOW WHAT THE BEST AVILABLE WAY TO LOAD THE DATA IN THIS TABLE ????
    Note--> PLEASE REMEMBER I CAN'T DROP AND CREATE INDEX DAILY DUE TO HUGE DATA QUANTITY.

    Actually a simpler issue then what you seem to think it is.
    Q. What is the most expensive and slow operation on a database server?
    A. I/O. The more I/O, the more latency there is, the longer the wait times are, the bigger the response times are, etc.
    So how do you deal with VLT's? By minimizing I/O. For example, using direct loads/inserts (see SQL APPEND hint) means less I/O as we are only using empty data blocks. Doing one pass through the data (e.g. apply transformations as part of the INSERT and not afterwards via UPDATEs) means less I/O. Applying proper filter criteria. Etc.
    Okay, what do you do when you cannot minimize I/O anymore? In that case, you need to look at processing that I/O volume in parallel. Instead of serially reading and writing a 100 million rows, you (for example) use 10 processes that each reads and writes 10 million rows. I/O bandwidth is there to be used. It is extremely unlikely that a single process can fully utilised the available I/O bandwidth. So use more processes, each processing a chunk of data, to use more of that available I/O bandwidth.
    Lastly, think DDL before DML when dealing with VLT's. For example, a CTAS to create a new data set and then doing a partition exchange to make that new data set part of the destination table, is a lot faster than deleting that partition's data directly, and then running a INSERT to refresh that partition's data.
    That in a nutshell is about it - think I/O and think of ways to use it as effectively as possible. With VLT's and VLDB's one cannot afford to waste I/O.

  • Date Field Displaying and DML Operations

    Hi all,
    I have an issue with displaying and updating date columns that I'm hoping someone can assist me with.
    I'm using APEX 3.0.1.
    I have a Form page with a number of fields sourced from one database table that are being populated by an Automatic Row Fetch On Load - After Header.
    The Item P6_MONTHFOR is stored as a Date datatype in the table and displayed on the form using the Date Picker (use Item Format Mask). I have a Format Mask set as 'MON-RR'. I want to ensure that the last day of the month is saved back to the database table so have been trying various calculation techniques to try and achieve this but am experiencing a variety of SQL errors!
    I have tried using LAST_DAY(:P6_MONTHFOR) in the Post Calculation Computation, or as a separate Computation After Submit.
    I have also tried having P6_MONTHFOR as a hidden column and using display Items and then trying Item calculations to then update the value of P6_MONTHFOR column prior to DML operations but to no avail.
    The only DML operations allowed on these rows are DELETE and UPDATE and I'm using an Automatic Row Processing (DML) On Submit - After Computations and Validations process to control these operations.
    Any help or suggestions greatly appreciated :-)
    Kind Regards,
    Gary.

    the function LAST_DAY is a date function, expecting a date as input. Since it is all web, the values of items are as string/varchar2. In order to use date-function, you have to first make it a date with to_date() with the format-mask (DD-MON-RR).
    In my opinion Dates are still tricky, it would be great if ApEx would have a DV() function, next to the V() and NV() functions, It is in ApExLib (of Patrick Wolf)
    Simon

  • ORA-14551: cannot perform a DML operation inside a query

    I have a Java method which is deployed as a Oracle function.
    This Java method parses a huge XML & populates this data
    into a set of database tables.
    I have to call this Oracle function in a unix shell script using sqlplus.
    Value returned by this function will be used by the shell script to decide
    what to do next.
    I am calling the Oracle Java function as follows in the shell script:
    echo "SELECT XML_TABLES.RUN_XML_LOADER('$P1','$P2','$P3','$P4') FROM DUAL;\n" | sqlplus $DB_USER > $LOG
    This gives error - "ORA-14551: cannot perform a DML operation inside a query".
    If I have to add a AUTONOMOUS_TRANSACTION pragma to this Java function,
    where to I add it considering, that the definition of the function is in a Java class.
    Can we do it in call spec?
    create or replace package XML_TABLES is
    function RUN_XML_LOADER(xmlFile IN VARCHAR2,
    xmlType IN VARCHAR2,
    outputDir IN VARCHAR2,
    logFileDir IN VARCHAR2) RETURN VARCHAR2 AS
    LANGUAGE JAVA NAME 'XmlLoader.run
    (java.lang.String, java.lang.String, java.lang.String, java.lang.String)
    return java.lang.String';
    end XML_TABLES;
    If not is there any other way to acheive this?
    Thanks in advance.
    Sunitha.

    If I have to add a AUTONOMOUS_TRANSACTION pragma to this Java function,You'd have to write a PL/SQL function that calls the JSP. But I would caution you about using that pragma. It does introduce tremendous complexity into processing.
    As I see it you only need a function to return the result code so why not use a procedure with an OUT parameter?
    Cheers, APC
    Of course Yoann's suggestion of using an anonymous block would work too.
    Message was edited by:
    APC

  • DML operations not getting logged

    Hi,
    I am wanting to collect the stats on the tables on my DB for which I want the DML activities to be populated in the USER_TAB_MODIFICATIONS table. The monitoring on all the tables in the schema has been set to ON. But i still see no records inside the USER_TAB or DBA_TAB_MODIFICATIONS table.
    I can always try executing the dbms_stats.flush_database_monitoring_info for getting this table populated. But I wanted to first know why is this table not getting populated thru the DB processes? And incase any DB level setting is preventing it from getting inserted in the USER_TAB_MODIFICATIONS table, I am not sure if executing the dbms_stats.flush_database_monitoring_info would help me.
    Kindly advice.
    Thanks in advance.

    CrazyAnie wrote:
    Hi,
    Yeah, I know there is a time lapse (approx 3 hrs) between the DML operations on the table and the time when they are logged in the DB. We waited for around a day to get these value populated in the DBA_TAB_MODIFICATIONS. But we are still not able to see any values in this table.
    I am not able to guess the reason behind this. Kindly help.
    Shall I try executing the flush_db_monitoring info to get these values?refer Thread: user_tab_modifications only updated by gather_stats_job?
    user_tab_modifications only updated by gather_stats_job?

  • DML Operations in Stored Function

    Hi,
    I have used Update Statement in a function. Which is giving an errror (ORA-14551: cannot perform a DML operation inside a query).
    Can I use DML operations in a stored function ?
    (I need help on locking master/transaction tables, i.e if a one user locks a master another user should not get modify access to the master/transactions).
    Thanks
    Ramesh Ganji

    Someone who obviously din't read my previous post in this thread. You should pay attention, programming is all about the details.
    ORA-14551: cannot perform a DML operation inside a query).Then it obviously does more than just "returns a Table Type object". Why are you doing DML in a function?
    PLS-00653: aggregate/table functions are not allowed in PL/SQL scopeWe can only call pipelined functions from SQL queries. So you'll have to ditch the DML or make it an autonomous transaction. Be very careful if you adopt the latter approach.
    Cheers, APC

  • Why we cannot perform DML operations against complex views directly.

    hi
    can any tell me why we cannot perform DML operations against complex views directly.

    Hi,
    It is not easy to perform DML operations on complex views which involve more than one table as said by vissu. The reason being you may not know which columns to be updated/inserted/deleted on the base tables of the views. If it is a simple view containing a single table it is as simple as performing actions on the table.
    For further details visit this
    http://www.orafaq.com/wiki/View
    cheers
    VT

  • Ref:Logging the DML operations on a schema

    Hello,
    I want to log the DML operations on our Master Schema(This schema is accessed by 4-6 applications apart from there own application schemas). I want to log the DML operations done by x.application. Is there any easy way to do it. One solutions is writting the triggers on each table of Master schema and inserting the transactions into audit_schema(it is replica of master schema). Is there any other way to do it. Any solution for this issue is appreciated. Thanks in advance.

    Is there any other way to do itEnable auditing, see the security guide:
    http://download.oracle.com/docs/cd/B19306_01/network.102/b14266/toc.htm
    http://download.oracle.com/docs/cd/B19306_01/network.102/b14266/auditing.htm#i1008289
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/security.htm#sthref2929

  • DML operations on a Replicated Object when it is in QUIZED State.

    Hi,
    How do we do DML operations on a Replicated object(Multi-Master Replication) when the object is in QUIZED State.
    As such my intenttion is to bring the Replication in a QUIZED State and then do some DML then bring up the Replicator and allow it to sync the Database.

    Hi Anita,
    Thank you so much for patiently explaining me about issues on Replication.
    Now, let me explain my objective. We are about to implement Oracle 8.1.6 Multi Master Replication. As a Fall back mechanism management is so concerned that "if anything goes wrong in Replication, how do we prevent the "stopshow" from carrying out the normal transaction till the issues gets settled.
    To achieve this objective, we are doing some investigation on this issue. As i am quite new to Oracle Replication I thought there is no way that i could do this in a very short "window" period.
    I tried to stop the Replication using the suggested method it worked well. Meaning i am able to do the DML transaction. Now the problem is when we decide to bring up the system back to Replication. How do we go doing that. As i thought that the DBMS package that resumes the replication would do the "sync" on both sides of the Replication. But it is not happening.
    I referred to the Oracle documentation on Replication and was quite eager to use the package DBMS_RECTIFIER_DIFF.DIFFERENCES and DBMS_RECTIFIER_DIFF.RECTIFY procedures.
    But i am yet to test this. If this works out for a specific table. Then my plan is to deploy a mechanism where in b4 i start the replication i would execute these packages for all the replicated tables.
    Hope you now understand what i intend to do and Pls advise me if i am on the right track on reaching my goal.
    Thanx in advance.
    Senthil.

  • How to Track DDL and DML Operations happening in Backend into Log Files....

    Hi I have one requirement for Tracking the DDL And DML Operation happening in Backend once the user Inserts or Updates any Table.How to Implement the same can anyone proviode the code for the same.
    Ex: I have multiple tables in my database if any user fires the DDL or DML it should make entry in the Log file as
    Name of the Table Operation Timestamp
    X Insert DD-MM-YYYY HH24:MM:SS
    Y Update DD-MM-YYYY HH24:MM:SS
    Z Delete DD-MM-YYYY HH24:MM:SS
    L Select DD-MM-YYYY HH24:MM:SS
    Is it Possible to Develop it through Procedure,Function or Package,please give me Idea,,,,,

    Please do not post same question in multiple forum. How to Track DDL and DML Operations happening in Backend into Log Files....
    What's wrong with the answers posted in the above forum ? Do you go through the "AUDIT" option as suggested in the above post by various members ?

Maybe you are looking for

  • Variable Substitution at communicaiton channel

    Hi, Currently my file schema is TO%xi_output%.txt where xi_output refers to transfer order field. My client wants additionally warehouse number to be mentioned. should my file schema be like this TO%xi_whse%%xi_output%.txt or TO%xi_whse xi_output%.tx

  • Changing creation date on adobe acrobat 9

    I've got a folder full of old PDF files at work. They are all labeled DD-MM-YY to signify the date they were made but the pdf's were originally in Word format and when they were all converted to PDF's, they all took that day as their created date. I'

  • BootCamp 2.1 Update Blurry Screen

    hello, i'm running XP Pro SP2 fully updated on my macbook using BootCamp 2.0. i just updated to BC 2.1 via the Apple Software Update. It installed new drivers, but it has left my screen is blurry. i've check all the resolution settings and whatnot an

  • Having trouble hearing callers on iPhone 5.

    I am having trouble hearing callers when they are speaking to me on iPhone 5, even though I have pressed the volume as high as possible. Other than getting an op on my ears does anyone know if there is a way to make the caller louder please?

  • Can smartalbmuns be limited to several folders or just one?

    my smartalbums appear to go through whole library...am i missing something obvious here?