{"id":197,"date":"2025-03-17T18:36:47","date_gmt":"2025-03-17T10:36:47","guid":{"rendered":"https:\/\/pc.wuhanioe.com\/index.php\/2025\/03\/17\/sql-server-%e8%bf%9e%e6%8e%a5%e6%8a%a5%e9%94%99-18456%ef%bc%9a%e7%99%bb%e5%bd%95%e5%a4%b1%e8%b4%a5%e7%9a%84%e5%ae%8c%e6%95%b4%e8%af%8a%e6%96%ad%e4%b8%8e%e4%bf%ae%e5%a4%8d%e6%b8%85%e5%8d%95\/"},"modified":"2025-03-17T18:36:47","modified_gmt":"2025-03-17T10:36:47","slug":"sql-server-%e8%bf%9e%e6%8e%a5%e6%8a%a5%e9%94%99-18456%ef%bc%9a%e7%99%bb%e5%bd%95%e5%a4%b1%e8%b4%a5%e7%9a%84%e5%ae%8c%e6%95%b4%e8%af%8a%e6%96%ad%e4%b8%8e%e4%bf%ae%e5%a4%8d%e6%b8%85%e5%8d%95","status":"publish","type":"post","link":"https:\/\/pc.wuhanioe.com\/index.php\/2025\/03\/17\/sql-server-%e8%bf%9e%e6%8e%a5%e6%8a%a5%e9%94%99-18456%ef%bc%9a%e7%99%bb%e5%bd%95%e5%a4%b1%e8%b4%a5%e7%9a%84%e5%ae%8c%e6%95%b4%e8%af%8a%e6%96%ad%e4%b8%8e%e4%bf%ae%e5%a4%8d%e6%b8%85%e5%8d%95\/","title":{"rendered":"SQL Server \u8fde\u63a5\u62a5\u9519 18456\uff1a\u767b\u5f55\u5931\u8d25\u7684\u5b8c\u6574\u8bca\u65ad\u4e0e\u4fee\u590d\u6e05\u5355"},"content":{"rendered":"<p>SQL Server \u5ba2\u6237\u7aef\u5e38\u5f39\u51fa\u300e\u7528\u6237 \u767b\u5f55\u5931\u8d25 (Microsoft SQL Server, \u9519\u8bef: 18456)\u300f\uff0c\u4f46\u9ed8\u8ba4\u4e0d\u544a\u8bc9\u4f60\u4e3a\u4ec0\u4e48\u3002\u8fd9\u4e2a\u9519\u8bef\u80cc\u540e\u5176\u5b9e\u85cf\u7740\u4e00\u7ec4\u300e\u72b6\u6001\u4ee3\u7801\u300f\uff0c\u8bfb\u61c2\u5b83\u5c31\u80fd\u7cbe\u51c6\u4e0b\u624b\u3002\u672c\u6587\u6309 Windows \u8ba4\u8bc1\u4e0e SQL \u8ba4\u8bc1\u4e24\u6761\u7ebf\uff0c\u5e26\u4f60\u628a 18456 \u5f7b\u5e95\u62c6\u5f00\u3002<\/p>\n<h2>\u4e00\u3001\u5148\u62ff\u5230\u771f\u6b63\u7684\u5931\u8d25\u539f\u56e0<\/h2>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b 18456 \u5bf9\u5ba2\u6237\u7aef\u662f\u6a21\u7cca\u7684\uff0c<strong>\u771f\u6b63\u7684\u539f\u56e0\u5199\u5728 SQL Server \u7684\u9519\u8bef\u65e5\u5fd7\u91cc<\/strong>\u3002\u6253\u5f00 SSMS \u7684\u300e\u7ba1\u7406 \u2192 SQL Server \u65e5\u5fd7\u300f\uff0c\u6216\u67e5\u6587\u4ef6 <code>ERRORLOG<\/code>\uff0c\u4f1a\u770b\u5230\u7c7b\u4f3c\uff1a<code>\u767b\u5f55\u5931\u8d25\uff0c\u7528\u6237 'sa'\u3002\u539f\u56e0: \u5bc6\u7801\u4e0e\u6240\u63d0\u4f9b\u7684\u767b\u5f55\u540d\u4e0d\u5339\u914d\u3002 [CLIENT: 127.0.0.1]<\/code>\u3002\u672b\u5c3e\u5e38\u5e26\u72b6\u6001\u53f7\uff0c\u4f8b\u5982\u72b6\u6001 5 \u8868\u793a\u300e\u7528\u6237\u540d\u65e0\u6548\u300f\uff0c\u72b6\u6001 8 \u8868\u793a\u300e\u5bc6\u7801\u9519\u8bef\u300f\uff0c\u72b6\u6001 38 \u8868\u793a\u300e\u627e\u4e0d\u5230\u5bf9\u5e94\u6570\u636e\u5e93\u300f\u3002<\/p>\n<h2>\u4e8c\u3001\u786e\u8ba4\u670d\u52a1\u5668\u8ba4\u8bc1\u6a21\u5f0f<\/h2>\n<ol>\n<li>\u5728 SSMS \u5bf9\u8c61\u8d44\u6e90\u7ba1\u7406\u5668\u53f3\u952e\u670d\u52a1\u5668 \u2192 \u300e\u5c5e\u6027\u300f\u2192 \u300e\u5b89\u5168\u6027\u300f\u3002<\/li>\n<li>\u786e\u8ba4\u300e\u670d\u52a1\u5668\u8eab\u4efd\u9a8c\u8bc1\u300f\u5df2\u9009\u300eSQL Server \u548c Windows \u8eab\u4efd\u9a8c\u8bc1\u6a21\u5f0f\u300f\uff0c\u5426\u5219 <code>sa<\/code> \u7b49 SQL \u767b\u5f55\u6c38\u8fdc\u8fde\u4e0d\u4e0a\u3002<\/li>\n<li>\u6539\u5b8c\u540e\u5fc5\u987b\u53f3\u952e\u670d\u52a1\u5668\u300e\u91cd\u65b0\u542f\u52a8\u300f\u624d\u4f1a\u751f\u6548\u3002<\/li>\n<\/ol>\n<h2>\u4e09\u3001SQL \u767b\u5f55\u540d\u88ab\u7981\u7528\u7684\u4fee\u590d<\/h2>\n<p>\u5f88\u591a\u65b0\u624b\u542f\u7528 <code>sa<\/code> \u540e\u4ecd\u62a5 18456\uff0c<strong>\u539f\u56e0\u662f\u767b\u5f55\u540d\u5904\u4e8e\u300e\u7981\u7528\u300f\u72b6\u6001<\/strong>\u3002\u5728\u300e\u5b89\u5168\u6027 \u2192 \u767b\u5f55\u540d\u300f\u91cc\u53f3\u952e\u8be5\u8d26\u53f7 \u2192 \u300e\u72b6\u6001\u300f\uff0c\u628a\u300e\u662f\u5426\u5df2\u542f\u7528\u300f\u8bbe\u4e3a\u300e\u5df2\u542f\u7528\u300f\uff1b\u540c\u65f6\u786e\u8ba4\u300e\u767b\u5f55\u300f\u9009\u9879\u4e3a\u300e\u5df2\u6388\u4e88\u300f\u800c\u975e\u300e\u5df2\u62d2\u7edd\u300f\u3002\u7528 T-SQL \u7b49\u4ef7\u4e8e\uff1a<\/p>\n<p><code>ALTER LOGIN sa ENABLE;<\/code><br \/><code>ALTER LOGIN sa WITH PASSWORD='\u65b0\u5bc6\u7801';<\/code><\/p>\n<h2>\u56db\u3001Windows \u8ba4\u8bc1\u8fde\u4e0d\u4e0a\u7684\u5904\u7406<\/h2>\n<ol>\n<li>\u72b6\u6001 11\/12 \u591a\u51fa\u73b0\u5728 Windows \u8ba4\u8bc1\uff1a\u786e\u8ba4\u8fde\u63a5\u5b57\u7b26\u4e32\u7528\u7684\u662f <code>Integrated Security=true<\/code>\uff0c\u4e14\u5f53\u524d Windows \u7528\u6237\u6709\u767b\u5f55\u6620\u5c04\u3002<\/li>\n<li>\u672c\u5730\u7ba1\u7406\u5458\u60f3\u63a5\u7ba1\u65f6\uff0c\u53ef\u7528\u5355\u7528\u6237\u6a21\u5f0f\u542f\u52a8\uff1a\u5728\u914d\u7f6e\u7ba1\u7406\u5668\u628a\u542f\u52a8\u53c2\u6570\u52a0 <code>-m<\/code>\uff0c\u91cd\u542f\u540e\u7528\u7ba1\u7406\u5458\u8d26\u6237\u8fde\u5165\uff0c\u91cd\u5efa\u767b\u5f55\u540d\u3002<\/li>\n<li>\u82e5\u5ba2\u6237\u7aef\u5728\u53e6\u4e00\u53f0\u673a\u5668\uff0c\u68c0\u67e5 SQL \u662f\u5426\u53ea\u5141\u8bb8\u672c\u5730\u7ba1\u9053\uff0c\u9700\u5728\u300e\u7f51\u7edc\u914d\u7f6e\u300f\u91cc\u542f\u7528 TCP\/IP \u534f\u8bae\u5e76\u91cd\u542f\u3002<\/li>\n<\/ol>\n<h2>\u4e94\u3001\u9ed8\u8ba4\u6570\u636e\u5e93\u7f3a\u5931\u7684\u9677\u9631<\/h2>\n<p>\u72b6\u6001 38 \u6216 40 \u901a\u5e38\u8868\u793a\u767b\u5f55\u540d\u6307\u5b9a\u7684\u300e\u9ed8\u8ba4\u6570\u636e\u5e93\u300f\u5df2\u88ab\u5220\u9664\u6216\u8131\u673a\u3002<strong>\u628a\u767b\u5f55\u540d\u7684\u9ed8\u8ba4\u6570\u636e\u5e93\u6539\u56de master \u6216\u5b58\u5728\u7684\u5e93<\/strong>\u5373\u53ef\u4e34\u65f6\u6062\u590d\uff0c\u518d\u5728\u8fde\u63a5\u91cc\u663e\u5f0f\u6307\u5b9a <code>Initial Catalog<\/code>\u3002<\/p>\n<p><strong>\u6280\u672f\u5c0f\u7ed3\uff1a<\/strong>18456 \u4e0d\u662f\u5355\u4e00\u6545\u969c\uff0c\u800c\u662f\u4e00\u7ec4\u5e26\u72b6\u6001\u53f7\u7684\u767b\u5f55\u5931\u8d25\u96c6\u5408\u3002\u5173\u952e\u52a8\u4f5c\u662f\u300e\u67e5\u670d\u52a1\u5668\u65e5\u5fd7\u62ff\u72b6\u6001\u53f7 \u2192 \u6821\u9a8c\u8ba4\u8bc1\u6a21\u5f0f\u4e0e\u767b\u5f55\u542f\u7528\u72b6\u6001 \u2192 \u4fee\u6b63\u9ed8\u8ba4\u5e93\u4e0e\u534f\u8bae\u300f\uff0c\u6309\u6b64\u987a\u5e8f\u57fa\u672c\u90fd\u80fd\u8fde\u901a\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u56f4\u7ed5 18456 \u9519\u8bef\u72b6\u6001\u7801\u9010\u6761\u89e3\u8bfb\uff0c\u8986\u76d6\u8ba4\u8bc1\u6a21\u5f0f\u3001\u767b\u5f55\u540d\u4e0e\u6743\u9650\u4fee\u590d\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kadence_starter_templates_imported_post":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-197","post","type-post","status-publish","format-standard","hentry","category-3"],"_links":{"self":[{"href":"https:\/\/pc.wuhanioe.com\/index.php\/wp-json\/wp\/v2\/posts\/197","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pc.wuhanioe.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pc.wuhanioe.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pc.wuhanioe.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pc.wuhanioe.com\/index.php\/wp-json\/wp\/v2\/comments?post=197"}],"version-history":[{"count":0,"href":"https:\/\/pc.wuhanioe.com\/index.php\/wp-json\/wp\/v2\/posts\/197\/revisions"}],"wp:attachment":[{"href":"https:\/\/pc.wuhanioe.com\/index.php\/wp-json\/wp\/v2\/media?parent=197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pc.wuhanioe.com\/index.php\/wp-json\/wp\/v2\/categories?post=197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pc.wuhanioe.com\/index.php\/wp-json\/wp\/v2\/tags?post=197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}