{"id":95300,"date":"2024-10-19T23:54:19","date_gmt":"2024-10-19T15:54:19","guid":{"rendered":"https:\/\/server.hk\/cnblog\/95300\/"},"modified":"2024-10-19T23:54:19","modified_gmt":"2024-10-19T15:54:19","slug":"oracle%e5%95%9f%e5%8b%95%e7%9a%84%e5%af%a6%e9%9a%9b%e6%93%8d%e4%bd%9c%e8%a9%b3%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/95300\/","title":{"rendered":"Oracle\u555f\u52d5\u7684\u5be6\u969b\u64cd\u4f5c\u8a73\u89e3"},"content":{"rendered":"<h1 id=\"oracle%e5%95%9f%e5%8b%95%e7%9a%84%e5%af%a6%e9%9a%9b%e6%93%8d%e4%bd%9c%e8%a9%b3%e8%a7%a3-XkwEnctTrm\">Oracle\u555f\u52d5\u7684\u5be6\u969b\u64cd\u4f5c\u8a73\u89e3<\/h1>\n<p>Oracle\u6578\u64da\u5eab\u662f\u4e00\u500b\u5f37\u5927\u7684\u95dc\u4fc2\u578b\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\uff0c\u5ee3\u6cdb\u61c9\u7528\u65bc\u4f01\u696d\u7d1a\u61c9\u7528\u4e2d\u3002\u672c\u6587\u5c07\u8a73\u7d30\u4ecb\u7d39\u5982\u4f55\u555f\u52d5Oracle\u6578\u64da\u5eab\uff0c\u4e26\u63d0\u4f9b\u5be6\u969b\u64cd\u4f5c\u7684\u6b65\u9a5f\u548c\u6ce8\u610f\u4e8b\u9805\u3002<\/p>\n<h2 id=\"1-%e7%92%b0%e5%a2%83%e6%ba%96%e5%82%99-XkwEnctTrm\">1. \u74b0\u5883\u6e96\u5099<\/h2>\n<p>\u5728\u555f\u52d5Oracle\u6578\u64da\u5eab\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u78ba\u4fdd\u74b0\u5883\u5df2\u7d93\u6b63\u78ba\u914d\u7f6e\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u57fa\u672c\u8981\u6c42\uff1a<\/p>\n<ul>\n<li>\u78ba\u4fdd\u5df2\u5b89\u88ddOracle\u6578\u64da\u5eab\u8edf\u4ef6\u3002<\/li>\n<li>\u78ba\u8a8dOracle\u670d\u52d9\u5df2\u7d93\u5b89\u88dd\u4e26\u914d\u7f6e\u3002<\/li>\n<li>\u6aa2\u67e5\u64cd\u4f5c\u7cfb\u7d71\u7684\u517c\u5bb9\u6027\u3002<\/li>\n<\/ul>\n<h2 id=\"2-%e4%bd%bf%e7%94%a8sqlplus%e5%95%9f%e5%8b%95oracle%e6%95%b8%e6%93%9a%e5%ba%ab-XkwEnctTrm\">2. \u4f7f\u7528SQL*Plus\u555f\u52d5Oracle\u6578\u64da\u5eab<\/h2>\n<p>SQL*Plus\u662fOracle\u63d0\u4f9b\u7684\u4e00\u500b\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u7528\u65bc\u8207\u6578\u64da\u5eab\u9032\u884c\u4ea4\u4e92\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528SQL*Plus\u555f\u52d5Oracle\u6578\u64da\u5eab\u7684\u6b65\u9a5f\uff1a<\/p>\n<h3 id=\"2-1-%e7%99%bb%e9%8c%84%e5%88%b0sqlplus-XkwEnctTrm\">2.1 \u767b\u9304\u5230SQL*Plus<\/h3>\n<pre><code>sqlplus \/ as sysdba<\/code><\/pre>\n<p>\u9019\u689d\u547d\u4ee4\u5c07\u4ee5SYS\u7528\u6236\u8eab\u4efd\u767b\u9304\uff0c\u9019\u662f\u6578\u64da\u5eab\u7684\u7ba1\u7406\u54e1\u8cec\u6236\u3002<\/p>\n<h3 id=\"2-2-%e5%95%9f%e5%8b%95%e6%95%b8%e6%93%9a%e5%ba%ab-XkwEnctTrm\">2.2 \u555f\u52d5\u6578\u64da\u5eab<\/h3>\n<p>\u767b\u9304\u5f8c\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u555f\u52d5\u6578\u64da\u5eab\uff1a<\/p>\n<pre><code>STARTUP<\/code><\/pre>\n<p>\u9019\u689d\u547d\u4ee4\u5c07\u555f\u52d5\u6578\u64da\u5eab\u3002\u5982\u679c\u6578\u64da\u5eab\u5df2\u7d93\u5728\u904b\u884c\uff0c\u5247\u6703\u986f\u793a\u76f8\u61c9\u7684\u63d0\u793a\u4fe1\u606f\u3002<\/p>\n<h3 id=\"2-3-%e6%aa%a2%e6%9f%a5%e6%95%b8%e6%93%9a%e5%ba%ab%e7%8b%80%e6%85%8b-XkwEnctTrm\">2.3 \u6aa2\u67e5\u6578\u64da\u5eab\u72c0\u614b<\/h3>\n<p>\u555f\u52d5\u5f8c\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6aa2\u67e5\u6578\u64da\u5eab\u7684\u72c0\u614b\uff1a<\/p>\n<pre><code>SELECT status FROM v$instance;<\/code><\/pre>\n<p>\u9019\u689d\u67e5\u8a62\u5c07\u8fd4\u56de\u6578\u64da\u5eab\u7684\u7576\u524d\u72c0\u614b\uff0c\u4f8b\u5982\u201cOPEN\u201d\u8868\u793a\u6578\u64da\u5eab\u5df2\u6210\u529f\u555f\u52d5\u3002<\/p>\n<h2 id=\"3-%e4%bd%bf%e7%94%a8oracle%e6%9c%8d%e5%8b%99%e5%95%9f%e5%8b%95%e6%95%b8%e6%93%9a%e5%ba%ab-XkwEnctTrm\">3. \u4f7f\u7528Oracle\u670d\u52d9\u555f\u52d5\u6578\u64da\u5eab<\/h2>\n<p>\u9664\u4e86\u4f7f\u7528SQL*Plus\uff0c\u9084\u53ef\u4ee5\u901a\u904e\u64cd\u4f5c\u7cfb\u7d71\u7684\u670d\u52d9\u7ba1\u7406\u5de5\u5177\u4f86\u555f\u52d5Oracle\u6578\u64da\u5eab\u3002\u4ee5\u4e0b\u662f\u57fa\u65bcLinux\u7cfb\u7d71\u7684\u64cd\u4f5c\u6b65\u9a5f\uff1a<\/p>\n<h3 id=\"3-1-%e4%bd%bf%e7%94%a8systemctl%e5%91%bd%e4%bb%a4-XkwEnctTrm\">3.1 \u4f7f\u7528systemctl\u547d\u4ee4<\/h3>\n<p>\u5728Linux\u7cfb\u7d71\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u555f\u52d5Oracle\u670d\u52d9\uff1a<\/p>\n<pre><code>sudo systemctl start oracle.service<\/code><\/pre>\n<p>\u9019\u689d\u547d\u4ee4\u5c07\u555f\u52d5Oracle\u6578\u64da\u5eab\u670d\u52d9\u3002<\/p>\n<h3 id=\"3-2-%e6%aa%a2%e6%9f%a5%e6%9c%8d%e5%8b%99%e7%8b%80%e6%85%8b-XkwEnctTrm\">3.2 \u6aa2\u67e5\u670d\u52d9\u72c0\u614b<\/h3>\n<p>\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6aa2\u67e5Oracle\u670d\u52d9\u7684\u72c0\u614b\uff1a<\/p>\n<pre><code>sudo systemctl status oracle.service<\/code><\/pre>\n<p>\u9019\u5c07\u986f\u793a\u670d\u52d9\u7684\u7576\u524d\u72c0\u614b\uff0c\u5305\u62ec\u662f\u5426\u6b63\u5728\u904b\u884c\u3002<\/p>\n<h2 id=\"4-%e5%95%9f%e5%8b%95%e9%81%8e%e7%a8%8b%e4%b8%ad%e7%9a%84%e5%b8%b8%e8%a6%8b%e5%95%8f%e9%a1%8c-XkwEnctTrm\">4. \u555f\u52d5\u904e\u7a0b\u4e2d\u7684\u5e38\u898b\u554f\u984c<\/h2>\n<p>\u5728\u555f\u52d5Oracle\u6578\u64da\u5eab\u6642\uff0c\u53ef\u80fd\u6703\u9047\u5230\u4e00\u4e9b\u5e38\u898b\u554f\u984c\uff0c\u4ee5\u4e0b\u662f\u5e7e\u500b\u89e3\u6c7a\u65b9\u6848\uff1a<\/p>\n<ul>\n<li><strong>\u6578\u64da\u5eab\u7121\u6cd5\u555f\u52d5\uff1a<\/strong>\u6aa2\u67e5alert.log\u6587\u4ef6\u4ee5\u7372\u53d6\u8a73\u7d30\u932f\u8aa4\u4fe1\u606f\u3002<\/li>\n<li><strong>\u7121\u6cd5\u9023\u63a5\u5230\u6578\u64da\u5eab\uff1a<\/strong>\u78ba\u4fddOracle Listener\u6b63\u5728\u904b\u884c\uff0c\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4 <code>lsnrctl status<\/code> \u6aa2\u67e5\u3002<\/li>\n<li><strong>\u6b0a\u9650\u554f\u984c\uff1a<\/strong>\u78ba\u4fdd\u4ee5SYSDBA\u8eab\u4efd\u767b\u9304\uff0c\u4e26\u6aa2\u67e5\u7528\u6236\u6b0a\u9650\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-XkwEnctTrm\">\u7e3d\u7d50<\/h2>\n<p>\u555f\u52d5Oracle\u6578\u64da\u5eab\u662f\u4e00\u500b\u76f8\u5c0d\u7c21\u55ae\u7684\u904e\u7a0b\uff0c\u53ea\u9700\u9075\u5faa\u4e0a\u8ff0\u6b65\u9a5f\u5373\u53ef\u9806\u5229\u5b8c\u6210\u3002\u7121\u8ad6\u662f\u4f7f\u7528SQL*Plus\u9084\u662f\u64cd\u4f5c\u7cfb\u7d71\u7684\u670d\u52d9\u7ba1\u7406\u5de5\u5177\uff0c\u4e86\u89e3\u5982\u4f55\u6b63\u78ba\u555f\u52d5\u6578\u64da\u5eab\u5c0d\u65bc\u7dad\u8b77\u548c\u7ba1\u7406\u6578\u64da\u5eab\u7cfb\u7d71\u81f3\u95dc\u91cd\u8981\u3002\u5982\u679c\u60a8\u9700\u8981\u9032\u4e00\u6b65\u7684\u652f\u6301\u6216\u5c0b\u627e\u5408\u9069\u7684\u89e3\u6c7a\u65b9\u6848\uff0c\u8acb\u8003\u616e\u6211\u5011\u7684<a href=\"https:\/\/server.hk\">VPS<\/a> \u670d\u52d9\uff0c\u63d0\u4f9b\u7a69\u5b9a\u7684\u6578\u64da\u5eab\u904b\u884c\u74b0\u5883\u548c\u5c08\u696d\u7684\u6280\u8853\u652f\u6301\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6df1\u5165\u63a2\u8a0eOracle\u555f\u52d5\u7684\u5be6\u969b\u64cd\u4f5c\uff0c\u63d0\u4f9b\u8a73\u7d30\u6b65\u9a5f\u8207\u6280\u5de7\uff0c\u52a9\u60a8\u8f15\u9b06\u638c\u63e1\u6578\u64da\u5eab\u555f\u52d5\u904e\u7a0b\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-95300","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/95300","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=95300"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/95300\/revisions"}],"predecessor-version":[{"id":95301,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/95300\/revisions\/95301"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=95300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=95300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=95300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}