[Оракл] Что такое DDL, DML lock и в чем их различие?
up
Советую почитать основы. Например, открываешь Oracle9i Database Concepts, Release 2 (9.2) -> Part VII Data Protection -> 20 Data Concurrency and Consistency -> How Oracle Locks Data. Там всё подробно описано.
The purpose of a DML (data) lock is to guarantee the integrity of data being
accessed concurrently by multiple users. DML locks prevent destructive
interference of simultaneous conflicting DML or DDL operations. For example,
Oracle DML locks guarantee that a specific row in a table can be updated by only
one transaction at a time and that a table cannot be dropped if an uncommitted
transaction contains an insert into the table.
A data dictionary lock (DDL) protects the definition of a schema object while that
object is acted upon or referred to by an ongoing DDL operation. Recall that a DDL
statement implicitly commits its transaction. For example, assume that a user
creates a procedure. On behalf of the user’s single-statement transaction, Oracle
automatically acquires DDL locks for all schema objects referenced in the procedure
definition. The DDL locks prevent objects referenced in the procedure from being
altered or dropped before the procedure compilation is complete.
Oracle acquires a dictionary lock automatically on behalf of any DDL transaction
requiring it. Users cannot explicitly request DDL locks. Only individual schema
objects that are modified or referenced are locked during DDL operations. The
whole data dictionary is never locked.
thx, хотя это я и так знал. Лано, видимо никаких особых спецификаций нет, это хорошо.
Оставить комментарий
Accident12
Что такое DDL, DML lock и в чем их различие?В общих чертах я ответ знаю, но может кто подробности расскажет.