{"id":5598,"date":"2024-11-14T09:22:30","date_gmt":"2024-11-14T01:22:30","guid":{"rendered":"https:\/\/fwq.ai\/blog\/5598\/"},"modified":"2024-11-14T09:22:30","modified_gmt":"2024-11-14T01:22:30","slug":"oracle%e6%80%8e%e4%b9%88%e6%96%b0%e5%bb%ba%e7%94%a8%e6%88%b7","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/5598\/","title":{"rendered":"oracle\u600e\u4e48\u65b0\u5efa\u7528\u6237"},"content":{"rendered":"<blockquote><p>\n  \u5728 oracle \u4e2d\u521b\u5efa\u65b0\u7528\u6237\u9700\u8981\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u8fde\u63a5\u5230\u6570\u636e\u5e93\u3002\u4f7f\u7528 create user \u8bed\u53e5\u521b\u5efa\u7528\u6237\u5e76\u6307\u5b9a\u5bc6\u7801\u3002\u6388\u4e88\u7528\u6237\u7279\u5b9a\u6743\u9650\uff08\u5982 select\uff09\u3002\u4f7f\u7528\u65b0\u7528\u6237\u91cd\u65b0\u8fde\u63a5\u5e76\u6d4b\u8bd5\u6743\u9650\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/30\/2024053018035585223.jpg\" class=\"aligncenter\" title=\"oracle\u600e\u4e48\u65b0\u5efa\u7528\u6237\u63d2\u56fe\" alt=\"oracle\u600e\u4e48\u65b0\u5efa\u7528\u6237\u63d2\u56fe\" \/><\/p>\n<h2>\u5982\u4f55\u5728 Oracle \u4e2d\u521b\u5efa\u65b0\u7528\u6237<\/h2>\n<p>\u5728 Oracle \u4e2d\u521b\u5efa\u65b0\u7528\u6237\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u8fc7\u7a0b\uff0c\u53ef\u4ee5\u6388\u4e88\u7528\u6237\u8bbf\u95ee\u6570\u636e\u5e93\u548c\u6267\u884c\u64cd\u4f5c\u6240\u9700\u7684\u6743\u9650\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u65b0\u5efa\u7528\u6237\u7684\u6b65\u9aa4\uff1a<\/p>\n<h3>\u6b65\u9aa4 1\uff1a\u8fde\u63a5\u5230\u6570\u636e\u5e93<\/h3>\n<p>\u4f7f\u7528 Oracle \u6570\u636e\u5e93\u5ba2\u6237\u7aef\uff08\u5982 SQL*Plus \u6216 SQL Developer\uff09\u8fde\u63a5\u5230\u6570\u636e\u5e93\u670d\u52a1\u5668\u3002<\/p>\n<h3>\u6b65\u9aa4 2\uff1a\u521b\u5efa\u7528\u6237<\/h3>\n<p>\u4f7f\u7528\u4ee5\u4e0b\u8bed\u6cd5\u521b\u5efa\u65b0\u7528\u6237\uff1a<\/p>\n<pre>CREATE USER &lt;\u7528\u6237\u540d&gt; IDENTIFIED BY &lt;\u5bc6\u7801&gt;;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4f8b\u5982\uff0c\u8981\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a &#8220;new_user&#8221;\u3001\u5bc6\u7801\u4e3a &#8220;mypassword&#8221; \u7684\u7528\u6237\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>CREATE USER new_user IDENTIFIED BY mypassword;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h3>\u6b65\u9aa4 3\uff1a\u6388\u4e88\u6743\u9650<\/h3>\n<p>\u5982\u679c\u4e0d\u6388\u4e88\u4efb\u4f55\u6743\u9650\uff0c\u65b0\u7528\u6237\u5c06\u65e0\u6cd5\u6267\u884c\u4efb\u4f55\u64cd\u4f5c\u3002\u4f7f\u7528\u4ee5\u4e0b\u8bed\u6cd5\u6388\u4e88\u7279\u5b9a\u6743\u9650\uff1a<\/p>\n<pre>GRANT &lt;\u6743\u9650&gt; ON &lt;\u5bf9\u8c61&gt; TO &lt;\u7528\u6237\u540d&gt;;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4f8b\u5982\uff0c\u8981\u6388\u4e88 &#8220;new_user&#8221; \u5bf9\u8868 &#8220;employees&#8221; \u7684 SELECT \u6743\u9650\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>GRANT SELECT ON employees TO new_user;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h3>\u6b65\u9aa4 4\uff1a\u6d4b\u8bd5\u6743\u9650<\/h3>\n<p>\u4f7f\u7528 &#8220;new_user&#8221; \u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\u91cd\u65b0\u8fde\u63a5\u5230\u6570\u636e\u5e93\u3002\u7136\u540e\uff0c\u5c1d\u8bd5\u6267\u884c\u6388\u4e88\u6743\u9650\u7684\u64cd\u4f5c\uff0c\u4ee5\u9a8c\u8bc1\u7528\u6237\u662f\u5426\u5177\u6709\u6240\u9700\u6743\u9650\u3002<\/p>\n<h3>\u6ce8\u610f\uff1a<\/h3>\n<ul>\n<li>\u9009\u62e9\u4e00\u4e2a\u5f3a\u5bc6\u7801\u5e76\u5c06\u5176\u4fdd\u5bc6\u3002<\/li>\n<li>\u6388\u4e88\u4ec5\u7528\u6237\u9700\u8981\u7684\u6700\u5c0f\u6743\u9650\u3002<\/li>\n<li>\u5728\u521b\u5efa\u7528\u6237\u540e\u518d\u8003\u8651\u6388\u4e88\u89d2\u8272\uff0c\u56e0\u4e3a\u89d2\u8272\u53ef\u4ee5\u65b9\u4fbf\u5730\u7ba1\u7406\u6743\u9650\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u65b0\u5efa\u7528\u6237\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u7f51\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 oracle \u4e2d\u521b\u5efa\u65b0\u7528\u6237\u9700\u8981\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u8fde\u63a5\u5230\u6570\u636e\u5e93\u3002\u4f7f\u7528 create user \u8bed\u53e5\u521b\u5efa\u7528\u6237\u5e76\u6307\u5b9a\u5bc6\u7801\u3002\u6388\u4e88\u7528\u6237\u7279\u5b9a\u6743\u9650\uff08\u5982 select\uff09\u3002\u4f7f\u7528\u65b0\u7528\u6237\u91cd\u65b0\u8fde\u63a5\u5e76\u6d4b\u8bd5\u6743\u9650\u3002 \u5982\u4f55\u5728 Oracle \u4e2d\u521b\u5efa\u65b0\u7528\u6237 \u5728 Oracle \u4e2d\u521b\u5efa\u65b0\u7528\u6237\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u8fc7\u7a0b\uff0c\u53ef\u4ee5\u6388\u4e88\u7528\u6237\u8bbf\u95ee\u6570\u636e\u5e93\u548c\u6267\u884c\u64cd\u4f5c\u6240\u9700\u7684\u6743\u9650\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u65b0\u5efa\u7528\u6237\u7684\u6b65\u9aa4\uff1a \u6b65\u9aa4 1\uff1a\u8fde\u63a5\u5230\u6570\u636e\u5e93 \u4f7f\u7528 Oracle \u6570\u636e\u5e93\u5ba2\u6237\u7aef\uff08\u5982 SQL*Plus \u6216 SQL Developer\uff09\u8fde\u63a5\u5230\u6570\u636e\u5e93\u670d\u52a1\u5668\u3002 \u6b65\u9aa4 2\uff1a\u521b\u5efa\u7528\u6237 \u4f7f\u7528\u4ee5\u4e0b\u8bed\u6cd5\u521b\u5efa\u65b0\u7528\u6237\uff1a CREATE USER &lt;\u7528\u6237\u540d&gt; IDENTIFIED BY &lt;\u5bc6\u7801&gt;; \u767b\u5f55\u540e\u590d\u5236 \u4f8b\u5982\uff0c\u8981\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a &#8220;new_user&#8221;\u3001\u5bc6\u7801\u4e3a &#8220;mypassword&#8221; \u7684\u7528\u6237\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a CREATE USER new_user IDENTIFIED BY mypassword; \u767b\u5f55\u540e\u590d\u5236 \u6b65\u9aa4 3\uff1a\u6388\u4e88\u6743\u9650 \u5982\u679c\u4e0d\u6388\u4e88\u4efb\u4f55\u6743\u9650\uff0c\u65b0\u7528\u6237\u5c06\u65e0\u6cd5\u6267\u884c\u4efb\u4f55\u64cd\u4f5c\u3002\u4f7f\u7528\u4ee5\u4e0b\u8bed\u6cd5\u6388\u4e88\u7279\u5b9a\u6743\u9650\uff1a GRANT &lt;\u6743\u9650&gt; ON &lt;\u5bf9\u8c61&gt; TO &lt;\u7528\u6237\u540d&gt;; \u767b\u5f55\u540e\u590d\u5236 \u4f8b\u5982\uff0c\u8981\u6388\u4e88 &#8220;new_user&#8221; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-5598","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5598","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=5598"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5598\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=5598"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=5598"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=5598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}