Welcome Guest ( Log In | Register )


 
 
 
 
 
 

 
 
Oracle 

Performance Tuning Reference poster
 
Oracle training in Linux 

commands
 
Oracle training Weblogic Book
 
Easy Oracle Jumpstart
 
Oracle training & performance tuning books
 
Burleson Consulting Remote DB Administration
 
 
 
Reply to this topicStart new topic
> Locks
Prasanna Rajayya...
post Mar 27 2012, 09:27 PM
Post #1


Newbie
*

Group: Members
Posts: 1
Joined: 27-March 12
Member No.: 46,987



Hello All,

I recently went through a book about locks ,i have a question in it ,so i request you to kindly clarify my question.

question
=====

As per the book , When a DML operation is done an automatic DDL lock is placed in the table . So to test this i created a table insert some rows ,commited and once again i updated the table at this point of time i did not commit the work (so the transaction is not completed) and issued a DDL (drop table) the table was droped . I dont understand why this happend ,Please clarify my question .

Thanks And Regards
Go to the top of the page
 
+Quote Post
Florin Aparaschi...
post Mar 28 2012, 01:55 AM
Post #2


Advanced Member
***

Group: Members
Posts: 52
Joined: 7-February 08
From: Iasi, Romania
Member No.: 17,075



Make sure that your tool (SQL*Plus or something else) is not on auto-commit.
Go to the top of the page
 
+Quote Post
burleson
post Mar 28 2012, 02:02 AM
Post #3


Advanced Member
***

Group: Members
Posts: 11,634
Joined: 26-January 04
Member No.: 13



Hi Prasanna,


>> I recently went through a book about locks

I have almost every Oracle book written, I know of no books about locks.

What book? What pages?

***************************************
>> Please clarify my question .

I have no idea what you are asking, sorry.

According to your "test" you were able to drop a table that contained uncomitted updates.

This does not make sense because Table locks perform concurrency control for simultaneous DDL operations so that a table is not dropped in the middle of a DML operation.

DDL is different from DML because DDL cannot be rolled back.

Instead of droping the table, try deleting all of the rows, using DML, not DDL.
DML locks or data locks guarantee the integrity of data being accessed concurrently by multiple users. DML locks help to prevent damage caused by interference from simultaneous conflicting DML or DDL operations. By default, DML statements acquire both table-level locks and row-level locks.



--------------------
Hope this helps. . .

Donald K. Burleson
Oracle Press author
Author of Oracle Tuning: The Definitive Reference
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 30th October 2014 - 12:29 PM