{"id":94632,"date":"2024-10-19T19:52:17","date_gmt":"2024-10-19T11:52:17","guid":{"rendered":"https:\/\/server.hk\/cnblog\/94632\/"},"modified":"2024-10-19T19:52:17","modified_gmt":"2024-10-19T11:52:17","slug":"oracle-%e6%95%b8%e6%93%9a%e5%ba%ab%e9%80%a3%e6%8e%a5%e7%8b%80%e6%85%8b%ef%bc%9a%e5%a6%82%e4%bd%95%e6%ad%a3%e7%a2%ba%e6%aa%a2%e6%9f%a5%ef%bc%9f-oracle-%e6%95%b8%e6%93%9a%e5%ba%ab%e9%80%a3%e6%8e%a5","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/94632\/","title":{"rendered":"Oracle \u6578\u64da\u5eab\u9023\u63a5\u72c0\u614b\uff1a\u5982\u4f55\u6b63\u78ba\u6aa2\u67e5\uff1f (oracle \u6578\u64da\u5eab\u9023\u63a5\u72c0\u614b)"},"content":{"rendered":"<h1 id=\"oracle-%e6%95%b8%e6%93%9a%e5%ba%ab%e9%80%a3%e6%8e%a5%e7%8b%80%e6%85%8b%ef%bc%9a%e5%a6%82%e4%bd%95%e6%ad%a3%e7%a2%ba%e6%aa%a2%e6%9f%a5%ef%bc%9f-bRlemxASGJ\">Oracle \u6578\u64da\u5eab\u9023\u63a5\u72c0\u614b\uff1a\u5982\u4f55\u6b63\u78ba\u6aa2\u67e5\uff1f<\/h1>\n<p>\u5728\u73fe\u4eca\u7684\u6578\u64da\u9a45\u52d5\u4e16\u754c\u4e2d\uff0cOracle \u6578\u64da\u5eab\u4f5c\u70ba\u4e00\u500b\u5f37\u5927\u7684\u6578\u64da\u7ba1\u7406\u7cfb\u7d71\uff0c\u5ee3\u6cdb\u61c9\u7528\u65bc\u5404\u7a2e\u4f01\u696d\u74b0\u5883\u4e2d\u3002\u4e86\u89e3\u5982\u4f55\u6b63\u78ba\u6aa2\u67e5 Oracle \u6578\u64da\u5eab\u7684\u9023\u63a5\u72c0\u614b\u5c0d\u65bc\u78ba\u4fdd\u7cfb\u7d71\u7684\u7a69\u5b9a\u6027\u548c\u6027\u80fd\u81f3\u95dc\u91cd\u8981\u3002\u672c\u6587\u5c07\u63a2\u8a0e\u5e7e\u7a2e\u6709\u6548\u7684\u65b9\u6cd5\u4f86\u6aa2\u67e5 Oracle \u6578\u64da\u5eab\u7684\u9023\u63a5\u72c0\u614b\u3002<\/p>\n<h2 id=\"1-%e4%bd%bf%e7%94%a8-sqlplus-%e6%aa%a2%e6%9f%a5%e9%80%a3%e6%8e%a5%e7%8b%80%e6%85%8b-bRlemxASGJ\">1. \u4f7f\u7528 SQL*Plus \u6aa2\u67e5\u9023\u63a5\u72c0\u614b<\/h2>\n<p>SQL*Plus \u662f Oracle \u63d0\u4f9b\u7684\u4e00\u500b\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u80fd\u5920\u7528\u4f86\u57f7\u884c SQL \u67e5\u8a62\u548c PL\/SQL \u7a0b\u5e8f\u3002\u8981\u6aa2\u67e5\u6578\u64da\u5eab\u7684\u9023\u63a5\u72c0\u614b\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6b65\u9a5f\uff1a<\/p>\n<pre><code>sqlplus username\/password@hostname:port\/SID<\/code><\/pre>\n<p>\u6210\u529f\u9023\u63a5\u5f8c\uff0c\u60a8\u5c07\u770b\u5230 SQL*Plus \u7684\u63d0\u793a\u7b26\uff0c\u9019\u8868\u793a\u9023\u63a5\u72c0\u614b\u6b63\u5e38\u3002\u5982\u679c\u9023\u63a5\u5931\u6557\uff0c\u7cfb\u7d71\u6703\u8fd4\u56de\u932f\u8aa4\u4fe1\u606f\uff0c\u60a8\u53ef\u4ee5\u6839\u64da\u932f\u8aa4\u4ee3\u78bc\u9032\u884c\u6545\u969c\u6392\u9664\u3002<\/p>\n<h2 id=\"2-%e4%bd%bf%e7%94%a8-oracle-enterprise-manager-bRlemxASGJ\">2. \u4f7f\u7528 Oracle Enterprise Manager<\/h2>\n<p>Oracle Enterprise Manager (OEM) \u662f\u4e00\u500b\u5f37\u5927\u7684\u5716\u5f62\u754c\u9762\u5de5\u5177\uff0c\u80fd\u5920\u5e6b\u52a9\u7528\u6236\u76e3\u63a7\u548c\u7ba1\u7406 Oracle \u6578\u64da\u5eab\u3002\u901a\u904e OEM\uff0c\u60a8\u53ef\u4ee5\u8f15\u9b06\u6aa2\u67e5\u6578\u64da\u5eab\u7684\u9023\u63a5\u72c0\u614b\uff1a<\/p>\n<ul>\n<li>\u767b\u9304\u5230 Oracle Enterprise Manager\u3002<\/li>\n<li>\u9078\u64c7\u76ee\u6a19\u6578\u64da\u5eab\u3002<\/li>\n<li>\u67e5\u770b\u201c\u9023\u63a5\u201d\u90e8\u5206\uff0c\u9019\u88e1\u6703\u986f\u793a\u7576\u524d\u7684\u9023\u63a5\u6578\u91cf\u548c\u72c0\u614b\u3002<\/li>\n<\/ul>\n<p>\u9019\u7a2e\u65b9\u6cd5\u4e0d\u50c5\u80fd\u5920\u6aa2\u67e5\u9023\u63a5\u72c0\u614b\uff0c\u9084\u80fd\u63d0\u4f9b\u6709\u95dc\u6027\u80fd\u7684\u8a73\u7d30\u4fe1\u606f\u3002<\/p>\n<h2 id=\"3-%e4%bd%bf%e7%94%a8-vsession-%e6%aa%a2%e6%9f%a5%e7%95%b6%e5%89%8d%e6%9c%83%e8%a9%b1-bRlemxASGJ\">3. \u4f7f\u7528 V$SESSION \u6aa2\u67e5\u7576\u524d\u6703\u8a71<\/h2>\n<p>\u5728 Oracle \u6578\u64da\u5eab\u4e2d\uff0cV$SESSION \u8996\u5716\u63d0\u4f9b\u4e86\u6709\u95dc\u7576\u524d\u6240\u6709\u6703\u8a71\u7684\u4fe1\u606f\u3002\u60a8\u53ef\u4ee5\u901a\u904e\u57f7\u884c\u4ee5\u4e0b SQL \u67e5\u8a62\u4f86\u6aa2\u67e5\u7576\u524d\u7684\u9023\u63a5\u72c0\u614b\uff1a<\/p>\n<pre><code>SELECT * FROM V$SESSION WHERE STATUS = 'ACTIVE';<\/code><\/pre>\n<p>\u9019\u500b\u67e5\u8a62\u5c07\u8fd4\u56de\u6240\u6709\u7576\u524d\u6d3b\u52d5\u7684\u6703\u8a71\uff0c\u60a8\u53ef\u4ee5\u6839\u64da\u9700\u8981\u9032\u4e00\u6b65\u7be9\u9078\u6216\u5206\u6790\u9019\u4e9b\u6578\u64da\u3002<\/p>\n<h2 id=\"4-%e6%aa%a2%e6%9f%a5-listener-%e7%8b%80%e6%85%8b-bRlemxASGJ\">4. \u6aa2\u67e5 Listener \u72c0\u614b<\/h2>\n<p>Oracle Listener \u662f\u4e00\u500b\u91cd\u8981\u7684\u7d44\u4ef6\uff0c\u8ca0\u8cac\u8655\u7406\u5ba2\u6236\u7aef\u7684\u9023\u63a5\u8acb\u6c42\u3002\u8981\u6aa2\u67e5 Listener \u7684\u72c0\u614b\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre><code>lsnrctl status<\/code><\/pre>\n<p>\u9019\u500b\u547d\u4ee4\u5c07\u986f\u793a Listener \u7684\u7576\u524d\u72c0\u614b\uff0c\u5305\u62ec\u5df2\u8a3b\u518a\u7684\u670d\u52d9\u548c\u7576\u524d\u7684\u9023\u63a5\u6578\u91cf\u3002\u5982\u679c Listener \u672a\u904b\u884c\uff0c\u5247\u9700\u8981\u555f\u52d5\u5b83\uff1a<\/p>\n<pre><code>lsnrctl start<\/code><\/pre>\n<h2 id=\"5-%e4%bd%bf%e7%94%a8%e7%b6%b2%e7%b5%a1%e5%b7%a5%e5%85%b7%e6%aa%a2%e6%9f%a5%e9%80%a3%e6%8e%a5-bRlemxASGJ\">5. \u4f7f\u7528\u7db2\u7d61\u5de5\u5177\u6aa2\u67e5\u9023\u63a5<\/h2>\n<p>\u9664\u4e86\u4f7f\u7528 Oracle \u63d0\u4f9b\u7684\u5de5\u5177\u5916\uff0c\u60a8\u9084\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u7db2\u7d61\u5de5\u5177\u4f86\u6aa2\u67e5\u6578\u64da\u5eab\u7684\u9023\u63a5\u72c0\u614b\u3002\u4f8b\u5982\uff0c\u4f7f\u7528 ping \u547d\u4ee4\u4f86\u6aa2\u67e5\u4e3b\u6a5f\u662f\u5426\u53ef\u9054\uff1a<\/p>\n<pre><code>ping hostname<\/code><\/pre>\n<p>\u5982\u679c\u4e3b\u6a5f\u53ef\u9054\uff0c\u5247\u53ef\u4ee5\u9032\u4e00\u6b65\u4f7f\u7528 telnet \u547d\u4ee4\u4f86\u6aa2\u67e5\u7279\u5b9a\u7aef\u53e3\u7684\u9023\u63a5\uff1a<\/p>\n<pre><code>telnet hostname port<\/code><\/pre>\n<p>\u9019\u4e9b\u5de5\u5177\u80fd\u5920\u5e6b\u52a9\u60a8\u78ba\u5b9a\u7db2\u7d61\u5c64\u9762\u662f\u5426\u5b58\u5728\u554f\u984c\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-bRlemxASGJ\">\u7e3d\u7d50<\/h2>\n<p>\u6aa2\u67e5 Oracle \u6578\u64da\u5eab\u7684\u9023\u63a5\u72c0\u614b\u662f\u78ba\u4fdd\u7cfb\u7d71\u7a69\u5b9a\u6027\u548c\u6027\u80fd\u7684\u91cd\u8981\u6b65\u9a5f\u3002\u901a\u904e\u4f7f\u7528 SQL*Plus\u3001Oracle Enterprise Manager\u3001V$SESSION \u8996\u5716\u3001Listener \u72c0\u614b\u6aa2\u67e5\u4ee5\u53ca\u7db2\u7d61\u5de5\u5177\uff0c\u60a8\u53ef\u4ee5\u6709\u6548\u5730\u76e3\u63a7\u548c\u7ba1\u7406\u6578\u64da\u5eab\u7684\u9023\u63a5\u72c0\u614b\u3002\u5c0d\u65bc\u9700\u8981\u9ad8\u6548\u80fd\u548c\u7a69\u5b9a\u6027\u7684\u61c9\u7528\uff0c\u9078\u64c7\u5408\u9069\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u89e3\u6c7a\u65b9\u6848\u4e5f\u662f\u81f3\u95dc\u91cd\u8981\u7684\uff0c\u9019\u6a23\u53ef\u4ee5\u78ba\u4fdd\u60a8\u7684\u6578\u64da\u5eab\u904b\u884c\u5728\u6700\u4f73\u74b0\u5883\u4e2d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e86\u89e3\u5982\u4f55\u6b63\u78ba\u6aa2\u67e5Oracle\u6578\u64da\u5eab\u7684\u9023\u63a5\u72c0\u614b\uff0c\u78ba\u4fdd\u6578\u64da\u5eab\u904b\u884c\u6b63\u5e38\uff0c\u63d0\u5347\u7cfb\u7d71\u7a69\u5b9a\u6027\u8207\u6027\u80fd\u3002<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-94632","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/94632","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=94632"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/94632\/revisions"}],"predecessor-version":[{"id":94633,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/94632\/revisions\/94633"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=94632"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=94632"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=94632"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}