How commit statement works

Hi,
I want to know the procedure of how commit statement executes.
I have a transaction in which I have updated 10000 rows of table A having 10lakh records and after this update I am updating 1 row in table B having 1000 records.
after both these update statement I am executing commit statement.
so, how this commit will work? does it commits the data in sequential order of updation of table A and B or it will be parallel for both the tables? Does it take time to do the commit?
Thanks

Arjit wrote:
Hi,
I want to know the procedure of how commit statement executes.
I have a transaction in which I have updated 10000 rows of table A having 10lakh records and after this update I am updating 1 row in table B having 1000 records.
after both these update statement I am executing commit statement.
so, how this commit will work? does it commits the data in sequential order of updation of table A and B or it will be parallel for both the tables? Does it take time to do the commit?
Thankswhen all else fails Read The Fine Manual
http://docs.oracle.com/cd/E11882_01/server.112/e25789/sqllangu.htm#sthref864
http://docs.oracle.com/cd/E11882_01/server.112/e25789/transact.htm#sthref1302
http://docs.oracle.com/cd/E11882_01/server.112/e25789/transact.htm#sthref1320

Similar Messages

  • How update statement works

    Hi all,
    can you guys help me in understanding how an update statement works in oracle...
    Thanks
    Rajesh

    i mean what happens in background in oracle server
    when i fire a update statement.The oracle server puts the old data (i.e before updation) into the RBS and then updates the rows with the new data.
    Regards
    Amit Raghuvanshi

  • In background job  how commit & rollback work works?

    Hello Friends,
         My requirement is, to fetch all sales order items based on some condition and load them into one table say OCC1 in job J1. Now the second requirement is to upload the job information J1 with job name, user name, end date in second table say OCC2 in job J2.
         My question is if there is some error I found while processing job 2 I have to rollback entire work which means I have to remove all records those I have inserted in to table OCC1. Can any one suggest me how to handle such problem? Some how I am able to create two job and update the tables. However, what about rollback work? Whether there is an implicit commit work after every background job? I am working on SAP 4.6C version.
    Thanks,
    Amol C.

    I think by using just ROLL BACK work it will not rollback your first job's data.
    You need to make some mechanism which can delete the data from OCC1 if the J2 got error.
    Regards,
    Naimesh Patel

  • How select statement works

    i like to know the in depth details how oracle process the select query...how it reads from the data block

    Straight from the concept manual:
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96524/c01_02intro.htm#3437
    An Example of How Oracle Works
    The following example describes the most basic level of operations that Oracle performs. This illustrates an Oracle configuration where the user and associated server process are on separate machines (connected through a network).
    An instance has started on the computer running Oracle (often called the host or database server).
    A computer running an application (a local machine or client workstation) runs the application in a user process. The client application attempts to establish a connection to the server using the proper Oracle Net Services driver.
    The server is running the proper Oracle Net Services driver. The server detects the connection request from the application and creates a dedicated server process on behalf of the user process.
    The user runs a SQL statement and commits the transaction. For example, the user changes a name in a row of a table.
    The server process receives the statement and checks the shared pool for any shared SQL area that contains a similar SQL statement. If a shared SQL area is found, then the server process checks the user's access privileges to the requested data, and the previously existing shared SQL area is used to process the statement. If not, then a new shared SQL area is allocated for the statement, so it can be parsed and processed.
    The server process retrieves any necessary data values from the actual datafile (table) or those stored in the SGA.
    The server process modifies data in the system global area. The DBWn process writes modified blocks permanently to disk when doing so is efficient. Because the transaction is committed, the LGWR process immediately records the transaction in the online redo log file.
    If the transaction is successful, then the server process sends a message across the network to the application. If it is not successful, then an error message is transmitted.
    Throughout this entire procedure, the other background processes run, watching for conditions that require intervention. In addition, the database server manages other users' transactions and prevents contention between transactions that request the same data.

  • How a update statement works internally in oracle

    Hi,
    I just wanted to know when a user issues a update (any DML) statement, what are all the steps involved?
    Like when user updated some statement, the modified block goes to the undo tablespace and new data will be stored in the user PGA and when user issues a commit statement.Does it delinked it from the uno tablespace and lgwr flushed the block to the redo logfile(does the lgwr also flushed the uncommited changes to the logfile as datafile stores the committed as well as uncomitted data).Can anybody suggest me how all the things work internally?

    Hi,
    Many of the people post across the same questions and lot of discussions carried out. You can you answer straight from Oracle Docs.
    Any how refer to the following below links
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:288016031632
    Update Statement-10G
    - Pavan kumar N

  • How to execute commit statement in a procedure optionally?

    We have a procedure which has DML operations and at the end there is a commit statement.
    I want to execute commit statement optionally.
    Like, when procedure runs directly it must execute commit statement, but when this procedure is called from a trigger don't run commit.
    As you know commit operation is not allowed in triggers.
    How can I understant the code is triggered from a trigger or any other (manuel exec or from another procedure).
    I am looking for the reserved word that solve my problem. Like INSERTING, DELETING ....
    Serkan
    Thanks.

    Hi oraserkan,
    You do of course know it's dangerous to have a commit inside a procedure?
    Consider this:
    SQL> create table t (text varchar2(25))
    Table created.
    SQL> create or replace procedure p
    as
    begin
       insert into t(text)
           values ('Insert PROCEDURE');
       commit;
    end p;
    Procedure created.
    SQL> insert into t(text)
        values ('Insert SQL')
    1 row created.
    SQL> exec p
    PL/SQL procedure successfully completed.
    SQL> rollback
    Rollback complete.
    SQL> select * from t
    TEXT                    
    Insert SQL              
    Insert PROCEDURE        
    2 rows selected.You should instead clearly state the procedure has a commit by making it autonomous, and then have two procedures, one that commits, and one that don't
    SQL> drop procedure p
    Procedure dropped.
    SQL> drop table t purge
    Table dropped.
    SQL> create table t (text varchar2(25))
    Table created.
    SQL> create or replace procedure p_transactional
    as
    begin
       insert into t(text)
           values ('Insert PROCEDURE');
    end p_transactional;
    Procedure created.
    SQL> create or replace procedure p_autonomous
    as
       pragma autonomous_transaction;
    begin
       p_transactional;
       commit;
    end p_autonomous;
    Procedure created.
    SQL> insert into t(text)
        values ('Insert SQL')
    1 row created.
    SQL> exec p_autonomous
    PL/SQL procedure successfully completed.
    SQL> rollback
    Rollback complete.
    SQL> select * from t
    TEXT                    
    Insert PROCEDURE        
    1 row selected.
    SQL> drop procedure p_transactional
    Procedure dropped.
    SQL> drop procedure p_autonomous
    Procedure dropped.
    SQL> drop table t purge
    Table dropped.Regards
    Peter

  • Just downloaded Numbers spreadsheet... I entered a simple "if" statement...If(c2=0,9,7) just to see how it works.... But I get an error message "Argument 1 of if expects a Boolean but found "c2=0....This if statement works fine in Excel

    Just downloaded the Apple Numbers spreadsheet app... I entered this simple 'if' statement to see how it works.... "if(c2=0,9,7)...
    I got an error message.. "Argument 1 of if statement expects a Boolean but found "c2=0".
    This if statement works fine in Excel.....What am I doing wrong ????

    Just downloaded the Apple Numbers spreadsheet app... I entered this simple 'if' statement to see how it works.... "if(c2=0,9,7)...
    I got an error message.. "Argument 1 of if statement expects a Boolean but found "c2=0".
    This if statement works fine in Excel.....What am I doing wrong ????

  • Select statement works in 8.1.5  but does not work in 8.1.7 why???????

    I have written a select statement as part of cursor in a
    Database Trigger, the following statement works fine in Oracle
    8i ver 8.1.5.0 but the same statement returns error PLS-00103
    (Parser related error) in Oracle 8i version 8.1.7.0!!!!!!
    The error shown is
    PLS-00103Encountered the symbol")" when expecting one of the
    following:
    from
    The Sql statement in a Database Trigger is as follows
    select opn_stk,iss_qty,rec_qty,ROWID
    from mnth_bal
    where to_date(lpad(to_char(month),2,'0')||to_char
    (year),'mmyyyy') >= SYSDATE AND
    REV_NO = :NEW.REV_NO AND
         ITEM_STOCK_ITEM_CD = :NEW.ITEM_CD and
    unit_cd = :NEW.unit_cd and
    store_cd = :new.store_cd
    order by to_date(lpad(to_char(month),2,'0')
    ||to_char(year),'mmyyyy') ;
    Can any one please tell me whats the problem ? In 8.1.5.0 the
    same statement in the trigger runs absolutely fine &
    compiles.Because of this problem the trigger is not compiling in
    8.1.7.0
    Would be grateful for any solutions given

    Relating line numbers in compile errors to source code.
    Oracle does not count blank lines in line numbers. Commenting
    with "--" blank lines or deleting blank lines will make the line
    counter more accurate.
    Oracle counts comments delimited with /*...*/ as one line, no
    matter how many lines are in the source code. Using only "--"
    will make the line counter more accurate.
    Oracle does not count lines before the PL/SQL block DECLARE when
    compiling triggers. (CREATE ... TRIGGER....FOR EACH...WHEN(...))
    parts of the syntax are not counted. The line in the source
    code with the DECLARE of the trigger's PL/SQL block will be line
    1.
    Hint: Avoid uncertainty. Use "SHO ERR TRIGGER <trigger_name>"
    when looking at compile problems.
    Good Luck....

  • JDBC Adapter:- How does it work??

    Dear Friends,
    I would like to know the nuts and bolts of JDBC adapter.
    1.)How does it work internally?Internally what does sap use?
    2.)In my scenario i just need to access a sap table so Can i write my Java JDBC program to access it.?
    3.)Is there any other way to sent data from Idocs to map to a external database with out using XI.?
    thx,
    jeevan

    Hi Jeevan,
    As far as the JDBC adapter goes, internally it uses, obviously JDBC (Java DataBase Connectivity). Thus all the calls from this adapter are internally SQL Queries (Either Select, Insert, Update, Delete, Execute Stored Procedure) that are sent using Java JDBC API.
    In Sender Configuration, it needs a Select and an Update query to be configured into it. It polls the External Database at specific intervals (Polling Interval in the Channel Configuration),i.e., it connects to the Database via a JDBC Connection and runs the select query. The data from the query is sent to XI as an XML Document. The update query is used to update the DB such that the same data is not picked again in the next poll. This is generally done through a status field. The select query's Where clause should pick records with one status and the update should change all those statuses so that the select does not pick them again. Click [Here|http://help.sap.com/saphelp_nw70/helpdata/EN/22/b4d13b633f7748b4d34f3191529946/frameset.htm|SAP Help on JDBC Sender Adapter] for more details, including the format of the XML file sent.
    In receiver configuration, the channels creates SQL statements from the XML Document it receives. This can be either Select, Insert, Update, Delete or Stored Procedure Call Statements. This requires you to give the receiver channel an XML Document in a pre-defined Schema. Click [Here|http://help.sap.com/saphelp_nw70/helpdata/EN/22/b4d13b633f7748b4d34f3191529946/frameset.htm|SAP Help on JDBC Receiver Adapter] for more details including correct XML Schemas. Note that the kind of SQL Statement generated (Select, Update, etc) is dependent on the schema provided.
    Hope this was helpful!!!
    Thanks,
    Guru

  • All SELECT statements work except of SELECT *

    Hi,
    I have one table with 2 rows in Oracle 10.1.0.2.0
    All SELECT statements work (e.g. SELECT COUNT(*) FROM, SELECT COLUMNNAME FROM TABLE, etc.)
    But when I execute SELECT * FROM it never shows any response in SQLPlus. I can view the data with Enterprise Manager Console - using View/Edit Content.
    How this can be caused?
    Thanks for reply.

    Hi,
    I don't get any error. I enter the SELECT * FROM statement run it and cursor jumps to next line and is blinking forever...
    So I got no error response from database.
    SELECT COLUMNNAME FROM works normally.
    As I wrote the machine with database is probably used over its limits - I'm not DBA but SGA is set up to use about 90% of memory (as I learnt from other forums recomendation for Solaris/Sun is about 40%).
    Unfortunatelly I have just 2 rows in my table. There are metadata in the table which are needed to get info about other tables in the database.
    So I am wondering why is the database able to work normally but doesn't response to this statement. I run queries on other tables in database with millions of records, but I am not able to run this query.
    Can be table somehow corrupted? It is strange...
    Regards,
    Petr

  • COMMIT statement

    Hi Guys,
    I have a RFC function module which updates a field on the Portal side and no updates are done on the R/3 side. I pass parameters to the FM and it updates the field on the portal side.So do we need a COMMIT statement in this situation.
    IS COMMIT statement necessary for every BAPI or RFC function module. What are the situation under which a COMMIT statement is used.

    Hi,
    IF you are exporting a data from SAP to other system you doesn't need this but if you are importing a data from others systems to SAP you need to use the statement COMMIT WORK.
    COMMIT WORK is required for transactions developed externally to the R/3 System that change data in the R/3 System via BAPI calls.
    When you call BAPIs in your program that change data in the R/3 System, afterwards you must call this the FM "BAPI_TRANSACTION_COMMIT" to write the changes to the SAP database.                                                                 
    <b>Use function module BAPI_TRANSACTION_COMMIT to do this.</b>
    Regards.
    Marcelo Ramos

  • Commit statement in badi method

    hi all,
    i am using commit statement in badi method save_data, it is put after function module,
    in function module i have used insert and update statement, if i do like that then the commit statement refresh the global data but update the table,
    if i create one perform inside function module and put commit statement in that perform, then it shows message update was terminated,
    i also want the global data for processing thats why i can't use commit statement after FM in method, please give Suggestion,
    Points will be awarded.

    Hi,
    sounds as if you call that FM in update task. Update function modules do not allow all actions. They should only include the neccessary SQL statements and must include any COMMIT.
    For more information read SAPDOCU of COMMIT WORK and everything of SAPS update concept (start immed. V1, start delayed V2 and so on).
    ATTENTION. Most BADIs designed to save customers data may be used several times and standard data may be saved after them. To avoid inconsistent data inside those BADIs normally no COMMIT should be done.
    Kind regards,
    HP

  • How Does MINUS Work?

    Hi,
    I want to do a count(*) table 1 minus count(*) table 2 in a test case. How does minus work in functions?
    create table count1( col1 number);
    create table count2( col2 number);
    truncate table count1;
    truncate table count2;
    insert into count1 values(1);
    insert into count1 values(2);
    insert into count1 values(3);
    insert into count1 values(4);
    insert into count1 values(5);
    commit;
    insert into count2 values(1);
    insert into count2 values(2);
    insert into count2 values(3);
    insert into count2 values(5);
    commit;
    SQL> select * from count1
      2  minus
      3  select * from count2;
          COL1
             4
    SQL>
    SQL> select count(*) from count1
      2  minus
      3  select count(*) from count2;
      COUNT(*)
             5
    SQL>

    select * from count1
    minus
    select * from count2;Means all rows of count1 not present in count2, that is to say one row (4).
    select count(*) from count1
    minus
    select count(*) from count2;Means number of rows of count1 if it is different from number of rows of count2, no rows if count1 and count2 contains the same number of rows
    select count(*) from (
    select * from count1
    minus
    select * from count2
    );Means number of DISTINCT rows of count1 that are not present in count2
    select count(a.rowid) - count(b.rowid)
      from count1 a full outer join count2 b on a.rowid=b.rowid;Means number of rows of count1 - number of rows of count2, where - is arithmetic minus (not minus as defined in set theory).
    Try inserting some duplicate values and you'll get it.
    Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/01/02/query-gerarchiche/]

  • Commit statement in user exit

    Hi All,
    We found that while doing PGI , it takes some time to COMMIT the table VBUK. Due to which we are getting old values of VBUK-KOSTK field while executing select query at later point of time in the flow.
    My question --
    Can I use COMMIT WORK statement in user exit MV50AFZ1 --> FORM USEREXIT_SAVE_DOCUMENT so that all the related tables
    get committed immediately.
    Thanks
    Saurabh

    Hi Saurabh ,
    Normally , you shoud not specify COMMIT stmt in any user exit , badi etc..
    SAP has its own COMMIT statement while execuiting the standard transactions .
    Addition of a COMMIT might lead to problems elsewhere .
    Thanks
    Supriya

  • How many states are there in a second?

    Hi
    I have to make an animation in fireworks and I am working in seconds.
    I can't work out how many states are there in a second.
    Please help.
    Thanks in advance.

    Not really sure what you are asking. If it is the speed of playback then go to the States panel and to the right is a number. Click it. It says 7/100 sec delay. Change this to alter playback speed. It's been ages since I've done animation in Fireworks

Maybe you are looking for

  • Leopard won't accept WPA password where Tiger accepted

    I've been doing all sorts of diagnostic experiments trying to figure out why I can't wirelessly connect under Leopard using WPA encryption while I was able to do so successfully under Tiger... With Leopard, encryption turned off or WEP encryption wor

  • Failing to create HA nfs storage on a shared 3310 HW Raid cluster 3.2

    Hi, I'm working on testing clustering on a couple v240s, running identitcal Sol10 10/08 and Sun Cluster 3.2. In trying things, I may have messed up the cluster. I may want to backout the cluster and start over. Is that possible, or do I need to insta

  • Permission Report (secure.log & ALRHelperJobs)

    Hi, I usually ignore permission reports since after I repair them I get "Permissions repair complete". First, does "Permissions repair complete" mean they were repaired or not? But I would most importantly like you insight on the following: Permissio

  • .mov file too big for posting on my website

    i am using i-photo to create a slideshow. i've used photos that were 72 dpi on one slideshow and photos that were 300 dpi on another. i have about 55 photos on each slideshow. the 72 dpi slideshow is actually larger than the 300. what gives? i can't

  • Using Airplay on my TV's wireless LAN

    How might I configure my iPad to connect to my Sony USB wireless Lan on my TV?