วันอังคารที่ ๑๘ กันยายน พ.ศ. ๒๕๕๐

Northwind อยู่ไหน (Where is northwind in SQL Server 2005?)

สำหรับคนที่ใช้ผลิตภัณฑ์ฐานข้อมูลของไมโครซอฟต์ ไม่ว่าจะเป็น MS Access, SQL Server 7.0, 2000 คงคุ้นเคยกับฐานข้อมูลตัวอย่างที่มีมาให้ในชื่อ Northwind และ แต่สำหรับ SQL Server 2005 กลับหายไป ผมเพิ่งสังเกตตอนจะใช้ทดสอบโปรแกรม พอหาข้อมูลก็รู้ว่า ทางไมโครซอฟต์เก็บไว้ในลิ้นชักไปแล้วครับ เพราะว่าไม่ใช่ตัวอย่างที่ดีพอในการ implement ตัว analysis services หรือ reporting services (แต่ในรุ่น SQL Server Compact Edition ยังใช้ northwind อยู่ครับ) แต่ก็พอหาโหลด northwind ได้ที่ Northwind and pubs Sample Databases for SQL Server 2000 แต่กระนั้นทางไมโครซอฟต์ก็แนะนำว่าถ้าใช้ SQL Server 2005 ก็ใช้ฐานข้อมูลตัวอย่างตัวใหม่ดีกว่า ในชื่อ AdventureWorks ซึ่งไปเก็บไว้ใน codeplex ตามไป download ได้ที่ Microsoft SQL Server Samples and Community Projects ในโครงการนี้ยังพบตัวอย่างอีกหลายๆ script หรือข้อมูลที่ใช้กับ Analysis Services, Integration Services (DTS), Reporting Services, Transact SQL Scripts, XML etc. ถ้าขี้เกียจอ่านอะไรมากมายก็มาลิ้งนี้เลยดีกว่าครับ Sample Databases for Microsoft SQL Server 2005 SP2 licensed with the MS-PL license.

ปล. การใช้ northwind ใน SQL Server 2005 ต้องเซต properties ฐานข้อมูลให้ใช้ 90 compatibility level ก่อนนะครับ หรือลองอ่านเพิ่มเติมที่ NorthWind Database for SQL Server 2005 and installation method

แหล่งข้อมูลเพิ่มเติม :
Download details: SQL Server 2005 Compact Edition Developer SDK
Where is the Northwind SQL scripts for SQL server 2005
Sample Databases in SQL Server 2005 - Jeff Atwood blog
SQL SERVER - 2005 NorthWind Database or AdventureWorks Database - Samples Databases - Pinal Dave

Related Post