{"id":2070,"date":"2024-05-25T11:01:15","date_gmt":"2024-05-25T03:01:15","guid":{"rendered":"http:\/\/oneai.eu.org\/?p=2070"},"modified":"2024-05-25T11:01:15","modified_gmt":"2024-05-25T03:01:15","slug":"%e8%be%be%e6%a2%a6-%e5%8a%a8%e6%80%81%e7%ae%a1%e7%90%86%e5%92%8c%e6%80%a7%e8%83%bd%e8%a7%86%e5%9b%be","status":"publish","type":"post","link":"https:\/\/oneai.eu.org\/?p=2070","title":{"rendered":"\u8fbe\u68a6-\u52a8\u6001\u7ba1\u7406\u548c\u6027\u80fd\u89c6\u56fe"},"content":{"rendered":"<div>\n<h2 id=\"21-1-\u7406\u89e3\u52a8\u6001\u7ba1\u7406\u89c6\u56fe\" class=\"article-heading\" style=\"position: relative;\">21.1 \u7406\u89e3\u52a8\u6001\u7ba1\u7406\u89c6\u56fe<a class=\"article-anchor\" href=\"#21.1 \u7406\u89e3\u52a8\u6001\u7ba1\u7406\u89c6\u56fe\" aria-hidden=\"true\"><\/a><\/p>\n<div id=\"21.1 \u7406\u89e3\u52a8\u6001\u7ba1\u7406\u89c6\u56fe\" style=\"position: absolute; top: -100px;\"><\/div>\n<\/h2>\n<p>\u8fbe\u68a6\u6570\u636e\u5e93\u4e2d\u7684\u52a8\u6001\u6027\u80fd\u89c6\u56fe\u80fd\u81ea\u52a8\u6536\u96c6\u6570\u636e\u5e93\u4e2d\u7684\u4e00\u4e9b\u6d3b\u52a8\u4fe1\u606f\uff0c\u7cfb\u7edf\u7ba1\u7406\u5458\u6839\u636e\u8fd9\u4e9b\u4fe1\u606f\u53ef\u4ee5\u4e86\u89e3\u6570\u636e\u5e93\u8fd0\u884c\u7684\u57fa\u672c\u60c5\u51b5\uff0c\u4e3a\u6570\u636e\u5e93\u7684\u7ef4\u62a4\u548c\u4f18\u5316\u63d0\u4f9b\u4f9d\u636e\u3002\u52a8\u6001\u6027\u80fd\u89c6\u56fe\u4fe1\u606f\u4e5f\u662f\u6570\u636e\u5e93\u4e2d\u6570\u636e\u5b57\u5178\u7684\u4e00\u90e8\u5206\uff0c\u4e0e\u6211\u4eec\u5e73\u5e38\u6240\u8bf4\u7684\u6570\u636e\u5b57\u5178\u4e0d\u540c\u7684\u662f\uff0c\u5e73\u5e38\u610f\u4e49\u4e0a\u7684\u6570\u636e\u5b57\u5178\u662f\u6307\u9759\u6001\u6570\u636e\u5b57\u5178\u4fe1\u606f\uff0c\u4e5f\u5373\u7528\u6237\u8bbf\u95ee\u6570\u636e\u5b57\u5178\u4fe1\u606f\u65f6\uff0c\u5185\u5bb9\u4e0d\u4f1a\u53d1\u751f\u6539\u53d8\uff0c\u800c\u52a8\u6001\u89c6\u56fe\u4fe1\u606f\u662f\u968f\u7740\u6570\u636e\u5e93\u7684\u8fd0\u884c\u968f\u65f6\u66f4\u6539\uff0c\u5177\u6709\u4e00\u5b9a\u7684\u5373\u65f6\u6027\u3002<\/p>\n<p>\u7cfb\u7edf\u7ba1\u7406\u5458\u4e3a\u4e86\u66f4\u597d\u5730\u4e86\u89e3\u6570\u636e\u5e93\u7684\u4e00\u4e9b\u8fd0\u884c\u65f6\u4fe1\u606f\uff0c\u53ef\u4ee5\u67e5\u8be2\u52a8\u6001\u89c6\u56fe\u8868\u3002\u9996\u5148\u7cfb\u7edf\u7ba1\u7406\u5458\u9700\u8981\u77e5\u9053\u8fbe\u68a6\u6570\u636e\u5e93\u4e2d\u63d0\u4f9b\u4e86\u591a\u5c11\u52a8\u6001\u89c6\u56fe\uff0c\u6709\u54ea\u4e9b\u7c7b\u578b\u52a8\u6001\u89c6\u56fe\uff0c\u4ee5\u53ca\u8fd9\u4e9b\u52a8\u6001\u89c6\u56fe\u7684\u7528\u9014\u662f\u4ec0\u4e48\u3002\u5173\u4e8e\u8fd9\u4e9b\u5185\u5bb9\u53ef\u4ee5\u53c2\u8003\u9644\u5f55 2\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u67e5\u8be2 V$DYNAMIC_TABLES \u83b7\u5f97\u6240\u6709\u7684\u52a8\u6001\u6027\u80fd\u89c6\u56fe\u540d\u79f0\u3002<\/p>\n<p>\u52a8\u6001\u89c6\u56fe\u8868\u4e0e\u9759\u6001\u5b57\u5178\u4fe1\u606f\u8868\u547d\u540d\u65b9\u5f0f\u4e0d\u540c\uff0c\u9759\u6001\u5b57\u5178\u8868\u4e00\u822c\u4ee5 SYS \u4e3a\u524d\u7f00\uff0c\u5982\u7cfb\u7edf\u8868 SYSINDEXES\uff0c\u800c\u52a8\u6001\u89c6\u56fe\u5219\u4ee5 V$\u4e3a\u524d\u7f00\uff0c\u5982 V$DM_INI\u3002<\/p>\n<h2 id=\"21-2-\u4f7f\u7528\u52a8\u6001\u7ba1\u7406\u89c6\u56fe\" class=\"article-heading\" style=\"position: relative;\">21.2 \u4f7f\u7528\u52a8\u6001\u7ba1\u7406\u89c6\u56fe<a class=\"article-anchor\" href=\"#21.2 \u4f7f\u7528\u52a8\u6001\u7ba1\u7406\u89c6\u56fe\" aria-hidden=\"true\"><\/a><\/p>\n<div id=\"21.2 \u4f7f\u7528\u52a8\u6001\u7ba1\u7406\u89c6\u56fe\" style=\"position: absolute; top: -100px;\"><\/div>\n<\/h2>\n<p>\u5728 DM8 \u4e2d\uff0c\u52a8\u6001\u89c6\u56fe\u63d0\u4f9b\u7684\u7cfb\u7edf\u4fe1\u606f\u4e3b\u8981\u5206\u4e3a\u4ee5\u4e0b\u51e0\u4e2a\u65b9\u9762\uff1a<\/p>\n<ol>\n<li><strong>\u7cfb\u7edf\u4fe1\u606f<\/strong><\/li>\n<\/ol>\n<p>\u5305\u62ec\u6570\u636e\u5e93\u7248\u672c\u3001\u5b9e\u4f8b\u3001\u7edf\u8ba1\u4fe1\u606f\u3001\u8d44\u6e90\u9650\u5236\u4fe1\u606f\u3001\u8fdb\u7a0b\u4fe1\u606f\u3001\u5168\u5c40\u7d22\u5f15 IID \u4fe1\u606f\u3001\u4e8b\u4ef6\u4fe1\u606f\uff1b\u6d89\u53ca\u7684\u52a8\u6001\u89c6\u56fe\u6709 V$SESSIONS\u3001V$INSTANCE\u3001V$RESOURCE_LIMIT\u3001V$PROCESS\u3001V$IID\u3001V$SYSSTAT \u7b49\u3002<\/p>\n<p>\u4f8b \u67e5\u770b\u6570\u636e\u5e93\u4e2d\u5b9e\u4f8b\u4fe1\u606f<\/p>\n<pre><a class=\"btn-copy\" data-clipboard-target=\"\" style=\"text-align: center; float: right; margin-left: -64px; width: 64px; color: rgb(148, 163, 234); cursor: pointer; text-decoration: none; font-size: 13px; font-family: inherit; padding: 0px 0.3rem; position: relative; background: rgb(244, 244, 244); z-index: 9;\"><span>Copy<\/span><\/a><code class=\"language-plaintext hljs\" style=\"background: rgb(244, 244, 244);\">  SELECT * FROM V$INSTANCE;\n<\/code><\/pre>\n<p>\u67e5\u8be2\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n<pre><a class=\"btn-copy\" data-clipboard-target=\"\" style=\"text-align: center; float: right; margin-left: -64px; width: 64px; color: rgb(148, 163, 234); cursor: pointer; text-decoration: none; font-size: 13px; font-family: inherit; padding: 0px 0.3rem; position: relative; background: rgb(244, 244, 244); z-index: 9;\"><span>Copy<\/span><\/a><code class=\"language-plaintext hljs\" style=\"background: rgb(244, 244, 244);\">NAME HOST_NAME SVR_VERSION DB_VERSION START_TIME STATUS\\$ MODE\\$ OGUID DSC_SEQNO DSC_ROLE\n\n1 DMSERVER PC-201103131435 DM Database Server V7.1.2.180-Build(2013.09.13-34445trunc)\n\nDB Version: 0x70008 2013-09-16 09:10:38 OPEN NORMAL 0 0 SLAVE\n<\/code><\/pre>\n<ol start=\"2\">\n<li><strong>\u5b58\u50a8\u4fe1\u606f<\/strong><\/li>\n<\/ol>\n<p>\u5305\u62ec\u6570\u636e\u5e93\u4fe1\u606f\u3001\u8868\u7a7a\u95f4\u4fe1\u606f\u3001\u6570\u636e\u6587\u4ef6\u4fe1\u606f\u3001\u65e5\u5fd7\u76f8\u5173\u4fe1\u606f\uff1b\u6d89\u53ca\u7684\u52a8\u6001\u89c6\u56fe\u6709 V$DATAFILE\u3001V$DATABASE\u3001V$TABLESPACE\u3001V$HUGE_TABLESPACE\u3001V$RLOGFILE \u7b49\u3002<\/p>\n<p>\u4f8b \u67e5\u8be2\u8868\u7a7a\u95f4\u4fe1\u606f<\/p>\n<pre><a class=\"btn-copy\" data-clipboard-target=\"\" style=\"text-align: center; float: right; margin-left: -64px; width: 64px; color: rgb(148, 163, 234); cursor: pointer; text-decoration: none; font-size: 13px; font-family: inherit; padding: 0px 0.3rem; position: relative; background: rgb(244, 244, 244); z-index: 9;\"><span>Copy<\/span><\/a><code class=\"language-plaintext hljs\" style=\"background: rgb(244, 244, 244);\">  SELECT * FROM V$TABLESPACE;\n<\/code><\/pre>\n<p>\u67e5\u8be2\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n<pre><a class=\"btn-copy\" data-clipboard-target=\"\" style=\"text-align: center; float: right; margin-left: -64px; width: 64px; color: rgb(148, 163, 234); cursor: pointer; text-decoration: none; font-size: 13px; font-family: inherit; padding: 0px 0.3rem; position: relative; background: rgb(244, 244, 244); z-index: 9;\"><span>Copy<\/span><\/a><code class=\"language-plaintext hljs\" style=\"background: rgb(244, 244, 244);\">ID NAME CACHE TYPE$ STATUS$ MAX_SIZE TOTAL_SIZE FILE_NUM ENCRYPT_NAME ENCRYPTED_KEY COPY_NUM SIZE_MODE\n\n\u2026\u2026\n\n7 TABLESPACE_03 NORMAL 1 0 0 32768 1 null null null null\n\n9 TS_001 NORMAL 1 0 0 16384 1 null null null null\n<\/code><\/pre>\n<ol start=\"3\">\n<li><strong>\u5185\u5b58\u7ba1\u7406\u4fe1\u606f<\/strong><\/li>\n<\/ol>\n<p>\u5305\u62ec\u5185\u5b58\u6c60\u4f7f\u7528\u60c5\u51b5\u3001BUFFER \u7f13\u51b2\u533a\u4fe1\u606f\u3001\u865a\u62df\u673a\u4fe1\u606f\u3001\u865a\u62df\u673a\u6808\u5e27\u4fe1\u606f\uff1b\u6d89\u53ca\u7684\u52a8\u6001\u89c6\u56fe\u6709 V$MEM_POOL\u3001V$VMS\u3001V$STKFRM\u3001V$BUFFERPOOL\u3001V$BUFFER_LRU_FIRST\u3001V$BUFFER_UPD_FIRST\u3001V$BUFFER_LRU_LAST\u3001V$BUFFER_UPD_LAST\u3001V$RLOG_PKG\u3001V$COSTPARA \u7b49\u3002<\/p>\n<p>\u4f8b \u67e5\u8be2\u5185\u5b58\u6c60 BUFFERPOOL \u7684\u9875\u6570\u3001\u8bfb\u53d6\u9875\u6570\u548c\u547d\u4e2d\u7387\u4fe1\u606f<\/p>\n<pre><a class=\"btn-copy\" data-clipboard-target=\"\" style=\"text-align: center; float: right; margin-left: -64px; width: 64px; color: rgb(148, 163, 234); cursor: pointer; text-decoration: none; font-size: 13px; font-family: inherit; padding: 0px 0.3rem; position: relative; background: rgb(244, 244, 244); z-index: 9;\"><span>Copy<\/span><\/a><code class=\"language-plaintext hljs\" style=\"background: rgb(244, 244, 244);\">  SELECT NAME,N_PAGES,N_LOGIC_READS,RAT_HIT FROM V$BUFFERPOOL;\n<\/code><\/pre>\n<p>\u67e5\u8be2\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n<pre><a class=\"btn-copy\" data-clipboard-target=\"\" style=\"text-align: center; float: right; margin-left: -64px; width: 64px; color: rgb(148, 163, 234); cursor: pointer; text-decoration: none; font-size: 13px; font-family: inherit; padding: 0px 0.3rem; position: relative; background: rgb(244, 244, 244); z-index: 9;\"><span>Copy<\/span><\/a><code class=\"language-plaintext hljs\" style=\"background: rgb(244, 244, 244);\">\u884c\u53f7    NAME       N_PAGES         N_LOGIC_READS           RAT_HIT\n------ ---- -------------------- ----------- -----------------\n1       KEEP       1024            0                   1.0000000000E+000\n2       RECYCLE   8192            52                  9.8113207547E-001\n3       NORMAL    1280            1772                9.2726321298E-001\n4       NORMAL    8960            7                    7.0000000000E-001\n<\/code><\/pre>\n<ol start=\"4\">\n<li><strong>\u4e8b\u52a1\u4fe1\u606f<\/strong><\/li>\n<\/ol>\n<p>\u5305\u62ec\u6240\u6709\u4e8b\u52a1\u4fe1\u606f\u3001\u5f53\u524d\u4e8b\u52a1\u53ef\u89c1\u7684\u4e8b\u52a1\u4fe1\u606f\u3001\u4e8b\u52a1\u9501\u4fe1\u606f\uff08TID \u9501\u3001\u5bf9\u8c61\u9501\uff09\u3001\u56de\u6eda\u6bb5\u4fe1\u606f\u3001\u4e8b\u52a1\u7b49\u5f85\u4fe1\u606f\uff1b\u6d89\u53ca\u7684\u52a8\u6001\u89c6\u56fe\u6709 V$TRX\u3001V$TRXWAIT\u3001V$TRX_VIEW\u3001V$LOCK\u3001V$PURGE \u7b49\u3002<\/p>\n<p>\u4f8b \u67e5\u8be2\u7cfb\u7edf\u4e2d\u4e0a\u9501\u7684\u4e8b\u52a1\u3001\u9501\u7c7b\u578b\uff0c\u4ee5\u53ca\u8868 ID \u4fe1\u606f<\/p>\n<pre><a class=\"btn-copy\" data-clipboard-target=\"\" style=\"text-align: center; float: right; margin-left: -64px; width: 64px; color: rgb(148, 163, 234); cursor: pointer; text-decoration: none; font-size: 13px; font-family: inherit; padding: 0px 0.3rem; position: relative; background: rgb(244, 244, 244); z-index: 9;\"><span>Copy<\/span><\/a><code class=\"language-plaintext hljs\" style=\"background: rgb(244, 244, 244);\">  SELECT TRX_ID,LTYPE,LMODE,TABLE_ID FROM V$LOCK;\n<\/code><\/pre>\n<p>\u67e5\u8be2\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n<pre><a class=\"btn-copy\" data-clipboard-target=\"\" style=\"text-align: center; float: right; margin-left: -64px; width: 64px; color: rgb(148, 163, 234); cursor: pointer; text-decoration: none; font-size: 13px; font-family: inherit; padding: 0px 0.3rem; position: relative; background: rgb(244, 244, 244); z-index: 9;\"><span>Copy<\/span><\/a><code class=\"language-plaintext hljs\" style=\"background: rgb(244, 244, 244);\">\u884c\u53f7 TRX_ID LTYPE LMODE TABLE_ID\n\n---------- -------------------- ------ ----- -----------\n\n1 1436 OBJECT IX 1311\n\n2 1433 OBJECT IX 1310\n\n3 1436 TID X -1\n\n4 1433 TID X -1\n<\/code><\/pre>\n<ol start=\"5\">\n<li><strong>\u7ebf\u7a0b\u4fe1\u606f<\/strong><\/li>\n<\/ol>\n<p>\u5305\u62ec\u6240\u6709\u6d3b\u52a8\u7ebf\u7a0b\u4fe1\u606f\u3001\u7ebf\u7a0b\u4f5c\u4e1a\u4fe1\u606f\u3001\u7ebf\u7a0b\u9501\u4fe1\u606f\u3001\u7ebf\u7a0b\u7684\u8d44\u6e90\u7b49\u5f85\u4fe1\u606f\uff1b\u6d89\u53ca\u7684\u52a8\u6001\u89c6\u56fe\u6709 V$THREADS\u3001V$LATCHES \u7b49\u3002<\/p>\n<p>\u4f8b \u67e5\u770b\u7cfb\u7edf\u4e2d\u6240\u6709\u6d3b\u52a8\u7684\u7ebf\u7a0b\u4fe1\u606f<\/p>\n<pre><a class=\"btn-copy\" data-clipboard-target=\"\" style=\"text-align: center; float: right; margin-left: -64px; width: 64px; color: rgb(148, 163, 234); cursor: pointer; text-decoration: none; font-size: 13px; font-family: inherit; padding: 0px 0.3rem; position: relative; background: rgb(244, 244, 244); z-index: 9;\"><span>Copy<\/span><\/a><code class=\"language-plaintext hljs\" style=\"background: rgb(244, 244, 244);\"> SELECT TOP 2* FROM V$THREADS;\n<\/code><\/pre>\n<p>\u67e5\u8be2\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n<pre><a class=\"btn-copy\" data-clipboard-target=\"\" style=\"text-align: center; float: right; margin-left: -64px; width: 64px; color: rgb(148, 163, 234); cursor: pointer; text-decoration: none; font-size: 13px; font-family: inherit; padding: 0px 0.3rem; position: relative; background: rgb(244, 244, 244); z-index: 9;\"><span>Copy<\/span><\/a><code class=\"language-plaintext hljs\" style=\"background: rgb(244, 244, 244);\">\u884c\u53f7       ID                   NAME       START_TIME                 THREAD_DESC                   SESS_ID              PROCESSOR_ID\n---------- -------------------- ---------- -------------------------- ----------------------------- -------------------- ------------\n1          16212                dm_lpq_thd 2023-12-13 08:50:28.000000 Local parallel working thread NULL                 65535\n2          16214                dm_lpq_thd 2023-12-13 08:50:28.000000 Local parallel working thread NULL                 65535\n\n<\/code><\/pre>\n<ol start=\"6\">\n<li><strong>\u5386\u53f2\u6a21\u5757<\/strong><\/li>\n<\/ol>\n<p>\u5305\u62ec SQL \u5386\u53f2\u4fe1\u606f\u3001SQL \u6267\u884c\u8282\u70b9\u5386\u53f2\u4fe1\u606f\u3001\u68c0\u67e5\u70b9\u5386\u53f2\u4fe1\u606f\u3001\u547d\u4ee4\u884c\u5386\u53f2\u4fe1\u606f\u3001\u7ebf\u7a0b\u7b49\u5f85\u5386\u53f2\u4fe1\u606f\u3001\u6b7b\u9501\u5386\u53f2\u4fe1\u606f\u3001\u56de\u6eda\u6bb5\u5386\u53f2\u4fe1\u606f\u3001\u8fd0\u884c\u65f6\u9519\u8bef\u5386\u53f2\u4fe1\u606f\u3001DMSQL \u7a0b\u5e8f\u4e2d\u6267\u884c DDL \u8bed\u53e5\u7684\u5386\u53f2\u4fe1\u606f\u3001\u8fd4\u56de\u5927\u6570\u636e\u91cf\u7ed3\u679c\u96c6\u7684\u5386\u53f2\u4fe1\u606f\u3001\u6240\u6709\u6d3b\u52a8\u8fc7\u7ebf\u7a0b\u7684\u5386\u53f2\u4fe1\u606f\uff1b\u6d89\u53ca\u7684\u52a8\u6001\u89c6\u56fe\u6709 V$CKPT_HISTORY\u3001V$CMD_HISTORY\u3001V$DEADLOCK_HISTORY\u3001V$PLSQL_DDL_HISTORY\u3001V$PRE_RETURN_HISTORY\u3001V$RUNTIME_ERR_HISTORY\u3001V$WAIT_HISTORY\u3001V$SQL_HISTORY\u3001V$SQL_NODE_HISTORY\u3001V$SQL_NODE_NAME \u7b49\u3002<\/p>\n<p>\u4f8b \u67e5\u8be2\u7cfb\u7edf\u6267\u884c\u7684 SQL \u5386\u53f2\u4fe1\u606f<\/p>\n<pre><a class=\"btn-copy\" data-clipboard-target=\"\" style=\"text-align: center; float: right; margin-left: -64px; width: 64px; color: rgb(148, 163, 234); cursor: pointer; text-decoration: none; font-size: 13px; font-family: inherit; padding: 0px 0.3rem; position: relative; background: rgb(244, 244, 244); z-index: 9;\"><span>Copy<\/span><\/a><code class=\"language-plaintext hljs\" style=\"background: rgb(244, 244, 244);\">  SELECT SESS_ID,TOP_SQL_TEXT,TIME_USED FROM V$SQL_HISTORY;\n<\/code><\/pre>\n<p>\u67e5\u8be2\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n<pre><a class=\"btn-copy\" data-clipboard-target=\"\" style=\"text-align: center; float: right; margin-left: -64px; width: 64px; color: rgb(148, 163, 234); cursor: pointer; text-decoration: none; font-size: 13px; font-family: inherit; padding: 0px 0.3rem; position: relative; background: rgb(244, 244, 244); z-index: 9;\"><span>Copy<\/span><\/a><code class=\"language-plaintext hljs\" style=\"background: rgb(244, 244, 244);\">SESS_ID TOP_SQL_TEXT TIME_USED\n-------- ----------------- ---------------------\n1 187744368 INSERT INTO T1 VALUES(5,0); 21707\n<\/code><\/pre>\n<ol start=\"7\">\n<li><strong>\u7f13\u5b58\u4fe1\u606f<\/strong><\/li>\n<\/ol>\n<p>\u5305\u62ec SQL \u8bed\u53e5\u7f13\u5b58\u3001\u6267\u884c\u8ba1\u5212\u7f13\u5b58\u3001\u7ed3\u679c\u96c6\u7f13\u5b58\u3001\u5b57\u5178\u7f13\u5b58\u4fe1\u606f\u3001\u5b57\u5178\u7f13\u5b58\u4e2d\u7684\u5bf9\u8c61\u4fe1\u606f\u3001\u4ee3\u4ef7\u4fe1\u606f\uff1b\u6d89\u53ca\u7684\u52a8\u6001\u89c6\u56fe\u6709 V$CACHEITEM\u3001V$SQL_PLAN\u3001V$CACHERS\u3001V$CACHESQL\u3001V$DICT_CACHE_ITEM\u3001V$DICT_CACHE \u7b49\u3002<\/p>\n<p>\u4f8b \u67e5\u770b\u5b57\u5178\u7f13\u5b58\u7684\u4fe1\u606f<\/p>\n<pre><a class=\"btn-copy\" data-clipboard-target=\"\" style=\"text-align: center; float: right; margin-left: -64px; width: 64px; color: rgb(148, 163, 234); cursor: pointer; text-decoration: none; font-size: 13px; font-family: inherit; padding: 0px 0.3rem; position: relative; background: rgb(244, 244, 244); z-index: 9;\"><span>Copy<\/span><\/a><code class=\"language-plaintext hljs\" style=\"background: rgb(244, 244, 244);\">  SELECT * FROM V$DICT_CACHE;\n<\/code><\/pre>\n<p>\u67e5\u8be2\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n<pre><a class=\"btn-copy\" data-clipboard-target=\"\" style=\"text-align: center; float: right; margin-left: -64px; width: 64px; color: rgb(148, 163, 234); cursor: pointer; text-decoration: none; font-size: 13px; font-family: inherit; padding: 0px 0.3rem; position: relative; background: rgb(244, 244, 244); z-index: 9;\"><span>Copy<\/span><\/a><code class=\"language-plaintext hljs\" style=\"background: rgb(244, 244, 244);\">ADDR POOL_ID TOTAL_SIZE USED_SIZE DICT_NUM\n-------- ----------------- ---------------------\n1 0x0B56F070 1 5242880 113530 36\n<\/code><\/pre>\n<ol start=\"8\">\n<li><strong>\u4f1a\u8bdd\u4fe1\u606f<\/strong><\/li>\n<\/ol>\n<p>\u5305\u62ec\u8fde\u63a5\u4fe1\u606f\u3001\u4f1a\u8bdd\u4fe1\u606f\uff1b\u6d89\u53ca\u7684\u52a8\u6001\u89c6\u56fe\u6709 V$CONNECT\u3001V$STMTS\u3001V$SESSIONS \u7b49\u3002<\/p>\n<p>\u4f8b \u67e5\u770b\u4f1a\u8bdd\u4fe1\u606f<\/p>\n<pre><a class=\"btn-copy\" data-clipboard-target=\"\" style=\"text-align: center; float: right; margin-left: -64px; width: 64px; color: rgb(148, 163, 234); cursor: pointer; text-decoration: none; font-size: 13px; font-family: inherit; padding: 0px 0.3rem; position: relative; background: rgb(244, 244, 244); z-index: 9;\"><span>Copy<\/span><\/a><code class=\"language-plaintext hljs\" style=\"background: rgb(244, 244, 244);\">  SELECT SESS_ID,SQL_TEXT,STATE,CREATE_TIME,CLNT_HOST FROM V$SESSIONS;\n<\/code><\/pre>\n<p>\u67e5\u8be2\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n<pre><a class=\"btn-copy\" data-clipboard-target=\"\" style=\"text-align: center; float: right; margin-left: -64px; width: 64px; color: rgb(148, 163, 234); cursor: pointer; text-decoration: none; font-size: 13px; font-family: inherit; padding: 0px 0.3rem; position: relative; background: rgb(244, 244, 244); z-index: 9;\"><span>Copy<\/span><\/a><code class=\"language-plaintext hljs\" style=\"background: rgb(244, 244, 244);\">SESS_ID SQL_TEXT STATE CREATE_TIME CLNT_HOST\n-------- ----------------- ---------------------\n1 187744368 SELECT SESS_ID,SQL_TEXT,STATE,CREATE_TIME,CLNT_HOST FROM V\\$SESSIONS; ACTIVE 2011-09-19 19:20:38.000000 FREESKYC-FB8846\n<\/code><\/pre>\n<p>\u67e5\u770b\u52a8\u6001\u89c6\u56fe\u53ef\u4ee5\u4e0d\u5355\u5355\u53ea\u67e5\u8be2\u4e00\u4e2a\u52a8\u6001\u89c6\u56fe\u8868\uff0c\u8fd8\u53ef\u5229\u7528\u52a8\u6001\u89c6\u56fe\u8868\u4e4b\u95f4\u7684\u8054\u7cfb\u5f97\u5230\u66f4\u591a\u60f3\u8981\u7684\u4fe1\u606f\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u7cfb\u7edf\u7ba1\u7406\u5458\u5982\u679c\u8981\u5bf9\u4e00\u6761 SQL \u8bed\u53e5\u8fdb\u884c\u8c03\u4f18\uff0c\u9700\u8981\u77e5\u9053\u6bcf\u4e2a\u6267\u884c\u8282\u70b9\u82b1\u8d39\u4e86\u591a\u5c11\u65f6\u95f4\uff0c\u67e5\u8be2 V$SQL_NODE_NAME \u53ef\u4ee5\u77e5\u9053\u6267\u884c\u8282\u70b9\u7684\u540d\u5b57\uff0c\u67e5\u8be2 V$SQL_NODE_HISTORY \u53ef\u4ee5\u67e5\u8be2\u5230\u6bcf\u4e2a\u6267\u884c\u8282\u70b9\u7684\u65f6\u95f4\uff0c\u901a\u8fc7\u4e24\u4e2a\u52a8\u6001\u89c6\u56fe\u8868\u7684\u6267\u884c\u8282\u70b9\u7c7b\u578b TYPE$\u5b57\u6bb5\u505a\u7b49\u503c\u8fde\u63a5\u3002<\/p>\n<p>\u5982\u6267\u884c\u4e00\u6761 SQL \u8bed\u53e5\uff0c\u7136\u540e\u67e5\u8be2\u5176\u6267\u884c\u8282\u70b9\u6240\u82b1\u8d39\u65f6\u95f4\uff0c\u5047\u8bbe\u5176\u6267\u884c ID\uff08EXEC_ID\uff09\u4e3a 4\u3002<\/p>\n<pre><a class=\"btn-copy\" data-clipboard-target=\"\" style=\"text-align: center; float: right; margin-left: -64px; width: 64px; color: rgb(148, 163, 234); cursor: pointer; text-decoration: none; font-size: 13px; font-family: inherit; padding: 0px 0.3rem; position: relative; background: rgb(244, 244, 244); z-index: 9;\"><span>Copy<\/span><\/a><code class=\"language-plaintext hljs\" style=\"background: rgb(244, 244, 244);\">  SELECT * FROM t1 WHERE c1 = (SELECT d1 FROM t2 WHERE c2 = d2);\n<\/code><\/pre>\n<p>\u901a\u8fc7\u89c6\u56fe V$SQL_NODE_NAME \u4e0e V$SQL_NODE_HISTORY \u89c6\u56fe\u67e5\u8be2\u7ed3\u70b9\u6267\u884c\u65f6\u95f4\uff1a<\/p>\n<pre><a class=\"btn-copy\" data-clipboard-target=\"\" style=\"text-align: center; float: right; margin-left: -64px; width: 64px; color: rgb(148, 163, 234); cursor: pointer; text-decoration: none; font-size: 13px; font-family: inherit; padding: 0px 0.3rem; position: relative; background: rgb(244, 244, 244); z-index: 9;\"><span>Copy<\/span><\/a><code class=\"language-plaintext hljs\" style=\"background: rgb(244, 244, 244);\">  SELECT N.NAME, TIME_USED, N_ENTER FROM V$SQL_NODE_NAME N, V$SQL_NODE_HISTORY H WHERE N.TYPE$ = H.TYPE$ AND EXEC_ID = 4;\n<\/code><\/pre>\n<p>\u67e5\u8be2\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n<pre><a class=\"btn-copy\" data-clipboard-target=\"\" style=\"text-align: center; float: right; margin-left: -64px; width: 64px; color: rgb(148, 163, 234); cursor: pointer; text-decoration: none; font-size: 13px; font-family: inherit; padding: 0px 0.3rem; position: relative; background: rgb(244, 244, 244); z-index: 9;\"><span>Copy<\/span><\/a><code class=\"language-plaintext hljs\" style=\"background: rgb(244, 244, 244);\">NAME  TIME_USED  N_ENTER\n1       CSCN2   381     6\n2       CSCN2   250     3\n3       NLI2    52      14\n4       SLCT2   102     8\n5       HAGR2   11831   6\n6       PRJT2   32      6\n7       CSCN2   272     3\n8       HI3     19309   9\n9       PRJT2   29      6\n10      NSET2   120     4\n11      DLCK    23      2\n<\/code><\/pre>\n<p>\u6839\u636e\u7ed3\u679c\u53ef\u4ee5\u770b\u5230\u6267\u884c\u8ba1\u5212\u4e2d\u5404\u6267\u884c\u8282\u70b9\u82b1\u8d39\u7684\u65f6\u95f4\uff0c\u8fdb\u800c\u5bf9 SQL \u8bed\u53e5\u8fdb\u884c\u5206\u6790\u548c\u6539\u5199\u3002<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>21.1 \u7406\u89e3\u52a8\u6001\u7ba1\u7406\u89c6\u56fe \u8fbe\u68a6\u6570\u636e\u5e93\u4e2d\u7684\u52a8\u6001\u6027\u80fd\u89c6\u56fe\u80fd\u81ea\u52a8\u6536\u96c6\u6570\u636e\u5e93\u4e2d\u7684\u4e00\u4e9b\u6d3b\u52a8\u4fe1\u606f\uff0c\u7cfb\u7edf\u7ba1\u7406\u5458\u6839\u636e\u8fd9\u4e9b\u4fe1\u606f\u53ef\u4ee5\u4e86\u89e3\u6570\u636e\u5e93\u8fd0\u884c\u7684\u57fa\u672c\u60c5\u51b5\uff0c\u4e3a\u6570\u636e\u5e93\u7684\u7ef4\u62a4\u548c\u4f18\u5316\u63d0\u4f9b\u4f9d\u636e\u3002\u52a8\u6001\u6027\u80fd\u89c6\u56fe\u4fe1\u606f\u4e5f\u662f\u6570\u636e\u5e93\u4e2d\u6570\u636e\u5b57\u5178\u7684\u4e00\u90e8\u5206\uff0c\u4e0e\u6211\u4eec\u5e73\u5e38\u6240\u8bf4\u7684\u6570\u636e\u5b57\u5178\u4e0d\u540c\u7684\u662f\uff0c\u5e73\u5e38\u610f\u4e49\u4e0a\u7684\u6570\u636e\u5b57\u5178\u662f\u6307\u9759\u6001\u6570\u636e\u5b57\u5178\u4fe1\u606f\uff0c\u4e5f\u5373\u7528\u6237\u8bbf\u95ee\u6570\u636e\u5b57\u5178\u4fe1\u606f\u65f6\uff0c\u5185\u5bb9\u4e0d\u4f1a\u53d1\u751f\u6539\u53d8\uff0c\u800c\u52a8\u6001\u89c6\u56fe\u4fe1\u606f\u662f\u968f\u7740\u6570\u636e\u5e93\u7684\u8fd0\u884c\u968f\u65f6\u66f4\u6539\uff0c\u5177\u6709\u4e00\u5b9a\u7684\u5373\u65f6\u6027\u3002 \u7cfb\u7edf\u7ba1\u7406\u5458\u4e3a\u4e86\u66f4\u597d\u5730\u4e86\u89e3\u6570\u636e\u5e93\u7684\u4e00\u4e9b\u8fd0\u884c\u65f6\u4fe1\u606f\uff0c\u53ef\u4ee5\u67e5\u8be2\u52a8\u6001\u89c6\u56fe\u8868\u3002\u9996\u5148\u7cfb\u7edf\u7ba1\u7406\u5458\u9700\u8981\u77e5\u9053\u8fbe\u68a6\u6570\u636e\u5e93\u4e2d\u63d0\u4f9b\u4e86\u591a\u5c11\u52a8\u6001\u89c6\u56fe\uff0c\u6709\u54ea\u4e9b\u7c7b\u578b\u52a8\u6001\u89c6\u56fe\uff0c\u4ee5\u53ca\u8fd9\u4e9b\u52a8\u6001\u89c6\u56fe\u7684\u7528\u9014\u662f\u4ec0\u4e48\u3002\u5173\u4e8e\u8fd9\u4e9b\u5185\u5bb9\u53ef\u4ee5\u53c2\u8003\u9644\u5f55 2\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u67e5\u8be2 V$DYNAMIC_TABLES \u83b7\u5f97\u6240\u6709\u7684\u52a8\u6001\u6027\u80fd\u89c6\u56fe\u540d\u79f0\u3002 \u52a8\u6001\u89c6\u56fe\u8868\u4e0e\u9759\u6001\u5b57\u5178\u4fe1\u606f\u8868\u547d\u540d\u65b9\u5f0f\u4e0d\u540c\uff0c\u9759\u6001\u5b57\u5178\u8868\u4e00\u822c\u4ee5 SYS \u4e3a\u524d\u7f00\uff0c\u5982\u7cfb\u7edf\u8868 SYSINDEXES\uff0c\u800c\u52a8\u6001\u89c6\u56fe\u5219\u4ee5 V$\u4e3a\u524d\u7f00\uff0c\u5982 V$DM_INI\u3002 21.2 \u4f7f\u7528\u52a8\u6001\u7ba1\u7406\u89c6\u56fe \u5728 DM8 \u4e2d\uff0c\u52a8\u6001\u89c6\u56fe\u63d0\u4f9b\u7684\u7cfb\u7edf\u4fe1\u606f\u4e3b\u8981\u5206\u4e3a\u4ee5\u4e0b\u51e0\u4e2a\u65b9\u9762\uff1a \u7cfb\u7edf\u4fe1\u606f \u5305\u62ec\u6570\u636e\u5e93\u7248\u672c\u3001\u5b9e\u4f8b\u3001\u7edf\u8ba1\u4fe1\u606f\u3001\u8d44\u6e90\u9650\u5236\u4fe1\u606f\u3001\u8fdb\u7a0b\u4fe1\u606f\u3001\u5168\u5c40\u7d22\u5f15 IID \u4fe1\u606f\u3001\u4e8b\u4ef6\u4fe1\u606f\uff1b\u6d89\u53ca\u7684\u52a8\u6001\u89c6\u56fe\u6709 V$SESSIONS\u3001V$INSTANCE\u3001V$RESOURCE_LIMIT\u3001V$PROCESS\u3001V$IID\u3001V$SYSSTAT \u7b49\u3002 \u4f8b \u67e5\u770b\u6570\u636e\u5e93\u4e2d\u5b9e\u4f8b\u4fe1\u606f Copy SELECT * FROM V$INSTANCE; \u67e5\u8be2\u7ed3\u679c\u5982\u4e0b\uff1a CopyNAME HOST_NAME SVR_VERSION DB_VERSION START_TIME STATUS\\$ MODE\\$ OGUID DSC_SEQNO DSC_ROLE 1 DMSERVER PC-201103131435 DM Database Server V7.1.2.180-Build(2013.09.13-34445trunc) DB Version: 0x70008 2013-09-16 09:10:38 OPEN NORMAL 0 0 SLAVE \u5b58\u50a8\u4fe1\u606f \u5305\u62ec\u6570\u636e\u5e93\u4fe1\u606f\u3001\u8868\u7a7a\u95f4\u4fe1\u606f\u3001\u6570\u636e\u6587\u4ef6\u4fe1\u606f\u3001\u65e5\u5fd7\u76f8\u5173\u4fe1\u606f\uff1b\u6d89\u53ca\u7684\u52a8\u6001\u89c6\u56fe\u6709 V$DATAFILE\u3001V$DATABASE\u3001V$TABLESPACE\u3001V$HUGE_TABLESPACE\u3001V$RLOGFILE \u7b49\u3002 \u4f8b \u67e5\u8be2\u8868\u7a7a\u95f4\u4fe1\u606f Copy SELECT * FROM V$TABLESPACE; \u67e5\u8be2\u7ed3\u679c\u5982\u4e0b\uff1a CopyID NAME CACHE TYPE$ STATUS$ MAX_SIZE TOTAL_SIZE FILE_NUM ENCRYPT_NAME ENCRYPTED_KEY COPY_NUM SIZE_MODE \u2026\u2026 7 TABLESPACE_03 NORMAL 1 0 0 32768 1 null null null null 9 TS_001 NORMAL 1 0 0 16384 1 null null null null \u5185\u5b58\u7ba1\u7406\u4fe1\u606f \u5305\u62ec\u5185\u5b58\u6c60\u4f7f\u7528\u60c5\u51b5\u3001BUFFER \u7f13\u51b2\u533a\u4fe1\u606f\u3001\u865a\u62df\u673a\u4fe1\u606f\u3001\u865a\u62df\u673a\u6808\u5e27\u4fe1\u606f\uff1b\u6d89\u53ca\u7684\u52a8\u6001\u89c6\u56fe\u6709 V$MEM_POOL\u3001V$VMS\u3001V$STKFRM\u3001V$BUFFERPOOL\u3001V$BUFFER_LRU_FIRST\u3001V$BUFFER_UPD_FIRST\u3001V$BUFFER_LRU_LAST\u3001V$BUFFER_UPD_LAST\u3001V$RLOG_PKG\u3001V$COSTPARA \u7b49\u3002 \u4f8b \u67e5\u8be2\u5185\u5b58\u6c60 BUFFERPOOL \u7684\u9875\u6570\u3001\u8bfb\u53d6\u9875\u6570\u548c\u547d\u4e2d\u7387\u4fe1\u606f Copy SELECT NAME,N_PAGES,N_LOGIC_READS,RAT_HIT FROM V$BUFFERPOOL; \u67e5\u8be2\u7ed3\u679c\u5982\u4e0b\uff1a Copy\u884c\u53f7 NAME N_PAGES N_LOGIC_READS RAT_HIT &#8212;&#8212; &#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8211; 1 KEEP 1024 0 1.0000000000E+000 2 RECYCLE 8192 52 9.8113207547E-001 3 NORMAL 1280 1772 9.2726321298E-001 4 NORMAL 8960 7 7.0000000000E-001 \u4e8b\u52a1\u4fe1\u606f \u5305\u62ec\u6240\u6709\u4e8b\u52a1\u4fe1\u606f\u3001\u5f53\u524d\u4e8b\u52a1\u53ef\u89c1\u7684\u4e8b\u52a1\u4fe1\u606f\u3001\u4e8b\u52a1\u9501\u4fe1\u606f\uff08TID \u9501\u3001\u5bf9\u8c61\u9501\uff09\u3001\u56de\u6eda\u6bb5\u4fe1\u606f\u3001\u4e8b\u52a1\u7b49\u5f85\u4fe1\u606f\uff1b\u6d89\u53ca\u7684\u52a8\u6001\u89c6\u56fe\u6709 V$TRX\u3001V$TRXWAIT\u3001V$TRX_VIEW\u3001V$LOCK\u3001V$PURGE \u7b49\u3002 \u4f8b \u67e5\u8be2\u7cfb\u7edf\u4e2d\u4e0a\u9501\u7684\u4e8b\u52a1\u3001\u9501\u7c7b\u578b\uff0c\u4ee5\u53ca\u8868 ID \u4fe1\u606f Copy SELECT TRX_ID,LTYPE,LMODE,TABLE_ID FROM V$LOCK; \u67e5\u8be2\u7ed3\u679c&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","footnotes":""},"categories":[100,80],"tags":[],"class_list":["post-2070","post","type-post","status-publish","format-standard","hentry","category-100","category-80"],"_links":{"self":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/2070","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2070"}],"version-history":[{"count":1,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/2070\/revisions"}],"predecessor-version":[{"id":2071,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/2070\/revisions\/2071"}],"wp:attachment":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2070"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2070"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2070"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}