{"id":130,"date":"2009-10-12T20:31:46","date_gmt":"2009-10-13T01:31:46","guid":{"rendered":"http:\/\/appcrawler.com\/wordpress\/?p=130"},"modified":"2011-07-06T10:14:27","modified_gmt":"2011-07-06T15:14:27","slug":"library-cache-lock-during-grantrevoke","status":"publish","type":"post","link":"http:\/\/appcrawler.com\/wordpress\/2009\/10\/12\/library-cache-lock-during-grantrevoke\/","title":{"rendered":"Library cache lock during grant\/revoke"},"content":{"rendered":"<p>This is interesting.  I have always thought oracle latches were kind of mysterious, for lack of a technical term.  Don&#8217;t get me wrong, I understand semaphores (I have programmed with these before), and &#8220;test and set&#8221; operations on certain types of computer processors.  However, oracle&#8217;s rules are so intertwined that I never have a clear answer on when which latch is taken.<\/p>\n<p>However, I can definitely say that when you grant privileges on an object in a production database in the middle of a busy day, you could have problems.\u00a0  You probably know where this is going.<\/p>\n<p>Today, an application installer was installing some packages in a new schema.\u00a0 He was granting select\/insert\/update\/delete on several tables in the data schema.  We started seeing a large number of &#8220;library cache lock&#8221; wait events for users in another schema that were accessing the tables on which select privileges were being granted to the new schema.<\/p>\n<p>It turns out that this operation will actually stamp the LAST_DDL_TIME column of DBA_OBJECTS.\u00a0 It doesn&#8217;t invalidate the object in the STATUS column of DBA_OBJECTS, but there is a latch that existing sessions request as a result of this &#8220;invalidation&#8221;.<\/p>\n<p>See Metalink note 444560.1 for more information.<\/p>\n<p>&#8220;Be very careful with altering, granting or revoking privileges on database objects that frequently used stored PL\/SQL is dependent on. In fact, resolving this issue mostly depends on application project and system maintenance practices.&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is interesting. I have always thought oracle latches were kind of mysterious, for lack of a technical term. Don&#8217;t get me wrong, I understand semaphores (I have programmed with these before), and &#8220;test and set&#8221; operations on certain types&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"http:\/\/appcrawler.com\/wordpress\/2009\/10\/12\/library-cache-lock-during-grantrevoke\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"footnotes":""},"categories":[19,22],"tags":[],"_links":{"self":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/130"}],"collection":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/comments?post=130"}],"version-history":[{"count":9,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/130\/revisions"}],"predecessor-version":[{"id":1348,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/130\/revisions\/1348"}],"wp:attachment":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/media?parent=130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/categories?post=130"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/tags?post=130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}