跳转到内容

SQL Server Express

本页使用了标题或全文手工转换
维基百科,自由的百科全书

这是本页的一个历史版本,由Tomchiukc留言 | 贡献2019年7月9日 (二) 01:50 外部連結:​ SSMS)编辑。这可能和当前版本存在着巨大的差异。

Microsoft SQL Server Express
在一台Windows Server 2019VM上安裝SQL Server 2017 Express的畫面縮圖。
在一台Windows Server 2019VM上安裝SQL Server 2017 Express的畫面縮圖。
開發者微软
当前版本SQL Server 2017 Express(2017年11月6日,​7年前​(2017-11-06
编程语言C语言C++
操作系统Microsoft WindowsLinux
平台IA-32IA-64
> 512 MB RAM
.NET Framework 4.0英语.NET Framework 4.0[1]
语言英文、中文、法文、德文、意大利文、日文、韓文、巴西葡文、俄文及西班牙文
类型关系数据库管理系統
许可协议专有软件[2]
网站www.microsoft.com/en-us/sql-server/sql-server-editions-express

Microsoft SQL Server Express微软公司所開發的关系数据库產品SQL Server的免費下載版本,可自由下載、分發(需經註冊)及使用。這個版本的設計是專門為嵌入式系统或較小型的程式而設計。本產品可遡源至過往隨同SQL Server 2000軟件分發的Microsoft Database Engine (MSDE),用以讓程式開發者在其測試其程式時建立一個系統需求較低的測試環境。自SQL Server 2005開始,本產品改用現時的名稱。

它繼承了多數的SQL Server功能與特性,像是Transact-SQLSQL CLR等,相當適合使用在小型的網站,或者是小型的桌面型應用程式,它也可以和 SQL Server 整合,作為資料庫複製英语Replication_(computing)#DATABASE(Replication)的訂閱端。

功能与限制

SQL Server Express提供了付費的完整版本的多項功能[3],然而其技術限制使之無法適用於大規模的部署。這兩個版本的差異在於:

  • 資料庫的大小限制:对SQL Server 2008 R2 Express、SQL Server 2012 Express、SQL Server 2014 Express、SQL Server 2016 Express单个資料庫的大小限制最大為 10 GB[4];而在較早期的SQL Server 2005 Express 和SQL Server 2008 Express 上,单个資料庫的大小限制最大為4 GB。即使如此,亦已比最初MSDE版本的2 GB要多。而且這個大小的限制只有在資料檔案上,交易記錄檔則不受此限。
  • 沒有 SQL Agent服务[5][6]:若要做排程服務必須自己寫程式。
  • 硬體方面的人為限制:
    • 允許在多核心的電腦上使用,但只會使用一個CPU核心來運算[7]。這在具有多核心CPU的電腦上會造成浪費。MSDE 最高可以支援二顆 CPU核心。
    • 可使用的記憶體量最高只有 1GB。而全功能标准版至少使用4GB内存。

MSDE有一个并发工作负债监控器并限制在少量用户并发访问,SQL Server Express没有这个并发限制[8]

SQL Server Express包括了几个数据库管理的图形用户界面工具:

MSDE 沒有管理介面

SQL Server Express不包括全功能标准版的几个工具:

SQL Server Express的各版本是可以远程连接的,但需要用户做一定的配置。

過往版本

Microsoft SQL Server Express Version History
版本號碼 發行日期 主流支援完結日期 延伸支援完結日期 支援作業系統
SQL Server 2005 Express Edition 2005-11-07[10] 2011-04-12[11] 2016-04-12[11] Windows 2000 Service Pack 4, Windows XP Service Pack 2, Windows Server 2003 Service Pack, Windows 7 Service Pack 1 (only SQL Server 2005 Express Edition SP4)[12]
SQL Server 2008 Express 2009-02-08[13] 2014-07-08[14] 2019-07-09[14] Windows XP Service Pack 2, Windows XP Service Pack 3, Windows Vista, Windows Vista Service Pack 1, Windows Server 2003 Service Pack 2, Windows Server 2008[15]
SQL Server 2008 R2 Express 2010-04-16[16] 2014-07-08[17] 2019-07-09[17] Windows XP, Windows Vista, Windows 7, Windows 8, Windows Server 2003, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2[18]
SQL Server 2012 Express 2012-05-14[19] 2017-07-11[20] 2022-07-12[20] Windows Vista Service Pack 2, Windows 7, Windows 7 Service Pack 1, Windows 8, Windows 8.1, Windows Server 2008,[21] Windows Server 2008 R2, Windows Server 2008 R2 SP1, Windows Server 2012, Windows Server 2012 R2[22]
SQL Server 2014 Express 2014-04-01[23] 2019-07-09[24] 2024-07-09[24] Windows 7 Service Pack 1, Windows 8, Windows 8.1, Windows 10, Windows Server 2008 SP2,[25] Windows Server 2008 R2 SP1, Windows Server 2012, Windows Server 2012 R2[26]
SQL Server 2016 Express 2016-06-01[27] 2021-07-13[28] 2026-07-14[28] Windows 8, Windows 8.1, Windows 10, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016
SQL Server 2017 Express 2017-09-29[29] 2022-10-11[30] 2027-10-12[30] Windows 8, Windows 8.1, Windows 10, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016*,
Red Hat Enterprise Linux 7.3 or 7.4, SUSE Enterprise Linux Server v12 SP2, Ubuntu 16.04LTS,
Docker Engine 1.8+ (on Windows, Mac, or Linux)
  • 並不包括 Windows Server 2016 "Essentials" Edition

安裝版本

至於在SQL Server Express 2017,這個產品的下載有三款安裝版本:

  • 標準的SQL Server Express 2017
  • 高級版本(with Advanced Services):包括有Reporting services及全文檢索(在舊版本均包括在標準安裝版本內)
  • 連同LocalDB:比標準版本更輕便的數據庫。

資料庫管理工具

  • Navicat for SQL Server 是一套付費軟體,專為 Microsoft SQL Server 設計的強大資料庫管理及開發工具。它可以用於任何版本的 SQL Server 資料庫(包括SQL Server Express[31]),並支援大部份 SQL Server 的功能,包括觸發器、索引、檢視等。

工具

  • SQL Server Management Studio Express,可用來管理 SQL Server Express 實體。
  • SQL Server Reporting Service Express,簡易版的 SQL Server Reporting Service。
  • SQL Server Configuration Manager,可用來管理 SQL Server Express 的連線組態與服務。
  • Business Intelligence Development Studio Express,可用來開發 Reporting Service Express 的報表。

编程接口

以ADO.Net为例:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace Connection
{
    class Program
    {
        static void Main(string[] args)
        {
            //构造连接字符串
            SqlConnectionStringBuilder connStr = new SqlConnectionStringBuilder();
            connStr.DataSource = @".\SQLEXPRESS";
            connStr.InitialCatalog = "master";
            connStr.IntegratedSecurity = true;

            SqlConnection conn = new SqlConnection();//创建连接对象
            conn.ConnectionString = connStr.ConnectionString;//设置连接字符串

            conn.Open();//打开连接

            if(conn.State == ConnectionState.Open)
            {
                Console.WriteLine("Database is linked.");
                Console.WriteLine("\nDataSource:{0}",conn.DataSource);
                Console.WriteLine("Database:{0}",conn.Database);
                Console.WriteLine("ConnectionTimeOut:{0}",conn.ConnectionTimeout);
            }

            conn.Close();//关闭连接
            conn.Dispose();//释放资源

            if(conn.State == ConnectionState.Closed)
            {
                Console.WriteLine("\nDatabase is closed.");
            }

            Console.Read();
        }
    }
}

參考資料

  1. ^ Hardware and Software Requirements for Installing SQL Server 2014 - SQL Server | Microsoft Docs. Msdn.microsoft.com. [2019-04-03]. 
  2. ^ About the SQL Server License Terms - SQL Server | Microsoft Docs. Msdn.microsoft.com. 2017-05-24 [2019-04-03]. 
  3. ^ Disable SQL Server VSS Writer service (英语). 
  4. ^ Features Supported by the Editions of SQL Server 2008 R2. [2010-06-22]. 
  5. ^ Compare Edition Features. 
  6. ^ SQL Server Express with Advanced Services Features. Microsoft. [28 March 2012]. 
  7. ^ How SQL Server 2005 Express Edition determines the CPU count and uses the CPUs during processing. MSDN. November 2008 [2008-11-25]. 
  8. ^ The SQL Server 2000 Workload Governor. MSDN. 2004-01 [2007-01-15] (英语). 
  9. ^ Download Microsoft® SQL Server® 2012 Service Pack 1 (SP1) Express from Official Microsoft Download Center. Microsoft.com. 2012-11-09 [2019-04-03]. 
  10. ^ Download Microsoft SQL Server 2005 Express Edition from Official Microsoft Download Center. [26 December 2012]. 
  11. ^ 11.0 11.1 Microsoft Support Lifecycle (SQL Server 2005). [26 December 2012]. 
  12. ^ Microsoft SQL Server 2005 Express Edition. Microsoft Download Center. [2017-04-07]. 
  13. ^ Download Microsoft SQL Server 2008 Express from Official Microsoft Download Center. [26 December 2012]. 
  14. ^ 14.0 14.1 Microsoft Support Lifecycle (SQL Server 2008). [26 December 2012]. 
  15. ^ Download Microsoft® SQL Server® 2008 Express from Official Microsoft Download Center. Microsoft.com. 2009-02-08 [2019-04-03]. 
  16. ^ Download Microsoft SQL Server 2008 R2 - Express from Official Microsoft Download Center. [26 December 2012]. 
  17. ^ 17.0 17.1 Microsoft Support Lifecycle (SQL Server 2008 R2). [26 December 2012]. 
  18. ^ Hardware and Software Requirements for Installing SQL Server 2008 R2. msdn.microsoft.com. [2017-10-16] (英语). 
  19. ^ Download Microsoft® SQL Server® 2012 Express from Official Microsoft Download Center. [26 December 2012]. 
  20. ^ 20.0 20.1 Microsoft Support Lifecycle (SQL Server 2012). [26 December 2012]. 
  21. ^ Hardware and Software Requirements for Installing SQL Server 2012. [6 June 2017]. 
  22. ^ Microsoft® SQL Server® 2012 SP2 Express. Microsoft Download Center. [2017-04-07]. 
  23. ^ Download Microsoft SQL Server 2014 Express. [11 April 2014]. 
  24. ^ 24.0 24.1 Microsoft Support Lifecycle (SQL Server 2014). [11 April 2014]. 
  25. ^ Hardware and Software Requirements for Installing SQL Server 2014. [30 June 2017]. 
  26. ^ Microsoft® SQL Server® 2014 Express. Microsoft Download Center. [2017-04-08]. 
  27. ^ Download Microsoft SQL Server 2016 Express. 
  28. ^ 28.0 28.1 Microsoft Support Lifecycle (SQL Server 2016). 
  29. ^ Download Microsoft SQL Server 2017 Express. 
  30. ^ 30.0 30.1 Microsoft Support Lifecycle (SQL Server 2017). 
  31. ^ Navicat Premium for OSX + SQL Server Express. Navicat Community. 2014-01-08 [2019-07-09] (英语). 

參看

外部連結