功能比較:Azure SQL Database 與 SQL ServerFeature comparison: Azure SQL Database versus SQL Server

Azure SQL Database 與 SQL Server 共用通用的程式碼基底。Azure SQL Database shares a common code base with SQL Server. Azure SQL Database 所支援的 SQL Server 功能取決於您所建立的 Azure SQL 資料庫類型。The features of SQL Server supported by Azure SQL Database depend on the type of Azure SQL database that you create. 使用 Azure SQL Database 時,您可以將資料庫建立為受控執行個體的一部分、作為單一資料庫,或為彈性集區的一部分。With Azure SQL Database, you can create a database as part of a managed instance, as a single database, or as part of an elastic pool.

Microsoft 會持續為 Azure SQL Database 新增功能。Microsoft continues to add features to Azure SQL Database. 請使用下列篩選來瀏覽 Azure 的「服務更新」網頁,以尋找最新更新:Visit the Service Updates webpage for Azure for the newest updates using these filters:

Azure SQL Database 中支援的 SQL Server 功能SQL Server feature support in Azure SQL Database

下表列出 SQL Server 的主要功能,並提供有關該功能是部分支援還是完整支援功能的資訊,以及該功能的相關詳細資訊連結。The following table lists the major features of SQL Server and provides information about whether the feature is partially or fully supported and a link to more information about the feature.

SQL 功能SQL Feature 支援單一資料庫和彈性集區Supported by single databases and elastic pools 支援的受管理的執行個體Supported by managed instances
主動式異地複寫Active geo-replication 所有服務層以外的超大規模的是-Yes - all service tiers other than hyperscale 否,請參閱自動容錯移轉 groups(preview)替代No, see Auto-failover groups(preview) as an alternative
自動容錯移轉群組Auto-failover groups 所有服務層以外的超大規模的是-Yes - all service tiers other than hyperscale 是,現已在公開預覽版中推出Yes, in public preview
一律加密Always Encrypted 是 - 請參閱憑證存放區金鑰保存庫Yes - see Cert store and Key vault 是 - 請參閱憑證存放區金鑰保存庫Yes - see Cert store and Key vault
Always On 可用性群組Always On Availability Groups 每個資料庫皆隨附高可用性High availability is included with every database. Azure SQL Database 的業務連續性概觀會討論災害復原Disaster recovery is discussed in Overview of business continuity with Azure SQL Database 高可用性隨附的每個資料庫和不能由使用者管理High availability is included with every database and cannot be managed by user. Azure SQL Database 的業務連續性概觀會討論災害復原Disaster recovery is discussed in Overview of business continuity with Azure SQL Database
連結資料庫Attach a database No No
應用程式角色Application roles Yes Yes
稽核Auditing Yes [是],某些差異Yes, with some differences
自動備份Automatic backups 是。Yes. 完整備份會每隔 7 天、 差異的 12 小時,,和記錄備份每隔 5-10 分鐘。Full backups are taken every 7 days, differential 12 hours, and log backups every 5-10 min. 是。Yes. 完整備份會每隔 7 天、 差異的 12 小時,,和記錄備份每隔 5-10 分鐘。Full backups are taken every 7 days, differential 12 hours, and log backups every 5-10 min.
自動調整 (計劃強制) (機器翻譯)Automatic tuning (plan forcing) Yes Yes
自動調整 (索引) (機器翻譯)Automatic tuning (indexes) Yes No
Azure Data StudioAzure Data Studio Yes Yes
BACPAC 檔案 (匯出)BACPAC file (export) 是 - 請參閱 SQL Database 匯出Yes - see SQL Database export 是 - 請參閱 SQL Database 匯出Yes - see SQL Database export
BACPAC 檔案 (匯入)BACPAC file (import) 是 - 請參閱 SQL Database 匯入Yes - see SQL Database import 是 - 請參閱 SQL Database 匯入Yes - see SQL Database import
備份命令BACKUP command 否,僅限系統起始的自動備份 - 請參閱自動備份No, only system-initiated automatic backups - see Automated backups 是,使用者起始的只複製備份到 Azure Blob 儲存體 (由使用者無法起始自動系統備份)-請參閱備份差異Yes, user initiated copy-only backups to Azure Blob Storage (automatic system backups cannot be initiated by user) - see Backup differences
內建函式Built-in functions 大部分 - 請參閱個別函式Most - see individual functions 是 - 請參閱預存程序、函式、觸發程序差異Yes - see Stored procedures, functions, triggers differences
BULK INSERT 陳述式BULK INSERT statement 是的而只是從 Azure Blob 儲存體,做為來源。Yes, but just from Azure Blob storage as a source. 是,但只會從 Azure Blob 儲存體,做為來源-請參閱差異Yes, but just from Azure Blob Storage as a source - see differences.
憑證和非對稱金鑰Certificates and asymmetric keys 是的而不需要存取檔案系統BACKUPCREATE作業。Yes, without access to file system for BACKUP and CREATE operations. 是的而不需要存取檔案系統BACKUPCREATE作業-請參閱憑證差異Yes, without access to file system for BACKUP and CREATE operations - see certificate differences.
變更資料擷取Change data capture No Yes
變更追蹤Change tracking Yes Yes
定序 - 資料庫Collation - database Yes Yes
定序 - 伺服器/執行個體Collation - server/instance 否,預設值的邏輯伺服器定序SQL_Latin1_General_CP1_CI_AS一律會使用。No, default logical server collation SQL_Latin1_General_CP1_CI_AS is always used. 是,可以設定的時機會建立執行個體,而且無法在稍後更新。Yes, can be set when the instance is created and cannot be updated later.
資料行存放區索引Columnstore indexes 是 - 進階層、標準層 - S3 以上、一般用途層和業務關鍵層Yes - Premium tier, Standard tier - S3 and above, General Purpose tier, and Business Critical tiers Yes
通用語言執行平台 (CLR)Common language runtime (CLR) No 是的但沒有在檔案系統的存取權CREATE ASSEMBLY陳述式-請參閱CLR 差異Yes, but without access to file system in CREATE ASSEMBLY statement - see CLR differences
自主資料庫Contained databases Yes 目前沒有由於瑕疵中包括時間點還原還原Currently no due to defect in RESTORE including point-in-time RESTORE. 這是將推出修正缺失。This is a defect that will be fixed soon.
自主使用者Contained users Yes Yes
控制流程語言關鍵字Control of flow language keywords Yes Yes
認證Credentials 是的但只有資料庫範圍認證Yes, but only database scoped credentials. 是的但只有Azure Key VaultSHARED ACCESS SIGNATURE支援請參閱詳細資料Yes, but only Azure Key Vault and SHARED ACCESS SIGNATURE are supported see details
跨資料庫查詢Cross-database queries 否 - 請參閱彈性查詢No - see Elastic queries 是,再加上彈性查詢Yes, plus Elastic queries
跨資料庫交易Cross-database transactions No 是,在執行個體。Yes, within the instance. 請參閱連結伺服器的差異跨執行個體查詢。See Linked server differences for cross-instance queries.
資料指標Cursors Yes Yes
資料壓縮Data compression Yes Yes
Database MailDatabase mail No Yes
資料移轉服務 (DMS)Data Migration Service (DMS) Yes Yes
資料庫鏡像Database mirroring No No
資料庫組態設定Database configuration settings Yes Yes
Data Quality Services (DQS)Data Quality Services (DQS) No No
資料庫快照集Database snapshots No No
資料類型Data types Yes Yes
DBCC 陳述式DBCC statements 大部分 - 請參閱個別陳述式Most - see individual statements 是 - 請參閱 DBCC 差異Yes - see DBCC differences
DDL 陳述式DDL statements 大部分 - 請參閱個別陳述式Most - see individual statements 是 - 請參閱 T-SQL 差異Yes - see T-SQL differences
DDL 觸發程序DDL triggers 僅限資料庫Database only Yes
分散式分割區檢視Distributed partition views No Yes
分散式交易 - MS DTCDistributed transactions - MS DTC 否 - 請參閱彈性交易No - see Elastic transactions 否-請參閱連結伺服器的差異No - see Linked server differences
DML 陳述式DML statements Yes Yes
DML 觸發程序DML triggers 大部分 - 請參閱個別陳述式Most - see individual statements Yes
DMVDMVs 大部分 - 請參閱個別 DMVMost - see individual DMVs 是 - 請參閱 T-SQL 差異Yes - see T-SQL differences
動態資料遮罩Dynamic data masking Yes Yes
彈性集區Elastic pools Yes 內建 - 單一「受控執行個體」可以有共用相同資源集區的多個資料庫Built-in - a single Managed Instance can have multiple databases that share the same pool of resources
事件通知Event notifications 否 - 請參閱警示No - see Alerts No
運算式Expressions Yes Yes
擴充事件Extended events 部分請參閱 SQL Database 中的擴充事件Some - see Extended events in SQL Database 是 - 請參閱擴充事件差異Yes - see Extended events differences
擴充預存程序Extended stored procedures No No
檔案和檔案群組Files and file groups 僅限主要檔案群組Primary file group only 是。Yes. 檔案路徑會自動指派,而且無法指定檔案位置ALTER DATABASE ADD FILE陳述式File paths are automatically assigned and the file location cannot be specified in ALTER DATABASE ADD FILE statement.
FilestreamFilestream No No
全文檢索搜尋Full-text search 不支援 [是],但協力廠商斷詞工具Yes, but third-party word breakers are not supported 是的但不支援協力廠商斷詞工具Yes, but third-party word breakers are not supported
函式Functions 大部分 - 請參閱個別函式Most - see individual functions 是 - 請參閱預存程序、函式、觸發程序差異Yes - see Stored procedures, functions, triggers differences
異地還原Geo-restore 所有服務層以外的超大規模的是-Yes - all service tiers other than hyperscale 是-使用Azure PowerShellYes - using Azure PowerShell.
圖表處理Graph processing Yes Yes
記憶體內部最佳化In-memory optimization 是 - 僅限進階和業務關鍵層Yes - Premium and Business Critical tiers only 是 - 僅限業務關鍵層Yes - Business Critical tier only
JSON 資料支援JSON data support Yes Yes
語言元素Language elements 大部分 - 請參閱個別元素Most - see individual elements 是 - 請參閱 T-SQL 差異Yes - see T-SQL differences
連結的伺服器Linked servers 否 - 請參閱彈性查詢No - see Elastic query SQL Server 和 SQL DatabaseOnly to SQL Server and SQL Database
記錄傳送Log shipping 每個資料庫皆隨附高可用性High availability is included with every database. Azure SQL Database 的業務連續性概觀會討論災害復原Disaster recovery is discussed in Overview of business continuity with Azure SQL Database 原生內建式 DMS 遷移程序的一部分。Natively built-in as a part of DMS migration process. 高可用性隨附的每個資料庫,因此不建議使用 HA 替代記錄傳送。High availability is included with every database and it is not recommended to use Log-shipping as HA alternative. Azure SQL Database 的業務連續性概觀會討論災害復原Disaster recovery is discussed in Overview of business continuity with Azure SQL Database
登入和使用者Logins and users 是的但CREATEALTERlogin 陳述式不會提供所有選項 (沒有 Windows 和伺服器層級的 Azure Active Directory 登入)。Yes, but CREATE and ALTER login statements do not offer all the options (no Windows and server-level Azure Active Directory logins). EXECUTE AS LOGIN 不是支援-使用EXECUTE AS USER改。EXECUTE AS LOGIN is not supported - use EXECUTE AS USER instead. 是,使用一些差異Yes, with some differences. 不支援 Windows 登入,他們應該取代成 Azure Active Directory 登入。Windows logins are not supported and they should be replaced with Azure Active Directory logins.
長期備份保留期-LTRLong-term backup retention - LTR 是,將會自動採用的備份,保留 10 年。Yes, keep automatically taken backups up to 10 years. 尚未提供。Not yet. 使用COPY_ONLY手動備份暫時的解決方法。Use COPY_ONLY manual backups as a temporary workaround.
Master Data Services (MDS)Master Data Services (MDS) No No
最低記錄大量匯入Minimal logging in bulk import No No
修改系統資料Modifying system data No Yes
OLE AutomationOLE Automation No No
線上索引作業Online index operations Yes Yes
OPENDATASOURCEOPENDATASOURCE No [是],至其他 Azure SQL Database 和 SQL Server。Yes, only to other Azure SQL Databases and SQL Servers. 請參閱T-SQL 差異See T-SQL differences
OPENJSONOPENJSON Yes Yes
OPENQUERYOPENQUERY No [是],至其他 Azure SQL Database 和 SQL Server。Yes, only to other Azure SQL Databases and SQL Servers. 請參閱T-SQL 差異See T-SQL differences
OPENROWSETOPENROWSET 是的才能從 Azure Blob 儲存體匯入。Yes, only to import from Azure Blob storage. 是,只有其他的 Azure SQL Database 和 SQL Server,並從 Azure Blob 儲存體匯入。Yes, only to other Azure SQL Databases and SQL Servers, and to import from Azure Blob storage. 請參閱T-SQL 差異See T-SQL differences
OPENXMLOPENXML Yes Yes
運算子Operators 大部分 - 請參閱個別運算子Most - see individual operators 是 - 請參閱 T-SQL 差異Yes - see T-SQL differences
分割Partitioning Yes Yes
公用 IP 位址Public IP address 是。Yes. 您可以使用防火牆或服務的端點限制存取。The access can be restricted using firewall or service endpoints. 是。Yes. 必須是明確地啟用和連接埠 3342 必須啟用 NSG 規則。Needs to be explicitly enabled and port 3342 must be enabled in NSG rules. 如有需要可以停用公用 IP。Public IP can be disabled if needed. 請參閱公用端點如需詳細資訊。See Public endpoint for more details.
資料庫還原時間點Point in time database restore 是-請參閱超大規模-以外的所有服務層SQL Database 復原Yes - all service tiers other than hyperscale - see SQL Database recovery 是 - 請參閱 SQL Database 復原Yes - see SQL Database recovery
PolybasePolybase No No
原則式管理Policy-based management No No
述詞Predicates Yes Yes
查詢通知Query Notifications No Yes
查詢效能深入解析Query Performance Insights Yes No
R 服務R Services 是,現已在公開預覽版中推出Yes, in public preview No
資源管理員Resource governor No Yes
RESTORE 陳述式RESTORE statements No 是,使用強制FROM URL放在 Azure Blob 儲存體的備份檔案的選項。Yes, with mandatory FROM URL options for the backups files placed on Azure Blob Storage. 請參閱還原差異See Restore differences
從備份還原資料庫Restore database from backup 僅限從自動備份 - 請參閱SQL Database 復原From automated backups only - see SQL Database recovery 從自動備份-請參閱SQL Database 復原並從完整備份放在 Azure Blob 儲存體-請參閱備份差異From automated backups - see SQL Database recovery and from full backups placed on Azure Blob Storage - see Backup differences
資料列層級安全性Row Level Security Yes Yes
語意搜尋Semantic search No No
序號Sequence numbers Yes Yes
Service BrokerService Broker No 是的但只在執行個體。Yes, but only within the instance. 請參閱Service Broker 差異See Service Broker differences
伺服器組態設定Server configuration settings No 是 - 請參閱 T-SQL 差異Yes - see T-SQL differences
SET 陳述式Set statements 大部分 - 請參閱個別陳述式Most - see individual statements 是 - 請參閱 T-SQL 差異Yes - see T-SQL differences
SMO (機器翻譯)SMO Yes 版本 150Yes version 150
空間Spatial Yes Yes
SQL AnalyticsSQL Analytics Yes Yes
SQL 資料同步SQL Data Sync Yes No
SQL Server 代理程式SQL Server Agent 否 - 請參閱彈性工作No - see Elastic jobs 是 - 請參閱 SQL Server Agent 差異Yes - see SQL Server Agent differences
SQL Server Analysis Services (SSAS)SQL Server Analysis Services (SSAS) 不對Azure Analysis Services是個別的 Azure 雲端服務。No, Azure Analysis Services is a separate Azure cloud service. 不對Azure Analysis Services是個別的 Azure 雲端服務。No, Azure Analysis Services is a separate Azure cloud service.
SQL Server 稽核SQL Server Auditing 否 - 請參閱 SQL Database 稽核No - see SQL Database auditing 是 - 請參閱稽核差異Yes - see Auditing differences
SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT) Yes Yes
SQL Server Integration Services (SSIS)SQL Server Integration Services (SSIS) 是,使用 Azure Data Factory (ADF) 環境中的受控 SSIS,其中的套件會儲存於 Azure SQL Database 所裝載的 SSISDB 中,並於 Azure SSIS Integration Runtime (IR) 上執行,請參閱在 ADF 中建立 Azure-SSIS IRYes, with a managed SSIS in Azure Data Factory (ADF) environment, where packages are stored in SSISDB hosted by Azure SQL Database and executed on Azure SSIS Integration Runtime (IR), see Create Azure-SSIS IR in ADF.

若要比較 SQL Database 伺服器與受控執行個體中的 SSIS 功能,請參閱比較 Azure SQL Database 單一資料庫/彈性集區與受控執行個體To compare the SSIS features in SQL Database server and Managed Instance, see Compare Azure SQL Database single databases/elastic pools and Managed Instance.
是,使用 Azure Data Factory (ADF) 環境中的受控 SSIS,其中的套件會儲存於受控執行個體所裝載的 SSISDB 中,並於 Azure SSIS Integration Runtime (IR) 上執行,請參閱在 ADF 中建立 Azure-SSIS IRYes, with a managed SSIS in Azure Data Factory (ADF) environment, where packages are stored in SSISDB hosted by Managed Instance and executed on Azure SSIS Integration Runtime (IR), see Create Azure-SSIS IR in ADF.

若要比較 SQL Database 與受控執行個體中的 SSIS 功能,請參閱比較 Azure SQL Database 單一資料庫/彈性集區與受控執行個體To compare the SSIS features in SQL Database and Managed Instance, see Compare Azure SQL Database single databases/elastic pools and Managed Instance.
SQL Server Management Studio (SSMS)SQL Server Management Studio (SSMS) Yes 18.0 和更高版本Yes version 18.0 and higher
SQL Server PowerShellSQL Server PowerShell Yes Yes
SQL Server ProfilerSQL Server Profiler 否 - 請參閱擴充事件No - see Extended events Yes
SQL Server 複寫SQL Server Replication 僅限交易和快照複寫訂閱者Transactional and snapshot replication subscriber only 是,現已在公開預覽版中推出Yes, in public preview
SQL Server Reporting Services (SSRS)SQL Server Reporting Services (SSRS) 否 - 請參閱 Power BINo - see Power BI 否 - 請參閱 Power BINo - see Power BI
預存程序Stored procedures Yes Yes
系統預存函式System stored functions 大部分 - 請參閱個別函式Most - see individual functions 是 - 請參閱預存程序、函式、觸發程序差異Yes - see Stored procedures, functions, triggers differences
系統預存程序System stored procedures 部分 - 請參閱個別預存程序Some - see individual stored procedures 是 - 請參閱預存程序、函式、觸發程序差異Yes - see Stored procedures, functions, triggers differences
系統資料表System tables 部分 - 請參閱個別資料表Some - see individual tables 是 - 請參閱 T-SQL 差異Yes - see T-SQL differences
系統目錄檢視System catalog views 部分 - 請參閱個別檢視Some - see individual views 是 - 請參閱 T-SQL 差異Yes - see T-SQL differences
暫存資料表Temporary tables 本機和資料庫範圍的全域暫存資料表Local and database-scoped global temporary tables 本機和執行個體範圍的全域暫存資料表Local and instance-scoped global temporary tables
暫存資料表Temporal tables Yes Yes
時區選擇Time zone choice No Yes(preview)Yes(preview)
威脅偵測Threat detection Yes Yes
追蹤旗標 (機器翻譯)Trace flags No No
變數Variables Yes Yes
透明資料加密 (TDE)Transparent data encryption (TDE) 是 - 僅限一般用途與商務關鍵服務層級Yes - General Purpose and Business Critical service tiers only Yes
VNetVNet 部分 - 請參閱 VNet 端點Partial - see VNet Endpoints 是,僅限 Resource Manager 模型Yes, Resource Manager model only
Windows Server 容錯移轉叢集Windows Server Failover Clustering 每個資料庫皆隨附高可用性High availability is included with every database. Azure SQL Database 的業務連續性概觀會討論災害復原Disaster recovery is discussed in Overview of business continuity with Azure SQL Database 每個資料庫皆隨附高可用性High availability is included with every database. Azure SQL Database 的業務連續性概觀會討論災害復原Disaster recovery is discussed in Overview of business continuity with Azure SQL Database
XML 索引XML indexes Yes Yes

後續步驟Next steps