Worked Example on SET TRANSACTION, SAVEPOINT, ROLLBACK, COMMIT

Does any one know if there is any worked examples on the use of SET TRANSACTION, SAVEPOINT, ROLLBACK, COMMIT?

http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_106a.htm#2067249
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_102a.htm#2065561

Similar Messages

  • Is "SET TRANSACTION USE ROLLBACK SEGMENT" only a hint

    I have two users, one makes some inserts in a table.
    The other makes a select which visits many rows.
    I have a big rollback-segment.
    To ensure, both users use this rollback-segment I created a logon-trigger:
    CREATE OR REPLACE TRIGGER a_logon AFTER LOGON
    ON DATABASE
    WHEN ( USER IN ( 'SCOTT', 'BOB' ) )
    BEGIN
    SET TRANSACTION USE ROLLBACK SEGMENT rbs_big;
    END;
    But I still get "snapshot to old" messages from the select, which contains the name off an other rollback-segment in the message.
    The trigger really fires, i tested it by adding an insert-statement to a log-table.
    What`s wrong ?

    The set transaction use rollback segment lasts only until you commit or rollback first time and all other transactions in that session will not be forced to that rbs anymore. Other possible solution could be that other users are accessing same tables / updating them so those sessions can't keep the read consistent image available anymore for your sessions.

  • Set Transaction Use Rollback segment

    Hi everybody. Does It make sense issue a "set transaction use rollback" for a single query that do not update, insert or delete. The trouble is that I get e "SnapShot too Old" for a query that just do a query.
    Thanks!

    No, If you are not making any modifications then you do not generate rollback (or even a transaction to my knowledge). The SNAPSHOT TOO OLD is because a different session has run through the rollback for the read consistent view you need (either because someone made changes to a table you are reading or from delayed block cleanout). Delayed block cleanout is a pretty complicated scenario so I'll leave it to the Oracle documentation to explain that. Just be aware that even if nobody has made changes to the table since you started your query you can still get SNAPSHOT TOO OLD. Thankfully, 9i helps elleviate this somewhat with the introduction of UNDO TABLESPACES.
    Richard

  • TRANSACTION을 ROLLBACK SEGMENT에 할당하는 방법(SET TRANSACTION USE)

    제품 : ORACLE SERVER
    작성날짜 : 2003-04-04
    TRANSACTION을 ROLLBACK SEGMENT에 할당하는 방법
    ==============================================
    (SET TRANSACTION USE ROLLBACK SEGMENT)
    Purpose
    Batch job 등을 사용할 때 특별히 크게 만든 rollback segment를 사용하도록
    할 수가 있다. transaction에 특정한 rbs를 지정하는 방법을 알아보자.
    Explanation
    Oracle은 다음과 같은 규칙에 의해 각 Transaction이 사용하는 Rollback
    segment를 결정한다.
    1. Active Transaction의 수가 가장 작은 Rollback Segment에 할당한다.
    2. 만약 1의 조건에 만족하는 Rollback segment가 하나 이상이면, 가장
    마지막에 할당된 rbs 다음의 rbs를 할당한다. 이것은 undo 기능을 더
    오래 지속시키도록 해 준다.
    그러나, Application이 큰 rollback segment가 필요하다면 위와 같이
    자동적인 rollback segment의 할당이 아닌 Manual하게 특정 rollback
    segment를 할당 가능하다.
    다음의 방법을 사용한다.
    1) 큰 rollback segment를 만든다. 큰 rollback segment 를 만들기
    위해서는 rbs tablespace에 영역이 충분히 커야 하므로 필요할 경우
    tablespace를 확장하는 작업을 한다.
    <tablespace 확장>
    $ sqlplus system/manager
    sql> alter tablespace rbs add datafile '?/rbs1SID.dbf' size 100m;
    <rollback segment 생성>
    sql> create rollback segment big_rbs storage(initial 10m next 10m)
    tablespace rbs;
    sql> alter rollback segment big_rbs online;
    2) Transaction 를 assign 한다.
    <sqlplus>
    SQL> set transaction use rollback segment big_rbs;
    <pro*c>
    exec sql commit work;
    exec sql set transaction use rollback segment big_rbs;
    <forms>
    dbms_transaction.use_rollback_segment('big_rbs');
    이와 같이 지정하면 이후에 commit 또는 rollback이 일어날 때까지
    한 transaction에만 해당된다.

  • Rollback segment for set transaction

    there is way that i can setup a rollback segment for a spacific user or specific transction.
    ALTER ROLLBACK SEGMENT big_rbs ONLINE;
    SET TRANSACTION USE ROLLBACK SEGMENT big_rbs;
    sql .....
    commit;
    ALTER ROLLBACK SEGMENT big_rbs OFFLINE;
    the sql is going for about hour, i was woundering during that time can some else use this rollback segment. i just want this rbs to this user, how i can do that.
    thanks

    I guess i didn't clearify well. let say i created a rbs for specific tranction. before this transaction is start it will turn on this rbs and once this transaction is completed, it issue the command commit, and bring it back to this rbs offline. the question is durning this transaction does any other transaction can come and use this rbs instead of we have lot of other rbs.
    I hope that you get my point.

  • Set transaction use roll back segmet

    Hi all:
    I have lot of packages with the statement set transaction use roll back segment RBS_BIG.I am working on upgrade project and using undo tablespaces.
    Is there a quick way to grep the this statement from all the packages and remove off.Does the presence of this statement in packages of new database cause compilation errors ?
    Thanks,
    Ganesh

    Hi,
    Set init.ora parameter as follows and restart database. All SET TRANSACTION USE ROLLBACK SEGMENT statements will have no effect and ignored.
    UNDO_SUPPRESS_ERRORS=TRUE
    You may use ALTER SYSTEM rather than restart db. If your database use spfile.ora, you have to execute:
    ALTER SYSTEM SET UNDO_SUPPRESS_ERRORS=TRUE SCOPE=BOTH;
    Best regards,
    Dima

  • Set transaction use roll back

    Hi all:
    I have lot of packages with the statement set transaction use roll back segment RBS_BIG.I am working on upgrade project and using undo tablespaces.
    Is there a quick way to grep the this statement from all the packages and remove off.Does the presence of this statement in packages of new database cause compilation errors ?
    Thanks,
    Ganesh

    The set transaction use rollback segment <rbsegment> is ignored in 10g. In 9i databases this could cause errors when using automatic undo management. For your 9i databases you can suppress the errors by setting UNDO_SUPPRESS_ERRORS=true.

  • ORA-01555: snapshot too old / set transaction

    Hello,
    When I execute a query in a script I have the following error: ORA-01555: snapshot too old...
    At the beginning of the script I have SET TRANSACTION use rollback segment XX.
    On the other hand I used SET TRANSACTION READ ONLY and I had no errors.
    It is a fate or it is the solution?
    What is the difference?
    Thanks

    It's probably just fate. SET TRANSACTION READ ONLY guarantees a read consistent view during the whole transaction rather than an individual statement, but it is not a sovereign remedy against ORA-1555.
    SET TRANSACTION USE ROLLBACK SEGMENT XXXX is meaningless in the context of a SELECT only transaction.
    The ORA-1555 is casued by someone else doing DML that the rollback segment holding the undo information that Oracle uses to provide read consistency. The way to prevent it is to manage the rollback segments properly - big, numerous, high minextents, no shrinking - or to use 9i UNDO tablespace instead.
    Cheers, APC

  • Working example of AXI Ethernet in Zynq PL

    Does anyone have a working example of setting up Xilinx Linux to use an AXI Ethernet IP embedded in Zynq PL? We are attempting to connect the Zynq to an AVNET ISM FSM card with a DP83640 PHY onboard. We have set Linux up using the following device tree and can communicate with the PHY using MDIO. However transmitting packets does not work.
    axi_ethernet_0_dma: axi-dma@40400000 {
    axistream-connected = <&axi_ethernet_0_eth_buf>;
    //axistream-control-connected = <&axi_ethernet_0_eth_buf>;
    compatible = "xlnx,axi-dma-6.03.a","xlnx,axi-dma-1.00.a";
    //compatible = "xlnx,axi-dma";
    interrupt-parent = <&ps7_scugic_0>;
    interrupts = <0 58 4 0 59 4>;
    reg = <0x40400000 0x10000>;
    dma-channel@40400000 {
    compatible = "xlnx,axi-dma-mm2s-channel";
    interrupts = < 0 58 4 >;
    dma-channel@40400030 {
    compatible = "xlnx,axi-dma-s2mm-channel";
    interrupts = < 0 59 4 >;
    axi_ethernet_0_eth_buf: network@41000000 {
    axistream-connected = <&axi_ethernet_0_dma>;
    axistream-control-connected = <&axi_ethernet_0_dma>;
    clock-frequency = <25000000>;
    clock-names = "ref_clk";
    clocks = <&clkc 0>;
    compatible = "xlnx,axi-ethernet-1.00.a";
    device_type = "network";
    interrupt-parent = <&ps7_scugic_0>;
    interrupts = <0 57 4>;
    local-mac-address = [00 0a 35 00 00 01];
    reg = <0x41000000 0x40000>;
    phy-handle = <&phy1>;
    xlnx,avb = <0x0>;
    xlnx,enable-lvds = <0x0>;
    xlnx,mcast-extend = <0x0>;
    xlnx,phy-type = <0x0>;
    //xlnx,phyaddr = <0x1E>;
    xlnx,rxcsum = <0x2>;
    xlnx,rxmem = <0x8000>;
    xlnx,rxvlan-strp = <0x0>;
    xlnx,rxvlan-tag = <0x0>;
    xlnx,rxvlan-tran = <0x0>;
    xlnx,simulation = <0x0>;
    xlnx,stats = <0x1>;
    xlnx,temac-addr-width = <0xc>;
    xlnx,txcsum = <0x2>;
    xlnx,txmem = <0x8000>;
    xlnx,txvlan-strp = <0x0>;
    xlnx,txvlan-tag = <0x0>;
    xlnx,txvlan-tran = <0x0>;
    //xlnx,type = <0x0>;
    mdio {
    #address-cells = <1>;
    #size-cells = <0>;
    phy1: phy@16 {
    reg = <16>;
    } ;

    Hello,
    The example form application note 1082 works fine, but bare in mind to use proper SFP-RJ45 adapter. Our tests have shown that this application note doesn't work with optical or copper sfp, and also with some adapters. Newly bought 1000Base-T adapter works perfectly.
    Kind regards
    Piotr Zdunek
    Warsaw University of Technology

  • Getting error ORA-02067: transaction or savepoint rollback required

    I am performing the task of archiving the data from one database into another database. This is being achieved by using a shell script. I run the shell script to call the procedure. After running two or three hours, I am getting the following error
    ORA-02067: transaction or savepoint rollback required
    Even I re-ran the job I was getting the same error.
    Can any one suggest me why I am getting this error and what is the possible remedial of it ?

    Please post this question in General Database Discussions forum.
    To get you started, here is what the documentation says about this error.
    ORA-02067:     transaction or savepoint rollback required
    Cause:     A failure (typically a trigger or stored procedure with multiple remote updates) occurred such that the all-or-nothing execution of a previous Oracle call cannot be guaranteed.
    Action:     rollback to a previous savepoint or rollback the transaction and resubmit.

  • ORA-02067: transaction or savepoint rollback required

    I am performing the task of archiving the data from one database into another database. This is being achieved by using a shell script. I run the shell script to call the procedure. After running two or three hours, I am getting the following error
    ORA-02067: transaction or savepoint rollback required
    Even I re-ran the job I was getting the same error.
    Can any one suggest me why I am getting this error and what is the possible remedial of it ?

    No version number.
    No operating system or hardware information.
    No information as to whether both databases are on the same machine.
    No information as to what the shell script does.
    No information as to what the procedure does.
    No information as to how communication between the databases is established.
    And you want us to tell you what you are doing wrong? <g>

  • Question on the "SET TRANSACTION" command

    I am using Oracle 8i on NT. Our front-end is written in Panther v4.2 (aka, Jam v7.0). We have a situation where we want to do a SET TRANSACTION type of process. IE... Module A is executing DML. It then calls Module B (without committing the DML) which has a commit. We want the DML in Module B to commit, Module A should not commit until after additional processing has taken place. All of my readings have shown me this works with SAVEPOINTS and ROLLBACKS. Any clue on how to do this with COMMITS?
    Thanks.

    Hello,
    Given the situation, I would recommend that you use the autonomous transaction facility of PLSQL. This facility will only work in oracle database verison 8.1.5 and above. Let me know if you need more information on it. My email address is
    [email protected]

  • Please Help:  A Problem With Oracle-Provided 'Working' Example

    A Problem With Oracle-Provided 'Working' Example Using htp.formcheckbox
    I followed the simple steps in the Oracle-provided example:
    Doc ID: Note:116534.1
    Subject: How to use checkbox in webdb for bulk update using webdb report
    However, when I select a checkbox and click on the Update button, I get a "ORA-01036: illegal variable name/number" error. Please advise. This was a very promising feature.
    Fred
    Below are step-by-step instructions provided by Oracle to create this "working" example:
    How to use a checkbox in WEBDB 2.2 report for bulk update.
    PURPOSE
    This article shows how checkbox can used placed on WEBDB report
    and how to use it.
    SCOPE & APPLICATION
    The following example to guide through the steps to create a working
    example of this.
    In this example, the checkbox is used to select the records. On clicking
    the update button, the pl/sql procedure is called which will update col1 to
    the string 'OK'.
    After the update is done, the PL/SQL procedure calls the report again.
    Since the report only select records where col1 is null, the updated
    records will not be displayed when the report is called again.
    Step 1 - Create Table
    From Sqlplus, log in as scott/tiger and execute the following:
    drop table chkbox_example;
    create table chkbox_example
    (id varchar2(10) not null,
    comments varchar2(20),
    col1 varchar2(10));
    Step 2 - Insert Test Data
    From Sqlplus, still logged in as scott/tiger , execute the following:
    declare
    l_i number;
    begin
    for l_i in 1..50 loop
    insert into chkbox_example values (l_i, 'Comments ' || l_i , NULL);
    end loop;
    commit;
    end;
    Step 3 -Create SQL Query based WEBDB report
    Logon to a WEBDB site which has access to the database the above tables are created.
    Create a SQL based Report.
    Name the report :RPT_CHKBOX
    The select statement for the report is :
    select c.id, c.comments, c.col1,
    htf.formcheckbox('p_qty',c.id) Tick
    from SCOTT.chkbox_example c
    where c.col1 is null
    In Advanced PL/SQL, (REPORT, Before displaying the form), put the following code
    htp.formOpen('scott.chkbox_process');
    htp.formsubmit('p_request','Update');
    htp.br;
    htp.br;
    Step 4 - Create a stored procedure in the database
    Log on to the database as scott/tiger and execute the following to create the
    procedure.
    Note: Replace WEBDB to the appropriate webdb user for your installation.
    In my database, I had installed webdb using WEBDB username, hence user webdb owns
    the packages.
    create or replace procedure chkbox_process
    ( p_request in varchar2 default null,
    p_qty in wwv_utl_api_types.vc_arr ,
    p_arg_names in wwv_utl_api_types.vc_arr ,
    p_arg_values in wwv_utl_api_types.vc_arr
    is
    i number;
    begin
    for i in 1..p_qty.count loop
    if p_qty(i) is not null then
    begin
    update chkbox_example
    set col1 = 'OK'
    where chkbox_example.id = p_qty(i);
    end;
    end if;
    end loop;
    commit;
    /* To Call Report again after updating */
    SCOTT.RPT_CHKBOX.show
    (p_request=>'Run Report',
    p_arg_names=>webdb.wwv_standard_util.string_to_table2(' '),
    p_arg_values=>webdb.wwv_standard_util.string_to_table2(' '));
    end;
    Summary
    There are essentially 2 main modules, The WEBDB report and the pl/sql procedure (chkbox_process)
    A button is created via the advanced pl/sql coding which shows on top of the report. (The
    button cannot be placed at the bottom of the report due to the way WEBDB creates the procedure
    internally)
    When any button is clicked on the report, it calls the pl/sql procedure chkbox_process.
    The procedure is called , WEBDB always passes the parameters p_request,p_arg_names and o_arg_values.
    p_qty is another parameter that we are passing additionally, This comes from the checkbox created
    using the htf.formcheckbox in the report select statement.
    The pl/sql procedure calls the report again after processing. This is done to
    show how to call the report.
    Restrictions:
    -The Next and Prev buttons on the report will not work.
    So it is important that the report can fit in 1 page only.
    (This may mean that you will not select(not ticked) 'Paginate' under
    'Display Option' in the WEBDB report. If you do this,
    then in Step 4, remove p_arg_names and p_arg_values as input parameters
    to the chkbox_process)

    If your not so sure you can use the instanceof
    insurance,
    Object o = evt.getSource();
    if (o instanceof Button) {
    Button source = (Button) o;
    I haven't thoroughly read the thread, but I use something like this:if (evt.getSource() == someObjRef) {
        // do that voodoo
    ]I haven't looked into why you'd be creating a new reference...

  • Setting transaction isolation level on a replicated server stored procedure

    I have a SQL server that has replication turned onto to another server which is our reporting server. Replication is real-time (or close to it). On the report server I have a stored procedure that runs from a SRS report. My question is it possible or advisable
    or does it even make sense to set the "SET TRANSACTION ISOLATION LEVEL READ COMMITTED" on at the beginning of the stored procedure which selects data from the reporting server database? Is it possible for uncommitted data on the OLTP side of the
    house to be replicated before it is committed? We are having data issues with a report and have exhausted all options and was wondering if dirty data maybe the issue since the same parameters work for a report 1 sec and then next it doesnt.

    Only committed transactions are replicated to the subscriber.  But it is possible for the report to see dirty data if running in READ UNCOMMITTED or NOLOCK.  You should run your reports in READ COMMITTED or SNAPSHOT isolation , and your replication
    subscriber should be configured with READ COMMITTED SNAPSHOT ISLOATION eg
    alter database MySubscriber set allow_snapshot_isolation on;
    alter database MySubscriber set read_committed_snapshot on;
    as recommended here
    Enhance General Replication Performance.
    David
    David http://blogs.msdn.com/b/dbrowne/

  • How to set transaction isolation level for a method in a Local Interface

              By reference at:
              http://e-docs.bea.com/wls/docs61/ejb/reference.html#1071267,
              the value for method-intf can only be "Remote" or "Home".
              My question is--
              How to set transaction isolation level for a method inside a Local Interface or
              Local_Home Interface?
              Thanks.
              Xing
              

    I'd try 6.1SP2. I'm pretty sure this works now.
              -- Rob
              Xing wrote:
              > I tried "Local", but got an error when deploying the EJB jar, saying that only
              > "Remote" or "Home" is allowed.
              >
              > Any idea?
              >
              > Xing
              >
              > Rob Woollen <[email protected]> wrote:
              > >
              > >
              > >Use LocalHome or Local.
              > >
              > >-- Rob
              > >
              > >Xing wrote:
              > >
              > >> By reference at:
              > >> http://e-docs.bea.com/wls/docs61/ejb/reference.html#1071267,
              > >> the value for method-intf can only be "Remote" or "Home".
              > >>
              > >> My question is--
              > >>
              > >> How to set transaction isolation level for a method inside a Local
              > >Interface or
              > >> Local_Home Interface?
              > >>
              > >> Thanks.
              > >>
              > >> Xing
              > >
              > >--
              > >
              > >----------------------------------------------------------------------
              > >
              > >AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
              > >
              > >by Michael Girdley, Rob Woollen, and Sandra Emerson
              > >
              > >http://learnWebLogic.com
              > >
              > >
              > >
              > >
              > ><!doctype html public "-//w3c//dtd html 4.0 transitional//en">
              > ><html>
              > >Use LocalHome or Local.
              > ><p>-- Rob
              > ><p>Xing wrote:
              > ><blockquote TYPE=CITE>By reference at:
              > ><br>http://e-docs.bea.com/wls/docs61/ejb/reference.html#1071267,
              > ><br>the value for method-intf can only be "Remote" or "Home".
              > ><p>My question is--
              > ><p>How to set transaction isolation level for a method inside a Local
              > >Interface
              > >or
              > ><br>Local_Home Interface?
              > ><p>Thanks.
              > ><p>Xing</blockquote>
              > >
              > ><pre>--
              > >
              > >----------------------------------------------------------------------
              > >
              > >AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
              > >
              > >by Michael Girdley, Rob Woollen, and Sandra Emerson
              > >
              > >http://learnWebLogic.com</pre>
              > > </html>
              > >
              > >
              AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
              by Michael Girdley, Rob Woollen, and Sandra Emerson
              http://learnWebLogic.com
              [att1.html]
              

Maybe you are looking for

  • Photoshop CS6 on Retina...

    I've downloaded CS6 for use with Apple's amazing Retina display. Why is my Photoshop UI still pixelated? I was expecting something amazing, and it's not all that great. Maybe I have to adjust something in my settings? Does anyone know when Adobe's ot

  • Unable to get open NAT and UPnP unavailable with PS3

    I just got my Jetpack couple days ago and was testing out the performance of it to see if I should drop my cable and keep the Verizon 4g. So far, it has been pretty good. I am seeing download speeds twice as fast, 24mbs, and upload speeds nearly 10x

  • Reject instead of Approval in Approval Stages

    Hi, Is it possible to use Reject instead of number of approvals required? I'm aware that document can be added using 1 approval. We have a client asking if it is possible to use either 1 reject or 1 approval to add the document. I For example, we hav

  • N95 in home lan

    hi!   My problem is that i cant use my phone with my wlan and stream music to it from my "server". I have Upnp enabled on that machine though... i can surf the internet with my n95 through my wireless router (belkin N1), so i dont think the issue lie

  • Bridge Mode?

    I just purchased a new Airport Time Capsule, but I cannot find a way to put it into bridge mode, which when purchasing I was told would be an option to extend the range of my existing router. When first setting up, I see the option to use it for exte