什麼是 Azure SQL Database 中的單一資料庫What is a single database in Azure SQL Database

單一資料庫部署選項會使用其本身的資源集在 Azure SQL Database 中建立資料庫,並透過 SQL Database 伺服器進行管理。The single database deployment option creates a database in Azure SQL Database with its own set of resources and is managed via a SQL Database server. 使用單一資料庫時,每個資料庫會彼此隔離並且可攜,且各自在以 DTU 為基礎的購買模型以虛擬核心為基礎的購買模型內有其本身的服務層級和保證的計算大小。With a single database, each database is isolated from each other and portable, each with its own service tier within the DTU-based purchasing model or vCore-based purchasing model and a guaranteed compute size.


單一資料庫是 Azure SQL Database 的三個部署選項之一。Single database is one of three deployment options for Azure SQL Database. 另外兩個選項是彈性集區受控執行個體The other two are elastic pools and managed instance.


如需 Azure SQL Database 的詞彙解釋,請參閱 SQL 資料庫術語詞彙For a glossary of terms in Azure SQL Database, see SQL Database terms glossary

動態延展性Dynamic scalability

您可以在無伺服器 (預覽) 計算層級的小型單一資料庫中建立第一個應用程式, 或在布建的計算層中以小型計算大小進行。You can build your first app on a small, single database at low cost in the serverless (preview) compute tier or a small compute size in the provisioned compute tier. 您可以隨時以手動或程式設計方式變更計算或服務層級, 以符合解決方案的需求。You change the compute or service tier manually or programmatically at any time to meet the needs of your solution. 您的應用程式或客戶皆無須停機,即可調整效能。You can adjust performance without downtime to your app or to your customers. 動態延展性可讓您的資料庫以透明的方式回應快速變化的資源需求,並且讓您只需支付您所需的資源費用。Dynamic scalability enables your database to transparently respond to rapidly changing resource requirements and enables you to only pay for the resources that you need when you need them.

單一資料庫和彈性集區Single databases and elastic pools

單一資料庫可移入或移出彈性集區以進行資源共用。A single database can be moved into or out of an elastic pool for resource sharing. 對於許多企業和應用程式而言,只要能夠建立單一資料庫,並依需求調高或調低的效能即可,尤其是當使用模式相當容易預測時更是如此。For many businesses and applications, being able to create single databases and dial performance up or down on demand is enough, especially if usage patterns are relatively predictable. 但如果您有無法預測的使用模式,則管理成本和商務模式就會變得相當困難。But if you have unpredictable usage patterns, it can make it hard to manage costs and your business model. 彈性集區的設計可解決此問題。Elastic pools are designed to solve this problem. 概念很簡單。The concept is simple. 您可將效能資源配置到集區,而非個別的資料庫,並支付該集區的集體效能資源,而非單一資料庫效能的費用。You allocate performance resources to a pool rather than an individual database and pay for the collective performance resources of the pool rather than for single database performance.

監視和警示Monitoring and alerting

您可以使用內建的效能監視警示工具,並搭配使用效能分級。You use the built-in performance monitoring and alerting tools, combined with the performance ratings. 使用這些工具,您可以根據目前或專案的效能需求快速評估相應增加或減少的影響。Using these tools, you can quickly assess the impact of scaling up or down based on your current or project performance needs. 此外,SQL Database 可以發出計量和診斷記錄以便進行監視。Additionally, SQL Database can emit metrics and diagnostic logs for easier monitoring.

可用性功能Availability capabilities

單一資料庫、彈性集區和受控實例全都提供許多可用性特性。Single databases, elastic pools, and managed instances all provide many availability characteristics. 如需相關資訊,請參閱可用性特性For information, see Availability characteristics.

Transact-SQL 差異Transact-SQL differences

Microsoft SQL Server 和 Azure SQL Database 都支援應用程式使用的大部分 Transact-SQL 功能。Most Transact-SQL features that applications use are fully supported in both Microsoft SQL Server and Azure SQL Database. 例如,資料類型、運算子、字串、算術、邏輯及資料指標函式等核心 SQL 元件在 SQL Server 與 SQL Database 中都以相同的方式運作。For example, the core SQL components such as data types, operators, string, arithmetic, logical, and cursor functions, work identically in SQL Server and SQL Database. 不過,DDL (資料定義語言) 和 DML (資料操作語言) 元素中有幾個 T-SQL 差異導致對 T-SQL 陳述式和查詢僅提供部分支援 (將在本文章中稍後探討)。There are, however, a few T-SQL differences in DDL (data-definition language) and DML (data manipulation language) elements resulting in T-SQL statements and queries that are only partially supported (which we discuss later in this article). 此外,還有一些功能和語法完全不受支援,因為 Azure SQL Database 的設計目的是要將功能隔離,讓它們不與 master 資料庫和作業系統相依。In addition, there are some features and syntax that is not supported at all because Azure SQL Database is designed to isolate features from dependencies on the master database and the operating system. 因此,大多數伺服器層級活動都不適用於 SQL Database。As such, most server-level activities are inappropriate for SQL Database. 如果它們設定伺服器層級選項、作業系統元件或指定檔案系統組態,便無法使用 T-SQL 陳述式和選項。T-SQL statements and options are not available if they configure server-level options, operating system components, or specify file system configuration. 當需要這類功能時,通常會從 SQL Database 或從另一個 Azure 功能或服務以其他方式提供適合的替代方案。When such capabilities are required, an appropriate alternative is often available in some other way from SQL Database or from another Azure feature or service.

如需詳細資訊,請參閱解決移轉至 SQL Database 期間的 Transact-SQL 差異For more information, see Resolving Transact-SQL differences during migration to SQL Database.


SQL Database 提供了多種內建安全性與合規性功能,可協助您的應用程式符合各種安全性與合規需求。SQL Database provides a range of built-in security and compliance features to help your application meet various security and compliance requirements.


Azure SQL Database (所有部署選項) 已通過許多合規性標準的認證。Azure SQL Database (all deployment options), has been certified against a number of compliance standards. 如需詳細資訊, 請參閱Microsoft Azure 信任中心, 您可以在此找到最新的 SQL Database 合規性認證清單。For more information, see the Microsoft Azure Trust Center where you can find the most current list of SQL Database compliance certifications.

後續步驟Next steps