Why Oracle does not allow rollback of  DDL statements?

I have always been surprised why Oracle does a implicit commit when DDL statements (e.g create table …) are executed. DDL statements simply write information (insert, delete and update) to data dictionary, so why DDL statement cannot be rolled back. Am I missing some thing?
I was learning SQL Server few months ago and I noticed that SQL Server does allow rollback of DDL statements if I am not mistaken. It lloks like there is something in Oracle architecture which prevents rollback of DDL satements. Rollback of all staements should be allowed not just of DML statements.
Appercaite your insight.

If you drop a 500 million row table (and let's assume you're not using the Recycle Bin, which is a different matter entirely), how do you propose to re-insert all 500 million rows if you were to be allowed to rollback the drop command? Same thing goes for a truncate command.
I'm not saying there aren't workarounds (the Recycle Bin is precisely one of those), but it's certainly problematic. You could very well reverse the transaction ('delete from TAB$...') quite easily... but reversing the other consequences of that transaction is a lot more awkward. Therefore, it is certainly logical to declare such transactions irreversible and thus to imply a commit, both before and after.
Or take it from another philosophical angle: a transaction that doesn't commit (or rollback) takes exclusive row-level locks that are held indefinitely and which will prevent other people from doing DML on the same rows, yes? Well, how do you fancy having an 'alter table' statement sitting around, uncommitted, in the data dictionary? Some process (or your users) are wanting to insert rows into this table, but the uncommitted alter command means that they can't acquire the shared table lock they need in order to be able to do so. One uncommitted DDL can seriously gum up the works, in short.
Dictionary tables are not like ordinary user tables, because whilst what I do in INVOICES very likely has no impact on what you do in SALARIES, what I propose to do in TAB$ very definitely impacts what you might need to do in TAB$. Under those circumstances, it's a jolly good thing that Data Dictionary DDL doesn't leave a trail of uncommitted transactions hanging around! And the mechanism to achieve that 'good thing' (i.e., auto-committing) means such transactions must be immediately irreversible.
Fair enough if other databases have chosen to handle things differently: their prerogative, of course. My point is simply that there is logic in NOT being able to roll back DDL statements, too, and it's a legitimate choice to have made to handle things in this way, too.

Similar Messages

  • Why Apple does not allow to use WHATSAPP WEB on iPhone?

    Why ?! Why does android allow it...blackberry... windows phone...why all top brands but apple??!?!

    Eloyco wrote:
    Then please send a feedback to Apple telling them we all want to use whatsapp web !!
    Why do you think you can speak for all of us?  I don't want to use that app or function.  Regular messages and iMessages work just fine for me.
    If you want Apple to change something, then tell them, using the link already provided.

  • Why DDL during SELECT is possible. Or why SELECT does not put a table lock?

    This is a question to people who really knows Oracle internals or/and RDB theory.
    (The question is relocated from another thread for not hijacking on that's original question.)
    Why DDL during SELECT is possible? Or why SELECT does not put TM 2 Row Shared lock on table(s)?
    This not locking causes a possibility while one session is running a long select, another can truncate and even drop table(s) that are being read by the first session.
    I think, humbly assume, that Oracle does not put TM 2 lock on tables, that are being simply SELECTed, by some significant technical reason. But I do not know this reason. If somebody knows please shed a light.
    Also, if you know that this behavior is totally correct from perspective of RDB theory, please explain me.
    I'll try to explain my point.
    It is a matter of data consistency and integrity that is supported in Oracle everywhere except this place.
    a) If one session is reading data from moment T and other session changes data on its way at moment T1, the first session wont read that changed data, it will read the data that was there on moment T.
    This is declared as Read Consistency principle.
    b) If one session is changing data, and another session tries to truncate or drop table - the second session will fail with error ORA-00054: resource busy and acquire with NOWAIT specified.
    This is declared as Data Integrity principle.
    c) But why not to follow the above principles in case when one session reads data and another session tries to truncate or drop table (or do other DDL operations)?
    It is counter-intuitive. Why not to put TM 2 (SS) lock during SELECT execution that would prevent DDLs on this table?
    What I only can assume is that this is only because some technical difficulty or limitation.
    What is this limitation or other reason in favor of which Oracle sacrificed consistency in this case?

    user11181920 wrote:
    Aman,
    There was no need to clarify how DML lock works, I know that.
    Also I know that in Oracle a Select does not lock neither table rows nor table itself.
    The reason I mentioned it because you brought up the word change which is far better suited for DML's than DDL's as the former has a requirement to have its Undo preserved.
    Again, my question was why Select does not protect itself by locking table(s), partitions and indexes?Protect from what? There is nothing wrong with doing a select. What would happen with a select doing a lock on the table before being executed in its entirety (forget DDL and DML altogether for a moment) ? State one good reason that there should be a lock for the select. If it has to, it would be always isn't it?
    The keyword here is concurrency and that's what is the best when the number of locks obtained are lesser at non-required operations. A select doesn't change anything that's why in Oracle, there is no read-level lock.I am not saying about row locks while reading. They are not needed because Undo resolves concurrency.Only in the case of DML where the change is still active and the buffers are dirty. With a DDL, its an implicit commit.
    I am asking why Select does not enqueue one, only one lock per object that participates in the Select?Again, my question back to you is, what good you would get from it? What purpose it would solve?
    It is not very expensive, I suppose. But it would protect from DDLs that can destroy the Select's result set. You have seen in your system and in my demo(and that's what the the question was on the other thread also) that the result remains intact and its not a behavior from now. Its the same since the time I have started learning Oracle. Can you explain that why you think that the result of select statement would be wrong for a drop table? I believe, its been stated repeatedly that if the select has no requirement to look back the table, it would get completed. Only if the select needs to access the table again, it would fail. So even if we consider your explanation, there is no wrong result shown at all. Once the session encounters that the table is dropped for the statement, the execution stops right away. So where is the destroyed result?
    Yes, it is less dangerous when Select does not lock table comparing with what would happen with DMLs in such case (that is why DMLs protect themselves by TM 3), it affects only the Select and its consumer, but still ... I don't understand this Oracle's decision. What is a reasoning behind it?.As I said, to improve concurrency.
    Aman....

  • Hello to you in the company Apple. I am having a problem in the Apple Store ID does not allow me to work on the Apple Store I hope that you will help. You have sent you yesterday and today I want to call the phone number for Mei you and explain to you why

    Hello to you in the company Apple. I am having a problem in the Apple Store ID does not allow me to work on the Apple Store I hope that you will help. You have sent you yesterday and today I want to call the phone number for Mei you and explain to you why with many thanks

    Sorry, but you can't reach Apple here. This is a user to user forum and Apple does not follow these discussions.
    Try this link to contact Apple directly:
    Apple - Support - iPhone - Contact Support
    Did you already have a look at this page?
    App Store Frequently Asked Questions (FAQ)

  • Macbook icloud music list does not allow new music download why?

    My macbook icloud music list does not allow new music download why? I have only 5.000 mp3.

    in turkish:
    merhaba,
    Benim anlatmak istedigim daha once harici diskimde olan sarkilari macbookta iclouddaki playlistlerime sarkı kopyalıyordum bir sorun yoktu ama dunden beri izin vermiyor uyari cıkıyor "bu sarkıları yuklerseniz listedeki diger sarkilar silinecek ve sadece bu bilgisayarda kullanabileceksiniz" seklinde sorun ne olabilir?

  • Safari does not allow shut down why.??

    safari does not allow shut down why.? I get a tab that says to quite  safari and i do, but it still does not allow it to shut down why.?

    You can force quit safari if you really want to shut it down.. if the problem remains , try deleting safar and downloading it again

  • Does anyone know why FCP is not allowing me to share a video (47 sec or 18 sec) to facebook

    Does anyone know why FCP is not allowing me to share a video (47 sec or 18 sec) to facebook?

    Hi, is it one of these formats, in 16:9 aspect ratio, & smaller than the size it says on that page?
    http://www.facebook.com/help/218673814818907/

  • Why is it that when i connect my ipad the laptop only detects the storage and does not allow me to send any files to it?

    Why is it that when i connect my ipad the laptop only detects the storage and does not allow me to send any files to it?

    The iTunes application is used to transfer content to the iPad.
    See http://www.apple.com/itunes/download/

  • Why is that 785GT-E63 bios does not allow GPU overclock?

    Why is that 785GT-E63 bios does not allow GPU overclock?
    while other motherboard on the same price range or perhaps cheaper allows it.
    Anyways there are software solution but I hope a bios support would do. My old Geforce 8300 supports overclocking GPU via bios.

    From my past experience, I would try uninstalling CCC and install ATI Tray Tool, or ATI Tools and see if you can OC a bit that way - if you do remember dont OC far just a tad as it will likely cause heat issues and onboard GPU is fanless.

  • IPad 2 mail does not allow a gmail imap configuration.  Why?

    iPad 2 mail does not allow a gmail imap configuration.  Why?

    It does, but you can do better then that. You can set gmail as exchange, it will give you even more options.
    The only thing that you need to know additional to regular stuff, is that instead of gmail you have to use Microsoft Exchange, and the name of google server is m.google.com. Instructions right here.
    http://support.google.com/mail/bin/answer.py?hl=en&answer=138740

  • Why resource cost in Oracle does not equal the total on the routing of Usage.

    why resource cost in Oracle does not equal the total on the routing of Usage.

    Hi Judy,
    I could not reproduce your issue. Is your Project Server patched with the latest SP and CU?
    Also can you reproduce this unexpected behavior with another project?
    Can you split your screen from the resource usage view, display the resource form and click right on the grey part selecting "schedule"? Then you'll have the scheduled start and finish dates for the resource's assignments. This is to be sure that
    you are not missing any parts of the assignments due to a wrong zoom in the timephased grid.
    Hope this helps,
    Guillaume Rouyre, MBA, MCP, MCTS |

  • Why does ipod does not allow to download free app free??

    My Ipod touch does not allow to download anything that is free or paid apps on my ipod. even if an app is free it asks for verification which directs me to payment gallery how come this is happening if an app is free it should not charge me it should not go for verification payment info How do I rectify this problem please help as this is frustrating I cannot download anthing from the app store!!!!!!!!

    To purchase anything with a normal account requires a valid payment method.  Yu can however create a new account that is oly good for app. To do that see:
    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card

  • Firefox does not allow my on-line bank account security phrase to be retained - why?

    Hello,
    I have successfully used MS Internet Explorer to log into my on-line bank account in the past. Since changing to Firefox my login process has become incumbered. The bank requires a security phrase as a part of an initial personal PC to bank account security setup measure, which security phrase information is supposed to be retained on my PC for subsequent logins into my on-line account. I still need to enter the usual username and password, but for some reason Firefox does not allow the security phrase information to be retained on my PC and so I have to enter the security phrase each time I log in. I called my bank's IT department and together we tried changing some Firefox settings, but none of them fixed this problem. I also have AVG and Super Antispyware loaded on this PC.
    Do you have a solution to this problem?

    The arrow to open the tab history of the Back and Forward buttons has been removed in Firefox 4.
    Use one of these methods to open the tab history list:
    * Right click on the Back or Forward button
    * Hold down the left mouse button on the enabled Back or Forward button until the list opens
    You can look at this extension:
    * Backward Forward History Dropdown: https://addons.mozilla.org/firefox/addon/backforedrop/

  • In Security, clicking on the "Saved Password" button displays your current saved password for each site. It does not allow you to change a password. How would you do that?

    In Security, clicking on the "Saved Password" button displays your current saved password for each site. It only allows you to view and delete site passwords. It does not allow you to change a password. How would you do that?

    If you enter a new password Firefox should offer to change the password.
    *You may not need to delete the old password. Try "Refreshing" the page, entering the site again, you may need to let Firefox fill in the old password, then enter the new password, and Firefox should ask to save the new password. See:
    **http://kb.mozillazine.org/Deleting_autocomplete_entries
    *If you delete the old password, you may need to "Refresh" the site after deleting the old password.
    If you want to delete the password that has been saved do the following:
    #In the Tools menu select Options to open the options window
    #Go to the Security panel
    #Click the "Saved Passwords" button to open the passwords manager
    #Select the site in the list, then click Remove
    <br />
    <br />
    '''You need to update the following.''' The Plugin version(s) shown below was/were submitted with your question and is/are out of date. You should update to avoid known security issues with the version(s) you have installed. Click on "More system info..." to the right of your question to see what was included with your question.
    *Adobe PDF Plug-In For Firefox and Netscape 8.3.0 (''Note: this is a very old version and installing the current version may not delete it or overwrite it. To avoid possible problems with having 2 versions installed on your system, you may want to remove the old version in Windows Control Panel > Add or Remove Programs before installing the new version'').
    *Shockwave Flash 10.3 r181 (''this may be current but a new version was released on 2011-06-14 with a ".26" after the "181". You can use the Plugin Check below and/or look in Add-ons > Plugins for the version of Shockwave Flash that you have installed. The newest version will be shown in Add-ons > Plugins as "Shockwave Flash 10.3.181.26"'').
    *Next Generation Java Plug-in 1.6.0_24 for Mozilla browsers
    #'''''Check your plugin versions''''' on either of the following links':
    #*http://www.mozilla.com/en-US/plugincheck/
    #*https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    #*'''Note: plugin check page does not have information on all plugin versions'''
    #*There are plugin specific testing links available from this page:
    #**http://kb.mozillazine.org/Testing_plugins
    #'''Update Adobe Reader (PDF plugin):'''
    #*From within your existing Adobe Reader ('''<u>if you have it already installed</u>'''):
    #**Open the Adobe Reader program from your Programs list
    #**Click Help > Check for Updates
    #**Follow the prompts for updating
    #**If this method works for you, skip the "Download complete installer" section below and proceed to "After the installation" below
    #*Download complete installer ('''if you do <u>NOT</u> have Adobe Reader installed'''):
    #**SAVE the installer to your hard drive (save to your Desktop so that you can find it after the download). Exit/Close Firefox. Run the installer you just downloaded.
    #**Use either of the links below:
    #***https://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox ''(click on "Installing and updating Adobe Reader")''
    #***''<u>Also see Download link</u>''': http://get.adobe.com/reader/otherversions/
    #*After the installation, start Firefox and check your version again.
    #'''Update the [[Managing the Flash plugin|Flash]] plugin''' to the latest version.
    #*Download and SAVE to your Desktop so you can find the installer later
    #*If you do not have the current version, click on the "Player Download Center" link on the "'''Download and information'''" or "'''Download Manual installers'''" below
    #*After download is complete, exit Firefox
    #*Click on the installer you just downloaded and install
    #**Windows 7 and Vista: may need to right-click the installer and choose "Run as Administrator"
    #*Start Firefox and check your version again or test the installation by going back to the download link below
    #*'''Download and information''': http://www.adobe.com/software/flash/about/
    #**Use Firefox to go to the above site to update the Firefox plugin (will also install plugin for most other browsers; except IE)
    #**Use IE to go to the above site to update the IE ActiveX
    #*'''Download Manual installers'''.
    #**http://kb2.adobe.com/cps/191/tn_19166.html#main_ManualInstaller
    #**Note separate links for:
    #***Plugin for Firefox and most other browsers
    #***ActiveX for IE
    #'''Update the [[Java]] plugin''' to the latest version.
    #*Download site: http://www.oracle.com/technetwork/java/javase/downloads/index.html (Java Platform: Download JRE)
    #**'''''Be sure to <u>un-check the Yahoo Toolbar</u> option during the install if you do not want it installed.
    #*Also see "Manual Update" in this article to update from the Java Control Panel in Windows Control Panel: http://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox#Updates
    #* Removing old versions (if needed): http://www.java.com/en/download/faq/remove_olderversions.xml
    #* Remove multiple Java Console extensions (if needed): http://kb.mozillazine.org/Firefox_:_FAQs_:_Install_Java#Multiple_Java_Console_extensions
    #*Java Test: http://www.java.com/en/download/help/testvm.xml

  • Dreamweaver does not allow me to edit the editable region

    Oh my, I'm so desperate in this, I have a .dwt and have set up the editable region as well. When I want to make a new html file from the said template dreamweaver does not allow me to edit it. I mean, all the code is completely grayed out as if the template itself is locked by default.
    What I want to do is to create several new pages such as new albums, charts, genres, contacts (which all based on the home template) The home template itself has slider in its body. For the new html files I'm about to create (which I'm so desperate why I can't do so) I want the header and footer to remain the same.
    Here is an image of my index.dwt (my homepage) anything inside the red frame is what I want to edit for new albums, charts, genres, contacts, login page, etc. The top part is the header and the bottom one is the footer (Excuse the right image, I'm working on dual screen)
    Any help will be appreciated!
    Sorry for my english

    Hello SeptianNugraha,
    here some hints concerning while handling templates (I quote):
    The main principle of DW Templates is:
    Non-editable regions = propagate to all child pages. The content of non-edtable regions is identical on all child pages. When you edit a non-editable region, DW propagates all changes to all child pages.
    Editable regions = do not propagate because they're unique to every child page. The whole idea of editable regions is that they contain page specific content which does not appear on any other child page.
    And:
    PART 1
    1. Create a prototype page with all the sitewide elements (common header, footer, sidebar, etc..) that you will need for your entire project. This requires some careful pre-planning even for small web sites.
    2. Validate your code & test this prototype page in all major browsers. 3. When you're completely satisfied with your layout, SaveAs Template. DW will save this as a .dwt file in a site folder called Templates.
    4. DW will ask you to add Editable Regions for stuff that will change from page to page. Do this and SAVE.
    5. Close your Template.dwt file.
    PART 2
    1. File > New Page > from Template.  Select the template you wish to use.  Hit OK.
    2. This is a child page.  You can only edit content within editable regions.  Everything else is locked.
    3. SaveAs index.html (your home page) to the root in your local site folder.
    PART 3
    Repeat PART 2 for each additional page required.
    PART 4
    1. Open your main TEMPLATE file and add a navigation menu with links to your site pages.2. SAVE.3. DW will ask if you want to populate changes to child pages.  Hit yes.
    4. Publish all site pages to your server.
    PART 5
    If you should ever need to edit your TEMPLATE .dwt file, Repeat PART 4.
    Good luck!
    Hans-Günter

Maybe you are looking for

  • Ipod touch 1st generation won't play on ihome doc

    I have a 1st generation ipod touch, 32GB.  I received an iHome for Christmas last year that states it is compatible with the 1st generation ipod touch however when I put it in the cradle, it connects and disconnects over and over.  I looked and iTune

  • Quicktime plays video in slow motion

    Quicktime plays my video from a Sony NEX-3 camera [H.264 MP4 files] in slow motion. The images plays at a reduced speed, while the sound plays at full speed. One consequence is that image and sound is completely out of sync. The video plays fine in i

  • Can I Change/ Extend the vendor from one purcahse Organisation to Other Pur

    Dear Al Is it possible to Change/extend  the Existing vendor to the new Purchase organisation or again we should create new vendor for the under the New Purchase organisation. Can you help me out please. Senario: We have 3 business areas earlier we h

  • Long time for execution for scheduled CIF background jobs

    Hi, we hv schedlued CIF background job to be run daily around 10.30 PST. there is large variation for the time required for execution of this job. on 26 Dec, it took approx 48000 seconds while regular average is 120 seconds only. today, despite past

  • Dynamic generate JNLP from JSP ?

    Hello, I tried to generate JNLP from JSP, but it just show the Opem/Save diakog and cannot startup the Web Start. I am using Tomcat-5.5.12 in WinXP + JDK1.5 How can I dynamically generate JNLP ? Eric