{"id":135221,"date":"2024-10-31T09:52:57","date_gmt":"2024-10-31T01:52:57","guid":{"rendered":"https:\/\/server.hk\/cnblog\/135221\/"},"modified":"2024-10-31T09:52:58","modified_gmt":"2024-10-31T01:52:58","slug":"sql-server-2005%e9%83%a8%e7%bd%b2%e6%95%b8%e6%93%9a%e8%88%87adventure-works-dw","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/135221\/","title":{"rendered":"SQL Server 2005\u90e8\u7f72\u6578\u64da\u8207Adventure Works DW"},"content":{"rendered":"<h1 id=\"sql-server-2005%e9%83%a8%e7%bd%b2%e6%95%b8%e6%93%9a%e8%88%87adventure-works-dw-cAqnlXBnBI\">SQL Server 2005\u90e8\u7f72\u6578\u64da\u8207Adventure Works DW<\/h1>\n<p>SQL Server 2005\u662f\u4e00\u6b3e\u529f\u80fd\u5f37\u5927\u7684\u95dc\u806f\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\uff0c\u5ee3\u6cdb\u61c9\u7528\u65bc\u4f01\u696d\u6578\u64da\u7ba1\u7406\u548c\u5206\u6790\u3002\u96a8\u8457\u6578\u64da\u91cf\u7684\u589e\u9577\uff0c\u4f01\u696d\u9700\u8981\u6709\u6548\u7684\u6578\u64da\u5009\u5eab\u89e3\u6c7a\u65b9\u6848\u4f86\u652f\u6301\u5546\u696d\u667a\u80fd\u548c\u6c7a\u7b56\u5236\u5b9a\u3002Adventure Works DW\u662f\u4e00\u500b\u793a\u7bc4\u6578\u64da\u5eab\uff0c\u5c08\u70ba\u5c55\u793aSQL Server\u7684\u6578\u64da\u5009\u5eab\u529f\u80fd\u800c\u8a2d\u8a08\u3002\u672c\u6587\u5c07\u63a2\u8a0e\u5982\u4f55\u5728SQL Server 2005\u4e2d\u90e8\u7f72Adventure Works DW\u6578\u64da\u5eab\uff0c\u4e26\u4ecb\u7d39\u5176\u4e3b\u8981\u7279\u6027\u548c\u61c9\u7528\u3002<\/p>\n<h2 id=\"adventure-works-dw%e6%a6%82%e8%bf%b0-cAqnlXBnBI\">Adventure Works DW\u6982\u8ff0<\/h2>\n<p>Adventure Works DW\u662f\u4e00\u500b\u865b\u69cb\u7684\u81ea\u884c\u8eca\u516c\u53f8\uff0c\u8a72\u6578\u64da\u5eab\u5305\u542b\u4e86\u8207\u92b7\u552e\u3001\u7522\u54c1\u3001\u5ba2\u6236\u548c\u5e02\u5834\u76f8\u95dc\u7684\u6578\u64da\u3002\u5b83\u7684\u8a2d\u8a08\u65e8\u5728\u5e6b\u52a9\u7528\u6236\u7406\u89e3\u6578\u64da\u5009\u5eab\u7684\u7d50\u69cb\u548c\u67e5\u8a62\u6027\u80fd\u3002Adventure Works DW\u7684\u6578\u64da\u6a21\u578b\u5305\u62ec\u7dad\u5ea6\u8868\u548c\u4e8b\u52d9\u8868\uff0c\u9019\u4e9b\u8868\u683c\u5171\u540c\u652f\u6301\u591a\u7dad\u6578\u64da\u5206\u6790\u3002<\/p>\n<h3 id=\"%e6%95%b8%e6%93%9a%e6%a8%a1%e5%9e%8b%e7%b5%90%e6%a7%8b-cAqnlXBnBI\">\u6578\u64da\u6a21\u578b\u7d50\u69cb<\/h3>\n<p>Adventure Works DW\u7684\u6578\u64da\u6a21\u578b\u4e3b\u8981\u7531\u4ee5\u4e0b\u5e7e\u500b\u90e8\u5206\u7d44\u6210\uff1a<\/p>\n<ul>\n<li><strong>\u7dad\u5ea6\u8868\uff1a<\/strong>\u9019\u4e9b\u8868\u683c\u5305\u542b\u4e86\u63cf\u8ff0\u6027\u4fe1\u606f\uff0c\u4f8b\u5982\u5ba2\u6236\u3001\u7522\u54c1\u3001\u6642\u9593\u548c\u5730\u7406\u4f4d\u7f6e\u7b49\u3002<\/li>\n<li><strong>\u4e8b\u52d9\u8868\uff1a<\/strong>\u9019\u4e9b\u8868\u683c\u8a18\u9304\u4e86\u5177\u9ad4\u7684\u696d\u52d9\u4e8b\u4ef6\uff0c\u4f8b\u5982\u92b7\u552e\u8a02\u55ae\u548c\u7522\u54c1\u9000\u8ca8\u3002<\/li>\n<li><strong>\u661f\u578b\u6a21\u5f0f\uff1a<\/strong>\u6578\u64da\u6a21\u578b\u901a\u5e38\u63a1\u7528\u661f\u578b\u6a21\u5f0f\uff0c\u9019\u4f7f\u5f97\u67e5\u8a62\u6027\u80fd\u66f4\u9ad8\uff0c\u4e26\u4e14\u6613\u65bc\u7406\u89e3\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%9c%a8sql-server-2005%e4%b8%ad%e9%83%a8%e7%bd%b2adventure-works-dw-cAqnlXBnBI\">\u5728SQL Server 2005\u4e2d\u90e8\u7f72Adventure Works DW<\/h2>\n<p>\u90e8\u7f72Adventure Works DW\u6578\u64da\u5eab\u7684\u904e\u7a0b\u76f8\u5c0d\u7c21\u55ae\uff0c\u4ee5\u4e0b\u662f\u5177\u9ad4\u6b65\u9a5f\uff1a<\/p>\n<h3 id=\"%e6%ad%a5%e9%a9%9f1%ef%bc%9a%e4%b8%8b%e8%bc%89adventure-works-dw%e6%95%b8%e6%93%9a%e5%ba%ab-cAqnlXBnBI\">\u6b65\u9a5f1\uff1a\u4e0b\u8f09Adventure Works DW\u6578\u64da\u5eab<\/h3>\n<p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u5f9eMicrosoft\u7684\u5b98\u65b9\u7db2\u7ad9\u4e0b\u8f09Adventure Works DW\u6578\u64da\u5eab\u7684\u5099\u4efd\u6587\u4ef6\u3002\u9019\u4e9b\u6587\u4ef6\u901a\u5e38\u4ee5.bak\u683c\u5f0f\u63d0\u4f9b\uff0c\u9069\u5408\u7528\u65bcSQL Server\u7684\u6062\u5fa9\u64cd\u4f5c\u3002<\/p>\n<h3 id=\"%e6%ad%a5%e9%a9%9f2%ef%bc%9a%e6%81%a2%e5%be%a9%e6%95%b8%e6%93%9a%e5%ba%ab-cAqnlXBnBI\">\u6b65\u9a5f2\uff1a\u6062\u5fa9\u6578\u64da\u5eab<\/h3>\n<p>\u5728SQL Server Management Studio (SSMS)\u4e2d\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6b65\u9a5f\u4f86\u6062\u5fa9\u6578\u64da\u5eab\uff1a<\/p>\n<pre><code>RESTORE DATABASE AdventureWorksDW\nFROM DISK = 'C:pathtoyourAdventureWorksDW.bak'\nWITH MOVE 'AdventureWorksDW_Data' TO 'C:pathtoyourAdventureWorksDW.mdf',\nMOVE 'AdventureWorksDW_Log' TO 'C:pathtoyourAdventureWorksDW.ldf';<\/code><\/pre>\n<p>\u78ba\u4fdd\u5c07\u8def\u5f91\u66ff\u63db\u70ba\u60a8\u5be6\u969b\u7684\u6587\u4ef6\u8def\u5f91\u3002<\/p>\n<h3 id=\"%e6%ad%a5%e9%a9%9f3%ef%bc%9a%e9%a9%97%e8%ad%89%e6%95%b8%e6%93%9a%e5%ba%ab-cAqnlXBnBI\">\u6b65\u9a5f3\uff1a\u9a57\u8b49\u6578\u64da\u5eab<\/h3>\n<p>\u6062\u5fa9\u5b8c\u6210\u5f8c\uff0c\u60a8\u53ef\u4ee5\u5728SSMS\u4e2d\u67e5\u770bAdventure Works DW\u6578\u64da\u5eab\uff0c\u4e26\u6aa2\u67e5\u5176\u8868\u683c\u548c\u6578\u64da\u662f\u5426\u6b63\u78ba\u3002\u60a8\u53ef\u4ee5\u904b\u884c\u4e00\u4e9b\u57fa\u672c\u67e5\u8a62\u4f86\u9a57\u8b49\u6578\u64da\u7684\u5b8c\u6574\u6027\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre><code>SELECT TOP 10 * FROM DimCustomer;<\/code><\/pre>\n<h2 id=\"adventure-works-dw%e7%9a%84%e6%87%89%e7%94%a8-cAqnlXBnBI\">Adventure Works DW\u7684\u61c9\u7528<\/h2>\n<p>Adventure Works DW\u6578\u64da\u5eab\u53ef\u4ee5\u7528\u65bc\u591a\u7a2e\u5546\u696d\u667a\u80fd\u61c9\u7528\uff0c\u5305\u62ec\uff1a<\/p>\n<ul>\n<li><strong>\u6578\u64da\u5206\u6790\uff1a<\/strong>\u7528\u6236\u53ef\u4ee5\u4f7f\u7528SQL\u67e5\u8a62\u4f86\u5206\u6790\u92b7\u552e\u8da8\u52e2\u3001\u5ba2\u6236\u884c\u70ba\u7b49\u3002<\/li>\n<li><strong>\u5831\u544a\u751f\u6210\uff1a<\/strong>\u901a\u904e\u5831\u544a\u5de5\u5177\uff08\u5982SQL Server Reporting Services\uff09\uff0c\u7528\u6236\u53ef\u4ee5\u751f\u6210\u5404\u7a2e\u696d\u52d9\u5831\u544a\u3002<\/li>\n<li><strong>\u6578\u64da\u6316\u6398\uff1a<\/strong>\u7528\u6236\u53ef\u4ee5\u5229\u7528\u6578\u64da\u6316\u6398\u6280\u8853\u4f86\u9810\u6e2c\u672a\u4f86\u7684\u92b7\u552e\u548c\u5e02\u5834\u8da8\u52e2\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-cAqnlXBnBI\">\u7e3d\u7d50<\/h2>\n<p>SQL Server 2005\u8207Adventure Works DW\u7684\u7d50\u5408\u70ba\u4f01\u696d\u63d0\u4f9b\u4e86\u4e00\u500b\u5f37\u5927\u7684\u6578\u64da\u5206\u6790\u5e73\u53f0\u3002\u901a\u904e\u6709\u6548\u7684\u6578\u64da\u90e8\u7f72\u548c\u7ba1\u7406\uff0c\u4f01\u696d\u80fd\u5920\u5f9e\u6578\u64da\u4e2d\u63d0\u53d6\u6709\u50f9\u503c\u7684\u898b\u89e3\uff0c\u652f\u6301\u6c7a\u7b56\u5236\u5b9a\u3002\u5982\u679c\u60a8\u6b63\u5728\u5c0b\u627e\u9ad8\u6548\u7684\u6578\u64da\u7ba1\u7406\u89e3\u6c7a\u65b9\u6848\uff0c\u8003\u616e\u4f7f\u7528<a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a>\u4f86\u90e8\u7f72\u60a8\u7684SQL Server\u74b0\u5883\uff0c\u9019\u5c07\u70ba\u60a8\u7684\u696d\u52d9\u63d0\u4f9b\u7a69\u5b9a\u548c\u9748\u6d3b\u7684\u652f\u6301\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u63a2\u7d22\u5982\u4f55\u5728SQL Server 2005\u4e2d\u90e8\u7f72\u6578\u64da\uff0c\u4e26\u4f7f\u7528Adventure Works DW\u9032\u884c\u6578\u64da\u5206\u6790\u548c\u5831\u544a\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-135221","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/135221","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=135221"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/135221\/revisions"}],"predecessor-version":[{"id":135222,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/135221\/revisions\/135222"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=135221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=135221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=135221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}