Restore the transaction committed

I am trying to execute the procedure in Oracle 12 c using SQL Developer

create table Parent
(
ID number(5),
Name Varchar2(50)
);
create table Child
(
ID number(5),
Name Varchar2(50)
);
Procedure ParentProc
begin
//Doing the Transactions
insert into Parent values(1,'Parent');
//calling child proc
ChildProc;
rollback;
end ParentProc;




Procedure ChildProc
begin
//Doing the Transactions
insert into child values(1,'Child');
commit;
end ParentProc;


The value in the child table persists even after that the restoration is used in the parent process.

There is a solution where the validation of the procedure of the child can be eliminated, but as child procedure is called by other sources also directly, if validation is necessary here.

And also, I don't want to use a variable to separate he was called by any other process, or if called directly.

I just want to know if I use the valid approach, I am submitting commit or rollback of the calling program

that I learned from this https://blogs.oracle.com/dev2dev/entry/write_recovery_code_with_transaction

This article shows everything we said.

1. the DML is run by the customer

2. then the command also committed by the customer if the DML succeeded

Just a question will be the oracle database GET two calls from the calling program

(1) the first Call When I Sumit the query.

(2) second call when I submit Commit / Rollback.

Yes - there are two statements and each of them will be sent to the server separately.

During this period the uncommitted transaction will be lock on the tables that are in the DML statements. or it is a hidden life?

Yes - No validated DML may have line and/or table locks. These locks will not come UNTIL the end of transactions - that is, until a commit or rollback is performed.

Tags: Database

Similar Questions

  • release of locks when the transaction is committed

    Hi guys,.

    I read Expert Oracle by Tom Kyte, and I'm a bit confused. I checked the errata (http://www.apress.com/book/downloadfile/2421), and nobody has pointed out the bit I'm confused about as an error, so maybe it's just that I understand is wrong.

    Tom says that when VALIDATION occurs, among other things:
    "* all locks held by the session are released."

    Now it's confusing me. Why are all the locks held by the SESSION released? I thought that we would release only the locks held by the transaction. I mean, our session could have many operations happening in it, Yes? Why then would we need to release all locks?

    Thank you

    You can do this in Developer SQL (and various other GUI). However, the GUI will be separate sessions for each SQL window opening. So your transactions will be executed in separate sessions.

    Justin

  • to restore the segment containing the block indicate

    Hello

    1. a database with no archivelog mode.

    2 the judgment

    3. startup mount

    4. restore the database

    5. change the database open

    6. Select * from report_data

    7 ORA-01578: block of data ORACLE (corrupted file # 16, block # 1389655)

    ORA-01110: data file 16: ' / app/oracle/oradata/etaxn/users07.dbf'

    ORA-26040: data block has been loaded using the NOLOGGING option

    01578 00000 - ' corrupted ORACLE data block (file # %s, block # %s)).

    * Cause: The specified data block has been altered, mostly due to software

    errors.

    * Action: Try to restore the segment containing the specified block. This

    may involve the removal of the segment and recreate it. If it is

    There's a trail file, report the errors inside your Oracle

    representative.

    8. how to restore the segment containing the block indicate?

    Indicate whether the segment containing this block is an Index or Table.  Query DBA_EXTENTS for this.

    If there is an Index, you can DROP INDEX and CREATE INDEX.

    If it is a table you could mark the corrupt block and Oracle will avoid to read the data in this block - lines in this block are not recoverable.

    Or you could restore the table from a backup (export or backup datapump?) and redo all the transactions that took place on the table since the backup.

    Start by reading Oracle Support Note "handling block Oracle Corruptions in Oracle 7 / 8 /» "8i/9i / 10g / 11g [ID 28814.1].

    Hemant K Collette

  • How to stop the transaction rollback

    Hello

    I created a bpel process that will make the PB data insertion, but I get the below error while inserting data. can someone please resolve this problem:

    Error log:

    faultName: {{http://schemas.oracle.com/bpel/extension} remoteFault} messageType: parts of {{http://schemas.oracle.com/bpel/extension} RuntimeFaultMessage}: {{summary = < summary > Exception is is produced when the link has been invoked. Exception occurred during invocation of the JCA binding: "JCA binding run reference"insert"operations have to: DBWriteInteractionSpec Execute Failed Exception." insertion failed. The descriptor name: [AddMoreBikes.Bikes]. Caused by java.sql.SQLException: cannot call Connection.commit in the distributed transaction. Transaction manager will commit the resource manager when the distributed transaction is committed... Check the logs for the record output full DBAdapter before this exception. This exception is considered as reproducible, probably due to a communication failure. To be classified as not reproducible instead, add property nonRetriableErrorCodes with the value '0' for the deployment descriptor (i.e. weblogic - RA.Xml). Auto retry a reproducible fault set composite.xml for this invoke these properties: jca.retry.interval, jca.retry.count and jca.retry.backoff. All properties are integers. ". The called JCA adapter threw an exception of resource. Please review the error message above carefully to determine a resolution. < / Summary >, detail = < detail > cannot call Connection.commit in the distributed transaction. Transaction manager will commit the resource manager when the distributed transaction is posted. {< / detail >, code = < code > < code > 0}

    Published by: Ajay8706 on February 19, 2013 22:44

    Hello

    To resolve this issue, go to the deployments on the weblogic console and open DBAdapter. Go to the Connection - Pool of outbound connections where the jndi is configured to talk to the jdbc data source.
    Expand the javax.resource.cci.ConnectionFactory, and then select the case of connection.
    There you can see that the name of data source is configured in the dataSourceName row while it must be configured in the xaDataSourceName line. This is because the data source, you must have defined as XA (confirmed by going on the transaction tab in jdbc configuration)

    Thank you
    Durga

    -It is considered good etiquette to the answerers rewards with points (as "useful" - 5 pts - or 'correct' - 10pts).

  • Flashback on the transaction request of $ v

    Hi all

    If I know the RCS just before the validation of the transaction after the transaction is committed, I can use the flashback transaction query of $ v to get the information about the transaction, such as undo segment undo number block, used.

    Here's the unit test, I use dbms_lock.sleep (6) because the smon_scn_time is updated every 6 seconds (Note ID: 281510.1)
    the problem is that the query flashback on the v$ transaction doest not working, no back to the last line.
    any advice?
    sys@SID10G> select * from v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
    PL/SQL Release 10.2.0.4.0 - Production
    CORE     10.2.0.4.0     Production
    TNS for MacOS X Server: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    
    sys@SID10G> drop table t purge;
    
    Table dropped.
    
    sys@SID10G> 
    sys@SID10G> create table t as select * from all_objects where rownum <= 1000;
    
    Table created.
    
    sys@SID10G> 
    sys@SID10G> exec dbms_lock.sleep(6);
    
    PL/SQL procedure successfully completed.
    
    sys@SID10G> 
    sys@SID10G> update t set object_name = lower(object_name);
    
    1000 rows updated.
    
    sys@SID10G> 
    sys@SID10G> --save the current scn for later flashback query
    sys@SID10G> col scn new_value _scn
    sys@SID10G> 
    sys@SID10G> select dbms_flashback.get_system_change_number scn from dual;
    
           SCN
    ----------
       6397848
    
    sys@SID10G> 
    sys@SID10G> select xidusn, xidslot, xidsqn, used_ublk from v$transaction;
    
        XIDUSN    XIDSLOT     XIDSQN  USED_UBLK
    ---------- ---------- ---------- ----------
             8         12       4725          8
    
    sys@SID10G> 
    sys@SID10G> select dbms_flashback.get_system_change_number scn from dual;
    
           SCN
    ----------
       6397848
    
    sys@SID10G> 
    sys@SID10G> commit;
    
    Commit complete.
    
    sys@SID10G> 
    sys@SID10G> exec dbms_lock.sleep(6);
    
    PL/SQL procedure successfully completed.
    
    sys@SID10G> select xidusn, xidslot, xidsqn, used_ublk from v$transaction as of scn &_scn;
    old   1: select xidusn, xidslot, xidsqn, used_ublk from v$transaction as of scn &_scn
    new   1: select xidusn, xidslot, xidsqn, used_ublk from v$transaction as of scn    6397848
    
    no rows selected
    Published by: Sidney Chen on August 7, 2011 15:33

    Please see,
    http://download.Oracle.com/docs/CD/E11882_01/AppDev.112/e17125/adfns_flashback.htm#g1703502

    You cannot recover data in a view of dynamic performance (V$). A query on this point of view always returns the current data.

    Aman...

  • How to restore the built in application of new? Unfortunately I deleted

    How to restore the built in application of new? Unfortunately I deleted

    Hello

    It is on the App Store.

    Delete apps Apple integrated from the home screen on your device iOS with iOS 10 - Apple Support

  • Our phone will make more phone calls, and we do not know how to change the settings to restore the capabilities of phoning.

    Our phone will make more phone calls, and we do not know how to change the settings to restore the capabilities of phoning.

    Greetings jenniferfrom46,

    From your post, I see that you are unable to make phone calls. I count on the ability to use my phone a lot to make calls, so I can understand your concern. I will be happy to provide you with some information for you.

    If you can not make or receive calls on your iPhone, this article goes on measures to take to help with the issue you are experiencing.

    Have a good!

  • To restore the backup of information to my new iPhone 7, I had to update iTunes.  I did it on my computer, but when I plug my phone into the computer, it tells me that I need the latest version of iTunes.  What should I do?

    I downloaded the latest version of iTunes to restore the backup of my new iPhone 7.  When I plug my computer into iPhone 7, I get the message that I need to update iTunes.  It is to show that I have updated the latest version, so I now do not know what to do.  Need help!

    In iTunes, go to the ' about iTunes' topic. What version do you currently use?

    What version of OS are you using on your computer?

    Your new phone should you use iTunes 12.5.1 requiring 10.9.5 OSX or higher.

  • How to restore the calculator application to drag it to the top of the screen to control

    Can how I restore the calculator to drag it to the top of the screen to control center? It seems to have been removed from the bottom row? Thank you

    Are - what you got to remove the calculator of your applications on the phone? You can find the calculator on the phone itself? If you find it, then try a reset. Hold down the home and sleep/wake together until you see the Apple logo and then release. The phone will restart. There are no settings to change what appears on the display. See if the reset solves your problem.

    EDIT: what exactly you see in the Control Center? If you see only controls the music, then drag to the right to see the rest of the access to the control center.

  • Many problems, try to restore the Iphone 7 - help!

    I'll try to make a long story short:

    I backed up my iPhone 6. It was a 128 GB, which took some time.

    I have connected my iphone 7 (also a 128 GB) to iTunes. I got an error message that says something to not received data from the device. After a google search, I decided that I had to put my phone into recovery mode to restore the backup of the iphone 6. I did it. Then I got an another error message that says that I should update my iTunes. Updated my iTunes on my computer, I rebooted my computer and tried again. This time, he acted like it was going to work. My computer went through the lengthy process of installing the software and my new iphone restore 7. At the end of the restoration, I got a different error message saying that it was impossible to complete the restore.

    Now my iphone 7 is stuck in this mode where everything he says is "data recovery cannot take place. "Restore to your iPhone, please backup." He won't do anything else. When I connect it to iTunes, it says "iTunes could not connect to the iPhone because it is locked with a password. You must enter the password on the iPhone before it can be used with iTunes. "However, when I push my iphone home button 7, enter the password and then check the password, I will just go back to the screen that says"data recovery cannot be completed... ". "and the error message remains on my iTunes.

    I tried several times to get the iphone 7 in recovery mode, but I can't. I hold down the sleep and lower volume button, the Apple appears, I keep pressing the buttons, the Apple disappears, Apple appears again, I'm all in now the buttons, the Apple disappears and then nothing happens.

    I got a phone call from Apple in the AM, but I'm really frustrated that I was stuck with a device $ 700 that I can't do ANYTHING with all day. No indication at all is appreciated.

    Same old IPhone backup issues that have been around for years. This will be my last IPhone if I eventually return. My iPhone cannot be saved to icloud for some reason any and my iPhone 7 will not restore from iTunes backup. What a joke after so many years. ITunes has got to be the worst application ever created.

  • How to restore the Notes

    I recently started to use my writing notes and jotting down ideas, but last night I was not sure if my notes would be shared with my Mac friends since I have not got one for me and his had used for synchronization and sharing of music. I decided to disable iCloud notes with a warning noting that "all the iCloud notes would be deleted, you'd like ongoing?", I read it with a change of mindset, thought I pressed 'Cancel', but instead he deleted notes. I am very sure that I didn't quite save my iphone. Is it possible to restore the notes at all?

    iCloud only synchronizes the data (Notes) using your Apple ID only.

    If you deselect the Notes option in System Preferences > note, used to synchronize your Notes on YOUR devices.

  • can application not available I restore the data from an encrypted backup?

    I had to get my iPhone repaired, so I did a full backup to iTunes and reset Once it was fixed, I have restored the backup, but a few apps "could not be restored. In the case of the one that interests me, the app no longer seems to exist on the App Store - I found a link for it from a review of old, but the link is dead: the app no longer exists. Since it is an application that stores data on the heights of our children, and I had used it for a few years, I would like to be able to recover at least the RAW files of my support, even if the app no longer exists. It is not a large amount of data. The backup is encrypted, so none of the files have names that are meaningful, it is impossible to guess what file is associated with that particular application. Any suggestions?

    If you have the app in the iTunes library on your computer you can restore it from there.

  • Is it possible to restore the backup of the 6s on 5s unit mine?

    I'm trying to restore my backup to 5 old phone.

    After you select the backup file in iCloud on phone 5, I see "time remaning: estimation...» "and nothing happened.
    If I try to pick another Wifi network, I see the message "cannot restore the backup.

    This - see If iCloud backup could not be completed or you can not restore - Apple Support

  • Cannot restore the resolution of the laptop

    I have an old 15 "Macbook Pro mid-2010. I still mostly run for daily work snow leopard.

    I have hooked to an external monitor and experience the resolution on the external display. I used an external display several times before, but without twisting his resolution.

    In the past whenever I have disconnected externally internal display by default my good laptop back to its native resolution, which seems to be of 1280 x 1024.

    But since my experimentation with a resolution from the outside, it is no longer the case. Resolution "reads" 1280 x 1024 in System Preferences, but the screen is severely "letter-put in a box" with large black bars on each side, no amount of clicking on the various resolutions and return to 1280 x 1024 don't restore correctly display without black bans.

    I tried to zap the PRAM, thinking that that would restore the screen settings internal. But it does not work. Any ideas?

    Try a SMC reset. Article covers when necessary, but this will not affect anything.

    Reset the SMC

  • I can't restore the pre-FF34, same subject through search bar: config does not help.

    Today, my search bar came to randomly search bar 'new' post-FF34. Despite repeatedly activating / deactivating the browser.search.showoneoffbuttons in all: config, then by restarting the browser to a dozen times, this topic stubbornly remains with the new search. Does anyone know how to do so that he can keep looking for old? Or download the about: config switches to work again?

    The underlying code for the browser.search.showOneOffbuttons has been removed since Firefox 43 - there is no way to return to the range of older research.

    What I've read here, this - https://addons.mozilla.org/en-US/firefox/addon/classicthemerestorer/ - extension restores the old regime of the search bar - but I have not tried yet, I went to ESR 38 when Firefox 41 was released.

Maybe you are looking for