{"id":279,"date":"2011-11-11T23:57:07","date_gmt":"2011-11-11T15:57:07","guid":{"rendered":"https:\/\/yangtingkun.net\/?p=279"},"modified":"2011-11-12T09:31:39","modified_gmt":"2011-11-12T01:31:39","slug":"11-2%e6%95%b0%e6%8d%ae%e5%ba%93%e7%99%bb%e5%bd%95%e5%87%ba%e7%8e%b0library-cache-lock%e7%ad%89%e5%be%85%ef%bc%88%e4%b8%80%ef%bc%89","status":"publish","type":"post","link":"https:\/\/yangtingkun.net\/?p=279","title":{"rendered":"11.2\u6570\u636e\u5e93\u767b\u5f55\u51fa\u73b0library cache lock\u7b49\u5f85\uff08\u4e00\uff09"},"content":{"rendered":"<p>\u5ba2\u6237\u768411.2.0.2 RAC for Linux X86-64\u73af\u5883\u7684\u6570\u636e\u5e93\u5728\u767b\u5f55\u65f6\uff0c\u53d1\u73b0\u51fa\u73b0\u957f\u65f6\u95f4\u7b49\u5f85\u3002<br \/>\n\u8fd9\u4e00\u7bc7\u63cf\u8ff0\u95ee\u9898\u7684\u73b0\u8c61\u7684\u8bca\u65ad\u3002<br \/>\n\u51fa\u95ee\u9898\u7684\u65f6\u5019\u6211\u6b63\u597d\u5728\u5ba2\u6237\u73b0\u573a\uff0c\u4e8e\u662f\u5f53\u65f6\u8bca\u65ad\u4e86\u4e00\u4e0b\u3002<br \/>\n\u5ba2\u6237\u53cd\u6620\uff0c\u95ee\u9898\u53d1\u751f\u5728\u4e00\u4e2a\u7528\u6237\u4e0a\uff0c\u4f7f\u7528\u8fd9\u4e2a\u7528\u6237\u767b\u5f55\u9700\u8981\u7b49\u5f85\u5f88\u957f\u65f6\u95f4\uff0c\u800c\u4f7f\u7528\u5176\u4ed6\u7684\u7528\u6237\u767b\u5f55\u5219\u4e0d\u5b58\u5728\u95ee\u9898\u3002<br \/>\n\u9996\u5148\u68c0\u67e5\u4e86DBA_PROFILES\uff0c\u786e\u8ba4\u548c\u5bc6\u7801\u4ee5\u53ca\u767b\u5f55\u6709\u5173\u7684PROFILE\u662f\u5426\u5b58\u5728\u9650\u5236\uff0c\u5f53\u524d\u6570\u636e\u5e93\u5df2\u7ecf\u90fd\u8bbe\u7f6e\u4e3aUNLIMITED\uff0c\u90a3\u4e48\u95ee\u9898\u5e94\u8be5\u548cPROFILE\u65e0\u5173\u3002<br \/>\n\u68c0\u67e5\u51fa\u73b0\u95ee\u9898\u7684\u7528\u6237\uff0c\u4e5f\u672a\u53d1\u73b0\u4efb\u4f55\u7279\u522b\u4e4b\u5904\u3002<br \/>\n\u5728sqlplus\u4e0a\u4f7f\u7528\u8fd9\u4e2a\u7528\u6237\u767b\u5f55\uff0c\u7ecf\u5386\u4e86\u5c06\u8fd110\u79d2\u5de6\u53f3\u7684\u7b49\u5f85\uff0c\u7ec8\u4e8e\u6210\u529f\u767b\u5f55\u3002\u540c\u65f6\u68c0\u67e5\u5230\u4f1a\u8bdd\u5f53\u65f6\u51fa\u73b0library cache lock\u7b49\u5f85\u4e8b\u4ef6\u3002<br \/>\n\u5f53\u518d\u6b21\u5c1d\u8bd5\u91cd\u73b0\u95ee\u9898\u65f6\uff0c\u5374\u5df2\u53d1\u73b0\u95ee\u9898\u65e0\u6cd5\u91cd\u73b0\u4e86\uff0c\u73b0\u5728\u5373\u4f7f\u4f7f\u7528\u521a\u624d\u7684\u95ee\u9898\u7528\u6237\uff0c\u4e5f\u53ef\u4ee5\u5f88\u5feb\u767b\u5f55\u6210\u529f\uff0c\u5e76\u4e0d\u4f1a\u51fa\u73b0\u660e\u663e\u7684\u767b\u5f55\u7b49\u5f85\u3002\u83ab\u975e\u4e00\u6b21\u6210\u529f\u7684\u767b\u5f55\uff0c\u5c31\u53ef\u4ee5\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002<br \/>\n\u4e0d\u8fc7\u5f88\u5feb\uff0c\u95ee\u9898\u518d\u6b21\u51fa\u73b0\uff0c\u4e3a\u4e86\u68c0\u67e5\u4f1a\u8bdd\u6267\u884c\u7684\u5177\u4f53\u64cd\u4f5c\uff0c\u5bf9\u8fd9\u4e2a\u95ee\u9898\u7528\u6237\u521b\u5efa\u4e86\u4e00\u4e2a\u767b\u5f55\u89e6\u53d1\u5668\uff0c\u5728\u767b\u5f55\u89e6\u53d1\u5668\u4e2d\u8bbe\u7f6e\u4f1a\u8bdd\u7684TRACE\uff1a<\/p>\n<pre lang='SQL'>SQL> CREATE OR REPLACE TRIGGER T_AFTER_LOGON AFTER LOGON ON DATABASE\r\n2 BEGIN\r\n3 IF USER = 'GJT' THEN\r\n4 DBMS_SESSION.SESSION_TRACE_ENABLE(TRUE, TRUE);\r\n5 END IF;\r\n6 END;\r\n7 \/\r\nTrigger created.<\/pre>\n<p>\u867d\u7136\u95ee\u9898\u91cd\u73b0\u4e86\uff0c\u4f46\u662f\u627e\u5230\u4f1a\u8bdd\u7684TRACE\u4fe1\u606f\uff0c\u5374\u6ca1\u6709\u53d1\u73b0\u4efb\u4f55\u5f02\u5e38\u4e4b\u5904\uff0c\u751a\u81f3\u5728TRACE\u4fe1\u606f\u4e2d\u90fd\u627e\u4e0d\u5230\u4efb\u4f55library cache lock\u7b49\u5f85\u4e8b\u4ef6\u7684\u4fe1\u606f\u3002<br \/>\n\u800c\u4e14\u6b64\u65f6\u8fd8\u53d1\u73b0\u4e00\u4e2a\u73b0\u8c61\uff0c\u5c31\u662f\u5229\u7528\u8fd9\u4e2a\u7528\u6237\u767b\u5f55\u65f6\uff0c\u5373\u4f7f\u7528\u6237\u540d\u7684\u5bc6\u7801\u8f93\u5165\u9519\u8bef\uff0csqlplus\u4e5f\u4f1a\u7b49\u5f85\u5f88\u957f\u65f6\u95f4\uff0c\u7136\u540e\u624d\u4f1a\u8fd4\u56de\u9519\u8bef\u4fe1\u606f\u3002\u800c\u8fd9\u4e2a\u957f\u65f6\u95f4\u7684\u7b49\u5f85\u4eceV$SESSION\u89c6\u56fe\u4e2d\u67e5\u8be2\uff0c\u6070\u6070\u5c31\u662flibrary cache lock\u7b49\u5f85\u4e8b\u4ef6\u3002<br \/>\n\u4e0a\u9762\u7684\u4e24\u4e2a\u73b0\u8c61\u8bf4\u660e\uff0clibrary cache lock\u7684\u7b49\u5f85\u5b9e\u9645\u4e0a\u662f\u53d1\u751f\u5728\u7528\u6237\u767b\u5f55\u4e4b\u524d\u7684\u3002\u5176\u5b9e\u4ece\u6570\u636e\u5e93V$SESSION\u89c6\u56fe\u4e2d\u4e5f\u53ef\u4ee5\u770b\u51fa\u8fd9\u4e2a\u95ee\u9898\uff1a<\/p>\n<pre lang='SQL'>SQL> select sid, username, event, p1text, p1, p2text, p2, p3text, p3, seconds_in_wait\r\n  2  from gv$session\r\n  3  where event = 'library cache lock';\r\n        SID USERNAME                       EVENT              SECONDS_IN_WAIT \r\n----------- ------------------------------ ------------------ --------------- \r\n         19                                library cache lock              21\r\n       2017                                library cache lock              20\r\n       2062                                library cache lock               0\r\n       2147                                library cache lock              10\r\n       2210                                library cache lock              21<\/pre>\n<p>\u53ef\u4ee5\u770b\u5230\uff0c\u6240\u6709\u51fa\u73b0library cache lock\u7b49\u5f85\u7684\u4f1a\u8bdd\u7528\u6237\u540d\u90fd\u662f\u7a7a\u3002\u8fd9\u4e9b\u4f1a\u8bdd\u5e76\u4e0d\u662fOracle\u540e\u53f0\u8fdb\u7a0b\uff0c\u800c\u662f\u521a\u624d\u63d0\u5230\u7684\u95ee\u9898\u7528\u6237\uff0c\u8fd9\u540c\u6837\u8bf4\u660e\u5f53\u65b9\u5f0f\u8fd9\u4e2alibrary cache lock\u7b49\u5f85\u65f6\uff0c\u4f1a\u8bdd\u8fd8\u6ca1\u6709\u6210\u529f\u7684\u767b\u5f55\u5230\u6570\u636e\u5e93\u4e2d\u3002<br \/>\n\u90a3\u4e48\u73b0\u5728\u95ee\u9898\u6709\u70b9\u68d8\u624b\uff0c\u5982\u679c\u4f1a\u8bdd\u6ca1\u6709\u767b\u5f55\uff0c\u5219\u6ca1\u6709\u529e\u6cd5\u68c0\u67e5\u4f1a\u8bdd\u6267\u884c\u4e86\u54ea\u4e9b\u64cd\u4f5c\uff0cOracle\u7684\u6587\u6863\u4e2d\u4e5f\u6ca1\u6709\u63d0\u5230\u8fc7\uff0c\u4f1a\u8bdd\u767b\u5f55\u4e4b\u524d\u4f1a\u8fdb\u884c\u54ea\u4e9b\u64cd\u4f5c\uff0c\u7ecf\u5386\u54ea\u4e9b\u7b49\u5f85\u3002<br \/>\n\u5206\u6790\u4e00\u4e0b\u8fd9\u4e2a\u95ee\u9898\uff0c\u6574\u4e2a\u6570\u636e\u5e93\u76ee\u524d\u53ea\u6709\u8fd9\u4e2a\u7528\u6237\u51fa\u73b0\u4e86library cache lock\u7684\u7b49\u5f85\uff0c\u800c\u5176\u4ed6\u7528\u6237\u6ca1\u6709\u51fa\u73b0\uff0c\u8bf4\u660e\u95ee\u9898\u80af\u5b9a\u548c\u8fd9\u4e2a\u7528\u6237\u7684\u81ea\u8eab\u7279\u70b9\u6709\u5173\u3002\u800c\u6570\u636e\u5e93\u4e2d\u53ea\u5b58\u5728\u9ed8\u8ba4\u7684DEFAULT PROFILE\uff0c\u4e14\u6240\u6709\u9650\u5236\u90fd\u8bbe\u7f6e\u4e3aUNLIMITED\uff0c\u90a3\u4e48\u95ee\u9898\u5e94\u8be5\u548cPROFILE\u6ca1\u6709\u5173\u7cfb\u3002\u901a\u8fc7\u767b\u5f55\u89e6\u53d1\u5668\u8bbe\u7f6eTRACE\u540e\u53d1\u73b0\uff0c\u4f1a\u8bdd\u767b\u5f55\u540e\u5e76\u65e0\u4efb\u4f55\u5f02\u5e38\u64cd\u4f5c\uff0c\u4e14TRACE\u6587\u4ef6\u4e2d\u770b\u4e0d\u5230library cache lock\u7b49\u5f85\u4fe1\u606f\u3002\u800c\u4e14\u5373\u4f7f\u7528\u6237\u540d\u5bc6\u7801\u9519\u8bef\uff0c\u4e5f\u4f1a\u51fa\u73b0\u8fd9\u4e2a\u7b49\u5f85\u4e8b\u4ef6\u3002\u8fd9\u8bf4\u660e\u7b49\u5f85\u53d1\u751f\u5728\u767b\u5f55\u4e4b\u524d\uff0c\u4e0e\u7528\u6237\u767b\u5f55\u540e\u7684\u884c\u4e3a\u65e0\u5173\u3002<br \/>\n\u7b80\u5355\u603b\u7ed3\u4e00\u4e0b\uff0c\u95ee\u9898\u548c\u5f53\u524d\u7528\u6237\u7684\u81ea\u8eab\u7279\u6027\u6709\u5173\uff0c\u4e14\u4e0eDBA_PROFILE\u65e0\u5173\uff0c\u4e5f\u4e0e\u7528\u6237\u767b\u5f55\u540e\u7684\u884c\u4e3a\u65e0\u5173\u3002\u5982\u679c\u4e0d\u8003\u8651PROFILE\uff0c\u90a3\u4e48\u7528\u6237\u7279\u6709\u7684\u5c5e\u6027\u6050\u6015\u5c31\u5269\u4e0b\u4e86\u7528\u6237\u540d\u548c\u5bc6\u7801\u4e86\u3002\u800c\u4e14\u5728\u4e00\u6b21\u6210\u529f\u7684\u767b\u5f55\u6570\u636e\u5e93\u540e\uff0c\u8fd9\u4e2a\u73b0\u8c61\u66fe\u77ed\u65f6\u95f4\u6d88\u5931\uff0c\u8fd9\u8bf4\u660e\u95ee\u9898\u53ef\u80fd\u786e\u5b9e\u548c\u5bc6\u7801\u6709\u5173\u7cfb\u3002<br \/>\n\u572811g\u4e2d\uff0cOracle\u7684\u5bc6\u7801\u7b56\u7565\u786e\u5b9e\u51fa\u73b0\u4e86\u4e00\u4e9b\u6539\u53d8\uff0c\u6bd4\u5982\u5bc6\u7801\u53d8\u6210\u5927\u5c0f\u5199\u654f\u611f\u3002\u8fd9\u4e2a\u95ee\u9898\u5f88\u53ef\u80fd\u5bfc\u81f4\u8001\u7684\u7a0b\u5e8f\u6765\u8fde\u63a5\u6570\u636e\u5e93\u65f6\u51fa\u73b0\u5bc6\u7801\u9519\u8bef\u7684\u73b0\u8c61\u3002\u6b64\u5916\uff0c11g\u8fd8\u65b0\u589e\u4e86\u4e00\u4e2a\u5bc6\u7801\u76f8\u5173\u7684\u7279\u6027\u2014\u2014\u5bc6\u7801\u9519\u8bef\u5ef6\u8fdf\u9a8c\u8bc1\uff1a\u5f53\u7528\u6237\u8fde\u7eed\u7684\u8f93\u5165\u9519\u8bef\u7684\u5bc6\u7801\uff0cOracle\u6240\u9700\u8981\u7684\u5bc6\u7801\u9a8c\u8bc1\u65f6\u95f4\u4f1a\u9010\u6b65\u589e\u52a0\uff0c\u8fd9\u53ef\u4ee5\u6709\u6548\u7684\u907f\u514d\u6709\u4eba\u8bd5\u56fe\u901a\u8fc7\u66b4\u529b\u65b9\u5f0f\u6765\u7834\u89e3\u5bc6\u7801\u3002\u5173\u4e8e11g\u65b0\u589e\u5bc6\u7801\u9519\u8bef\u5ef6\u8fdf\u9a8c\u8bc1\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u53ef\u4ee5\u53c2\u8003\uff1ahttp:\/\/yangtingkun.itpub.net\/post\/468\/505041<br \/>\n\u90a3\u4e48\u5f53\u524d\u7684\u95ee\u9898\u548c\u8fd9\u4e2a\u5bc6\u7801\u5ef6\u8fdf\u9a8c\u8bc1\u6709\u5173\u7cfb\u5417\uff0c\u5982\u679c\u662f\u5bc6\u7801\u5ef6\u8fdf\u9a8c\u8bc1\u7684\u95ee\u9898\uff0c\u90a3\u4e48\u81f3\u5c11\u8981\u591a\u6b21\u91cd\u590d\u8f93\u5165\u9519\u8bef\u7684\u5bc6\u7801\u3002\u4e0d\u8fc7\u4ece\u521a\u624d\u7684V$SESSION\u89c6\u56fe\u4e2d\u53ef\u4ee5\u770b\u5230\uff0c\u95ee\u9898\u7528\u6237\u5b58\u5728\u591a\u4e2a\u4f1a\u8bdd\u5728\u767b\u5f55\u6570\u636e\u5e93\uff0c\u5982\u679c\u662f\u7a0b\u5e8f\u8fde\u63a5\u6570\u636e\u5e93\uff0c\u4e14\u914d\u7f6e\u4e86\u9519\u8bef\u7684\u5bc6\u7801\uff0c\u90a3\u4e48\u57fa\u672c\u4e0a\u5c31\u53ef\u4ee5\u786e\u5b9a\u95ee\u9898\u4e86\u3002<br \/>\n\u8be2\u95ee\u4e86\u76f8\u5173\u7a0b\u5e8f\u4eba\u5458\uff0c\u53d1\u73b0\u4e00\u4e2a\u6d4b\u8bd5\u7a0b\u5e8f\u7684\u5bc6\u7801\u786e\u5b9e\u914d\u7f6e\u9519\u8bef\uff0c\u4e14\u8fd9\u4e2a\u7a0b\u5e8f\u76ee\u524d\u4ecd\u7136\u5728\u540e\u53f0\u4e0d\u65ad\u7684\u5c1d\u8bd5\u8fde\u63a5\u6570\u636e\u5e93\u3002<br \/>\n\u73b0\u5728\u6240\u6709\u7684\u7591\u95ee\u90fd\u89e3\u5f00\u4e86\uff0c\u7528\u6237\u7a0b\u5e8f\u5df2\u9519\u8bef\u7684\u5bc6\u7801\u4e0d\u65ad\u767b\u5f55\uff0c\u5728\u52a0\u4e0a11g\u7684\u5bc6\u7801\u5ef6\u8fdf\u9a8c\u8bc1\uff0c\u4f7f\u5f97\u7528\u6237\u7684\u9a8c\u8bc1\u7b49\u5f85\u65f6\u95f4\u4e0d\u65ad\u52a0\u957f\u3002\u8fd9\u4e5f\u89e3\u91ca\u4e86\u4e3a\u4ec0\u4e48\u8f93\u5165\u6b63\u786e\u7684\u5bc6\u7801\u767b\u5f55\u540e\uff0c\u8fd9\u4e2a\u73b0\u8c61\u66fe\u77ed\u6682\u6d88\u5931\uff0c\u56e0\u4e3a\u7528\u6237\u6210\u529f\u767b\u5f55\uff0c\u5bc6\u7801\u5ef6\u8fdf\u9a8c\u8bc1\u7684\u65f6\u95f4\u5f52\u96f6\u3002<br \/>\n\u627e\u5230\u95ee\u9898\u7684\u539f\u56e0\u540e\uff0c\u5728\u5ba2\u6237\u7684\u6570\u636e\u5e93\u4e0a\u4ee5\u5176\u4ed6\u7684\u7528\u6237\u5c1d\u8bd5\u6a21\u62df\u8fd9\u4e2a\u73b0\u8c61\uff0c\u6d4b\u8bd5\u53d1\u73b0\uff0c\u5982\u679c\u4e00\u4e2a\u4f1a\u8bdd\u767b\u5f55\u6570\u636e\u5e93\uff0c\u5373\u4f7f\u6bcf\u6b21\u5bc6\u7801\u90fd\u4e0d\u6b63\u786e\u4f7f\u5f97\u5ef6\u8fdf\u9a8c\u8bc1\u65f6\u95f4\u4e0d\u65ad\u53d8\u957f\uff0c\u4e5f\u4e0d\u4f1a\u5f15\u53d1library cache lock\u7684\u7b49\u5f85\u65f6\u95f4\uff0c\u4f46\u662f\u53ea\u8981\u8be5\u7528\u6237\u5b58\u5728\u7b2c\u4e8c\u4e2a\u767b\u5f55\u4f1a\u8bdd\uff0c\u8fd9\u65f6library cache lock\u4f1a\u5728\u4e24\u4e2a\u4f1a\u8bdd\u540c\u65f6\u51fa\u73b0\uff0c\u800c\u4e14\u5373\u4f7f\u8fd9\u4e2a\u4f1a\u8bdd\u5c1d\u8bd5\u4f7f\u7528\u6b63\u786e\u7684\u5bc6\u7801\u767b\u5f55\uff0c\u5728\u6210\u529f\u767b\u5f55\u4e4b\u524d\uff0c\u4e5f\u8981\u7b49\u5f85library cache lock\u4e8b\u4ef6\u3002<br \/>\n\u6839\u636e\u8fd9\u4e2a\u73b0\u8c61\uff0c\u4e2a\u4eba\u63a8\u6d4bOracle\u4e3a\u4e86\u5b9e\u73b0\u5ef6\u8fdf\u9a8c\u8bc1\uff0c\u5fc5\u7136\u9700\u8981\u5728\u5171\u4eab\u6c60\u4e2d\u4fdd\u5b58\u4e00\u4e2a\u7c7b\u4f3c\u8ba1\u6570\u5668\u7684\u5bf9\u8c61\u3002\u8fd9\u4e2a\u8ba1\u6570\u5668\u8bb0\u5f55\u7528\u6237\u767b\u5f55\u8fde\u7eed\u5bc6\u7801\u9519\u8bef\u6b21\u6570\uff0c\u4ece\u800c\u786e\u5b9a\u5ef6\u8fdf\u9a8c\u8bc1\u7684\u7b49\u5f85\u65f6\u95f4\u3002\u5f53\u7528\u6237\u6210\u529f\u767b\u5f55\uff0c\u8ba1\u6570\u5668\u6e05\u96f6\u3002\u5982\u679c\u662f\u4e00\u4e2a\u4f1a\u8bdd\uff0c\u90a3\u4e48\u53ea\u9700\u8981\u72ec\u5360\u8fd9\u4e2a\u8ba1\u6570\u5668\u5c31\u53ef\u4ee5\u4e86\uff0c\u5f53\u5b58\u5728\u4e24\u4e2a\u4ee5\u4e0a\u7684\u4f1a\u8bdd\uff0c\u4e14\u4e24\u4e2a\u4f1a\u8bdd\u90fd\u8bd5\u56fe\u4fee\u6539\u8ba1\u6570\u5668\u7684\u5185\u5bb9\uff0c\u90a3\u4e48\u8d44\u6e90\u7ade\u4e89\u5c31\u51fa\u73b0\u4e86\uff0c\u800c\u4f53\u73b0\u5728\u6570\u636e\u5e93\u4e2d\u7684\u7b49\u5f85\u4e8b\u4ef6\u5c31\u662flibrary cache lock\u3002\u5f53\u7136\u8fd9\u53ea\u662f\u4e2a\u4eba\u7684\u731c\u6d4b\u800c\u5df2\uff0c\u8fd8\u6ca1\u6709\u770b\u5230Oracle\u5b98\u65b9\u5bf9\u8fd9\u79cd\u60c5\u51b5\u7684\u8bf4\u660e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5ba2\u6237\u768411.2.0.2 RAC for Linux X86-64\u73af\u5883\u7684\u6570\u636e\u5e93\u5728\u767b\u5f55\u65f6\uff0c\u53d1\u73b0\u51fa\u73b0\u957f\u65f6\u95f4\u7b49\u5f85\u3002 \u8fd9\u4e00\u7bc7\u63cf\u8ff0\u95ee\u9898\u7684\u73b0\u8c61\u7684\u8bca\u65ad\u3002 \u51fa\u95ee\u9898\u7684\u65f6\u5019\u6211\u6b63\u597d\u5728\u5ba2\u6237\u73b0\u573a\uff0c\u4e8e\u662f\u5f53\u65f6\u8bca\u65ad\u4e86\u4e00\u4e0b\u3002 \u5ba2\u6237\u53cd\u6620\uff0c\u95ee\u9898\u53d1\u751f\u5728\u4e00\u4e2a\u7528\u6237\u4e0a\uff0c\u4f7f\u7528\u8fd9\u4e2a\u7528\u6237\u767b\u5f55\u9700\u8981\u7b49\u5f85\u5f88\u957f\u65f6\u95f4\uff0c\u800c\u4f7f\u7528\u5176\u4ed6\u7684\u7528\u6237\u767b\u5f55\u5219\u4e0d\u5b58\u5728\u95ee\u9898\u3002 \u9996\u5148\u68c0\u67e5\u4e86DBA_PROFILES\uff0c\u786e\u8ba4\u548c\u5bc6\u7801\u4ee5\u53ca\u767b\u5f55\u6709\u5173\u7684PROFILE\u662f\u5426\u5b58\u5728\u9650\u5236\uff0c\u5f53\u524d\u6570\u636e\u5e93\u5df2\u7ecf\u90fd\u8bbe\u7f6e\u4e3aUNLIMITED\uff0c\u90a3\u4e48\u95ee\u9898\u5e94\u8be5\u548cPROFILE\u65e0\u5173\u3002 \u68c0\u67e5\u51fa\u73b0\u95ee\u9898\u7684\u7528\u6237\uff0c\u4e5f\u672a\u53d1\u73b0\u4efb\u4f55\u7279\u522b\u4e4b\u5904\u3002 \u5728sqlplus\u4e0a\u4f7f\u7528\u8fd9\u4e2a\u7528\u6237\u767b\u5f55\uff0c\u7ecf\u5386\u4e86\u5c06\u8fd110\u79d2\u5de6\u53f3\u7684\u7b49\u5f85\uff0c\u7ec8\u4e8e\u6210\u529f\u767b\u5f55\u3002\u540c\u65f6\u68c0\u67e5\u5230\u4f1a\u8bdd\u5f53\u65f6\u51fa\u73b0library cache lock\u7b49\u5f85\u4e8b\u4ef6\u3002 \u5f53\u518d\u6b21\u5c1d\u8bd5\u91cd\u73b0\u95ee\u9898\u65f6\uff0c\u5374\u5df2\u53d1\u73b0\u95ee\u9898\u65e0\u6cd5\u91cd\u73b0\u4e86\uff0c\u73b0\u5728\u5373\u4f7f\u4f7f\u7528\u521a\u624d\u7684\u95ee\u9898\u7528\u6237\uff0c\u4e5f\u53ef\u4ee5\u5f88\u5feb\u767b\u5f55\u6210\u529f\uff0c\u5e76\u4e0d\u4f1a\u51fa\u73b0\u660e\u663e\u7684\u767b\u5f55\u7b49\u5f85\u3002\u83ab\u975e\u4e00\u6b21\u6210\u529f\u7684\u767b\u5f55\uff0c\u5c31\u53ef\u4ee5\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002 \u4e0d\u8fc7\u5f88\u5feb\uff0c\u95ee\u9898\u518d\u6b21\u51fa\u73b0\uff0c\u4e3a\u4e86\u68c0\u67e5\u4f1a\u8bdd\u6267\u884c\u7684\u5177\u4f53\u64cd\u4f5c\uff0c\u5bf9\u8fd9\u4e2a\u95ee\u9898\u7528\u6237\u521b\u5efa\u4e86\u4e00\u4e2a\u767b\u5f55\u89e6\u53d1\u5668\uff0c\u5728\u767b\u5f55\u89e6\u53d1\u5668\u4e2d\u8bbe\u7f6e\u4f1a\u8bdd\u7684TRACE\uff1a SQL> CREATE OR REPLACE TRIGGER T_AFTER_LOGON AFTER LOGON ON DATABASE 2 BEGIN 3 IF USER = &#8216;GJT&#8217; THEN 4 DBMS_SESSION.SESSION_TRACE_ENABLE(TRUE, TRUE); 5 END IF; 6 &hellip; <a href=\"https:\/\/yangtingkun.net\/?p=279\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[20,205,206],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2yiY3-4v","_links":{"self":[{"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/posts\/279"}],"collection":[{"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=279"}],"version-history":[{"count":1,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/posts\/279\/revisions"}],"predecessor-version":[{"id":280,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/posts\/279\/revisions\/280"}],"wp:attachment":[{"href":"https:\/\/yangtingkun.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=279"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}