oracle11g - Oracle - Transaction with a series of DDL statements -
oracle11g - Oracle - Transaction with a series of DDL statements -
i have series of rename table ddl statements run within transaction. during period, there other sessions running might hijack tables used rename above , cause resource contention/deadlock.
is possible accomplish in oracle? understand each ddl statements commit after each execution free tables other sessions hijack. how can ensure current session executing ddl statments finish before other sessions can access tables?
--lock table rename tbl b --possible contention commit release lock on tbl rename tbl b c rename tbl c d --commit
ddl statements in oracle each transaction. each ddl statement causes few or many changes in info dictionary, obj$. not sure, looking @ major work oracle has gone through ensure locking not issue versions of platform, think found easier commit per ddl statement maintain locks short in time , avoiding dead locks within session or between sessions doing ddl. under circumstances, can still sense oracle kernel doesn't lock dropping , creating many objects during production utilize ora-600 thrown @ head.
as workaround, can either utilize datamodel versioning introduced few years ago. have no working experience since restricted work, can find more on googling on 'edition-based redefinition' or going oracle manual. might not available in licensed edition of oracle working on.
as workaround, can execute statements during uptime. break sessions unless code users executing automatically recovers easily. remember each object has id , name. changing name might not alter id, many pointers object need refreshed, leading ora-4063 or alike. oracle has no pause/suspend sessions far know.
oracle oracle11g oracle10g ddl
Comments
Post a Comment