什么是 Azure Analysis Services?What is Azure Analysis Services?

Azure Analysis Services

Azure Analysis Services 是一个完全托管的平台即服务 (PaaS),它在云中提供企业级的数据模型。Azure Analysis Services is a fully managed platform as a service (PaaS) that provides enterprise-grade data models in the cloud. 使用高级糅合和建模功能,可以在单个受信任的表格语义数据模型中合并多个数据源中的数据、定义指标以及保护数据。Use advanced mashup and modeling features to combine data from multiple data sources, define metrics, and secure your data in a single, trusted tabular semantic data model. 数据模型可让用户更快速轻松地使用 Power BI 和 Excel 等工具执行即席数据分析。The data model provides an easier and faster way for users to perform ad hoc data analysis using tools like Power BI and Excel.


快速启动和运行Get up and running quickly

在 Azure 门户中,数分钟即可创建服务器In Azure portal, you can create a server within minutes. 借助 Azure 资源管理器模板和 PowerShell,可以使用声明性模板来创建服务器。And with Azure Resource Manager templates and PowerShell, you can create servers using a declarative template. 利用单个模板可以部署服务器资源及其他 Azure 组件,例如存储帐户和 Azure Functions。With a single template, you can deploy server resources along with other Azure components such as storage accounts and Azure Functions.

Azure Analysis Services 集成许多 Azure 服务,因此可以生成复杂的分析解决方案。Azure Analysis Services integrates with many Azure services enabling you to build sophisticated analytics solutions. 集成 Azure Active Directory 后可以对关键数据进行安全的基于角色的访问。Integration with Azure Active Directory provides secure, role-based access to your critical data. 只需包括一项将数据加载到模型中的活动,即可集成 Azure 数据工厂管道。Integrate with Azure Data Factory pipelines by including an activity that loads data into the model. 可通过自定义代码将 Azure 自动化Azure Functions 用于模型的轻型业务流程。Azure Automation and Azure Functions can be used for lightweight orchestration of models using custom code.

符合需要的层级The right tier when you need it

可在基本层和标准层中使用 Azure Analysis Services。Azure Analysis Services is available in Basic, and Standard tiers. 每个层中的计划成本因处理能力、查询处理单位 (QPU) 和内存大小而异。Within each tier, plan costs vary according to processing power, Query Processing Units (QPUs), and memory size. 创建服务器时,将在层内选择计划。When you create a server, you select a plan within a tier. 可以在同一层内上下更改计划,或者升级到更高的层,但不能从较高的层降级到较低的层。You can change plans up or down within the same tier, or upgrade to a higher tier, but you can't downgrade from a higher tier to a lower tier.

基本层Basic tier

建议在具有小型表格模型的生产解决方案、限制用户并发性和要求简单数据刷新的场合下使用该层。This tier is recommended for production solutions with smaller tabular models, limited user concurrency, and simple data refresh requirements. 查询副本横向扩展不适用于此层。Query replica scale-out is not available for this tier. 此层不支持透视图、多个分区和 DirectQuery 表格模型功能。Perspectives, multiple partitions, and DirectQuery tabular model features are not supported in this tier.

计划Plan QPUQPUs 内存 (GB)Memory (GB)
B1B1 4040 1010
B2B2 8080 1616

标准层Standard tier

此层适用于需要弹性用户并发性,且数据模型不断扩大的任务关键型生产应用程序。This tier is for mission-critical production applications that require elastic user-concurrency, and have rapidly growing data models. 它支持使用高级数据刷新实现接近实时的数据模型更新,并支持所有表格建模功能。It supports advanced data refresh for near real-time data model updates, and supports all tabular modeling features.

计划Plan QPUQPUs 内存 (GB)Memory (GB)
S0S0 4040 1010
S1S1 100100 2525
S2S2 200200 5050
S4S4 400400 100100
S8v2 1S8v2 1 640640 200200
S9v2 1S9v2 1 12801280 400400

1 - 并未在所有区域推出。1 - Not available in all regions.

按区域列出的可用性Availability by region

目前,中国的“中国东部 2”区域和“中国北部”区域支持 Azure Analysis Services。Azure Analysis Services is supported in China East 2 region and China North region on China currently. 支持的计划和查询副本可用性取决于所选的区域。Supported plans and query replica availability depend on the region you choose. 计划和查询副本可用性可能会根据每个区域的需求和可用资源而变化。Plan and query replica availability can change depending on need and available resources for each region.


区域Region 支持的计划Supported plans 查询副本(仅限标准计划)Query replicas (Standard plans only)
中国北部China North B1, B2, S0, S1, S2, S4B1, B2, S0, S1, S2, S4 11
中国东部 2China East 2 B1, B2, S0, S1, S2, S4B1, B2, S0, S1, S2, S4 77
中国东部 2China East 2 S8v2、S9v2S8v2, S9v2 33

按需求缩放Scale to your needs

纵向扩展\缩减、暂停和恢复Scale up\down, pause, and resume

纵向扩展、纵向缩减或暂停服务器。Go up, down, or pause your server. 使用 Azure 门户,或者通过 PowerShell 进行完全且即时的控制。Use the Azure portal or have total control on-the-fly by using PowerShell. 仅为所用的部分付费。You only pay for what you use.

进行快速查询响应的横向扩展资源Scale out resources for fast query responses

启用横向扩展后,客户端查询就会分布在查询池中的多个查询副本中。With scale out, client queries are distributed among multiple query replicas in a query pool. 查询副本已同步表格模型的副本。Query replicas have synchronized copies of your tabular models. 可以通过分散查询工作负荷,缩短查询工作负荷高峰期间的响应时间。By spreading the query workload, response times during high query workloads can be reduced. 可以将模型处理操作与查询池分开,确保客户端查询不受处理操作的负面影响。Model processing operations can be separated from the query pool, ensuring client queries are not adversely affected by processing operations.

创建查询池时,最多可以有七个其他的查询副本(总共为八个,包括你自己的服务器在内)。You can create a query pool with up to seven additional query replicas (eight total, including your server). 可以在池中创建的查询副本数取决于所选的计划和区域。The number of query replicas you can have in your pool depend on your chosen plan and region. 查询副本不能分散到服务器区域的外部。Query replicas cannot be spread outside your server's region. 查询副本的计费方式与服务器相同。Query replicas are billed at the same rate as your server.

可以根据需要横向扩展查询副本,就像更改层一样。Just like with changing tiers, you can scale out query replicas according to your needs. 通过门户或 REST API 配置横向扩展。Configure scale out in the portal or by using REST APIs. 有关详细信息,请参阅 Azure Analysis Services 横向扩展To learn more, see Azure Analysis Services scale out.


总成本取决于多种因素。Total cost depends on a number of factors. 例如,所选的区域、层级、查询副本和暂停/恢复操作。For example, your chosen region, tier, query replicas, and pause/resume. 请使用 Azure Analysis Services 定价计算器确定所在区域的一般定价。Use the Azure Analysis Services Pricing calculator to determine typical pricing for your region. 此工具可计算单个区域中单个服务器实例的定价。This tool calculates pricing for a single-server instance for a single region. 请记住,查询副本的计费方式与服务器相同。Keep in mind, query replicas are billed at the same rate as the server.

基于 SQL Server Analysis ServicesBuilt on SQL Server Analysis Services

Azure Analysis Services 兼容 SQL Server Analysis Services Enterprise Edition 中已有的多个强大功能。Azure Analysis Services is compatible with many great features already in SQL Server Analysis Services Enterprise Edition. Azure Analysis Services 支持 1200 和更高兼容级别的表格模型。Azure Analysis Services supports tabular models at the 1200 and higher compatibility levels. 表格模型属于关系建模构造(模型、表、列),在表格元数据对象定义中以表格模型脚本语言 (TMSL) 和表格对象模型 (TOM) 代码阐述。Tabular models are relational modeling constructs (model, tables, columns), articulated in tabular metadata object definitions in Tabular Model Scripting Language (TMSL) and Tabular Object Model (TOM) code. 支持分区、透视图、行级安全性、双向关系和转换*。Partitions, perspectives, row-level security, bi-directional relationships, and translations are all supported*. Azure Analysis Services 不支持多维模型和 PowerPivot for SharePoint。Multidimensional models and PowerPivot for SharePoint are not supported in Azure Analysis Services.

支持内存中模式和 DirectQuery 模式的表格模型。Tabular models in both in-memory and DirectQuery modes are supported. 内存中模式(默认)表格模型支持多个数据源。In-memory mode (default) tabular models support multiple data sources. 由于模型数据经过高度压缩并缓存在内存中,因此,此模式可针对大量数据提供最快的查询响应。Because model data is highly compressed and cached in-memory, this mode provides the fastest query response over large amounts of data. 此外,它还针对复杂数据集和查询提供最高的灵活性。It also provides the greatest flexibility for complex datasets and queries.

分区可以实现增量加载、提高并行度,并减少内存消耗。Partitioning enables incremental loads, increases parallelization, and reduces memory consumption. 其他高级数据建模功能(例如计算表)和所有 DAX 函数均受支持。Other advanced data modeling features like calculated tables, and all DAX functions are supported. 必须刷新(处理)内存中模型才能更新数据源中的缓存数据。In-memory models must be refreshed (processed) to update cached data from data sources. 借助 Azure 服务主体支持,使用 PowerShell、TOM、TMSL 和 REST 的无人参与刷新操作可灵活确保模型数据始终保持最新。With Azure service principal support, unattended refresh operations using PowerShell, TOM, TMSL, and REST offer flexibility in making sure your model data is always up to date.

DirectQuery 模式* 利用后端关系数据库进行存储和查询执行。DirectQuery mode* leverages the backend relational database for storage and query execution. 支持单个 SQL Server、SQL Server 数据仓库、Azure SQL 数据库、Azure Synapse Analytics(旧称为 SQL 数据仓库)、Oracle 和 Teradata 数据源中的极大型数据集。Extremely large data sets in single SQL Server, SQL Server Data Warehouse, Azure SQL Database, Azure Synapse Analytics (formerly SQL Data Warehouse), Oracle, and Teradata data sources are supported. 后端数据集可以超出可用的服务器资源内存。Backend data sets can exceed available server resource memory. 不需要复杂的数据模型刷新方案。Complex data model refresh scenarios aren't needed. 此外还存在一些限制(例如,受限的数据源类型、DAX 公式限制),并且某些高级数据建模功能不受支持。There are also some restrictions, such as limited data source types, DAX formula limitations, and some advanced data modeling features aren't supported. 在确定最合适的模式之前,请参阅直接查询模式Before determining the best mode for you, see Direct Query mode.

* 功能是否可用取决于层。* Feature availability depends on tier.

支持的数据源Supported data sources

Azure Analysis Services 中的表格模型支持各种数据源:从简单的文本文件到大数据。Tabular models in Azure Analysis Services support a wide variety of data sources from simple text files to Big Data. 若要了解详细信息,请参阅 Azure Analysis Services 中支持的数据源To learn more, see Data sources supported in Azure Analysis Services.

兼容级别Compatibility level

“兼容性级别”是指 Analysis Services 引擎中特定于发布的行为。Compatibility level refers to release-specific behaviors in the Analysis Services engine. Azure Analysis Services 支持 1200 和更高兼容级别的表格模型。Azure Analysis Services supports tabular models at the 1200 and higher compatibility levels. 若要了解详细信息,请参阅表格模型的兼容性级别To learn more, see Compatibility level for tabular models.

你的数据是安全的Your data is secure

Azure Analysis Services 为多个级别的敏感数据提供安全性。Azure Analysis Services provides security for your sensitive data at multiple levels.

在服务器级别:Analysis Services 提供防火墙、Azure 身份验证、服务器管理员角色和服务器端加密。At the server level, Analysis Services provides firewall, Azure authentication, server administrator roles, and Server-Side Encryption. 在数据模型级别,用户角色、行级和对象级安全性可确保数据的安全,只有有权的用户才能查看你的数据。At the data model level, user roles, row-level, and object-level security ensure your data is safe and gets seen by only those users who are meant to see it.


Azure Analysis Services 防火墙阻止所有客户端连接,规则中指定的 IP 地址除外。Azure Analysis Services Firewall blocks all client connections other than those IP addresses specified in rules. 默认情况下,没有为新服务器启用防火墙保护。By default, firewall protection is not enabled for new servers. 建议在创建服务器以后立即通过服务器预配脚本或门户启用防火墙保护并配置规则。It's recommended firewall protection is enabled and rules are configured as part of a server provisioning script or in the portal immediately after the server is created. 配置规则,按个人客户端 IP 或范围指定允许的 IP 地址。Configure rules specifying allowed IP addresses by individual client IPs or by range. 也可允许或阻止 Power BI(服务)连接。Power BI (service) connections can also be allowed or blocked. 使用门户或 PowerShell 配置防火墙和规则。Configure firewall and rules in the portal or by using PowerShell. 有关详细信息,请参阅配置服务器防火墙To learn more, see Configure a server firewall.


用户身份验证由 Azure Active Directory (AAD) 处理。User authentication is handled by Azure Active Directory (AAD). 登录时,用户需使用组织帐户标识对数据库进行基于角色的访问。When logging in, users use an organization account identity with role-based access to the database. 用户标识必须是服务器所在订阅的默认 Azure Active Directory 成员。User identities must be members of the default Azure Active Directory for the subscription that the server is in. 若要了解详细信息,请参阅身份验证和用户权限To learn more, see Authentication and user permissions.

数据安全Data security

Azure Analysis Services 使用 Azure Blob 存储来持久保留 Analysis Services 数据库的存储和元数据。Azure Analysis Services uses Azure Blob storage to persist storage and metadata for Analysis Services databases. 使用 Azure Blob 服务器端加密 (SSE) 加密 Blob 中的数据文件。Data files within Blob are encrypted using Azure Blob Server Side Encryption (SSE). 使用“直接查询”模式时,仅存储元数据。When using Direct Query mode, only metadata is stored. 查询时通过加密的协议从数据源访问实际数据。The actual data is accessed through encrypted protocol from the data source at query time.

通过安装和配置本地数据网关,实现对组织内本地数据源的安全访问。Secure access to data sources on-premises in your organization is achieved by installing and configuring an On-premises data gateway. 网关提供在 DirectQuery 和内存模式下的数据访问。Gateways provide access to data for both DirectQuery and in-memory modes.


Analysis Services 使用基于角色的授权,授予对服务器和模型数据库操作、对象与数据的访问权限。Analysis Services uses role-based authorization that grants access to server and model database operations, objects, and data. 访问服务器或数据库的所有用户都在分配的角色中使用其 Azure AD 用户帐户执行此操作。All users who access a server or database do so with their Azure AD user account within an assigned role. 服务器管理员角色位于服务器资源级别。The server administrator role is at the server resource level. 默认情况下,创建服务器时使用的帐户将自动包含在服务器管理员角色中。By default, the account used when creating a server is automatically included in the Server Admins role. 使用门户、SSMS 或 PowerShell 添加其他用户和组帐户。Additional user and group accounts are added by using the portal, SSMS, or PowerShell.

通过数据库角色向查询数据的非管理最终用户授予访问权限。Non-administrative end users who query data are granted access through database roles. 数据库角色作为数据库中的单独对象创建,并且仅适用于创建该角色的数据库。A database role is created as a separate object in the database, and applies only to the database in which that role is created. 数据库角色按(数据库)“管理员”、“读取”与“读取和处理”权限来定义。Database roles are defined by (database) Administrator, Read, and Read and Process permissions. 使用 SSMS 或 PowerShell 添加用户和组帐户。User and group accounts are added by using SSMS or PowerShell.

行级安全性Row-level security

所有兼容级别的表格模型都支持行级安全性。Tabular models at all compatibility levels support row-level security. 行级安全性的定义方式如下:在模型中使用 DAX 表达式,这些表达式可在表中定义行,以及在用户可查询的相关表的许多方向定义任何行。Row-level security is configured in the model by using DAX expressions that define the rows in a table, and any rows in the many direction of a related table that a user can query. 为“读取”与“读取和处理”权限定义使用 DAX 表达式的行筛选器。Row filters using DAX expressions are defined for the Read and Read and Process permissions.

对象级安全性Object-level security

1400 兼容级别的表格模型支持对象级安全性,包括表级安全性和列级安全性。Tabular models at the 1400 compatibility level support object-level security, which includes table-level security and column-level security. 对象级安全性是使用 TMSL 或 TOM 在 Model.bim 文件中基于 JSON 的元数据内设置的。Object level security is set in the JSON-based metadata in the Model.bim file by using TMSL, or TOM. 有关详细信息,请参阅对象级安全性To learn more, see Object-level security.

通过服务主体进行自动化Automation through service principals

服务主体是在租户中创建的 Azure Active Directory 应用程序资源,用于执行无人参与的资源和服务级别操作。Service principals are an Azure Active Directory application resource you create within your tenant to perform unattended resource and service level operations. 服务主体可与 Azure 自动化、PowerShell 无人参与模式、自定义客户端应用程序和 Web 应用配合使用,以便自动完成常见的任务,例如数据刷新、纵向扩展/缩减和暂停/恢复。Service principals are used with Azure Automation, PowerShell unattended mode, custom client applications, and web apps to automate common tasks like data refresh, scale up/down, and pause/resume. 权限通过角色成员身份分配给服务主体。Permissions are assigned to service principals through role membership. 有关详细信息,请参阅使用服务主体进行自动化To learn more, see Automation with service principals.

Azure 治理Azure governance

Azure Analysis Services 受 Microsoft 联机服务条款Microsoft 隐私声明的约束。Azure Analysis Services is governed by the Microsoft Online Services Terms and the Microsoft Privacy Statement. 若要详细了解 Azure 安全性,请参阅 Azure 信任中心To learn more about Azure Security, see the Azure Trust Center.

使用熟悉的工具Use the tools you already know

BI 开发人员工具

Visual StudioVisual Studio

使用带有 Analysis Services 项目的 Visual Studio 开发和部署模型。Develop and deploy models with Visual Studio with Analysis Services projects. Analysis Services 项目扩展包括可帮助你快速入门的模板和向导。The Analysis Services projects extension includes templates and wizards that get you up and going quickly. Visual Studio 中的模型创作环境现在包括现代 Get Data 数据源查询和混合功能,可用于创建表格 1400 及更高模型。The model authoring environment in Visual Studio now includes the modern Get Data data source query and mashup functionality for tabular 1400 and higher models. 如果熟悉 Power BI Desktop 和 Excel 2016 中的“获取数据”功能,则已知道创建高度自定义的数据源查询很容易。If you're familiar with Get Data in Power BI Desktop and Excel 2016, you already know how easy it is to create highly customized data source queries.

Azure Analysis Services 项目作为免费的可安装 VSIX 包提供。Azure Analysis Services Projects is available as a free installable VSIX package. 从市场下载Download from Marketplace. 此扩展适用于任何版本的 Visual Studio 2017 及更高版本,包括免费的 Community 版本。The extension works with any version of Visual Studio 2017 and later, including the free Community edition.

SQL Server Management StudioSql Server Management Studio

通过使用 SQL Server Management Studio (SSMS) 管理服务器和模型数据库。Manage your servers and model databases by using SQL Server Management Studio (SSMS). 连接到云中的服务器。Connect to your servers in the cloud. 直接从 XMLA 查询窗口运行 TMSL 脚本,然后通过 TMSL 脚本和 PowerShell 自动执行任务。Run TMSL scripts right from the XMLA query window, and automate tasks by using TMSL scripts and PowerShell. 新特性和功能推出迅速 - SSMS 每月进行更新。New features and functionality happen fast - SSMS is updated monthly.

开源工具Open-source tools

Analysis Services 有一个生机勃勃的开发人员社区,他们会创建各种工具。Analysis Services has a vibrant community of developers who create tools. 请务必查看直观且轻型的表格编辑器,它是一个开源工具,可用于创建、维护和管理表格模型。Be sure to check out Tabular Editor, an open-source tool for creating, maintaining, and managing tabular models using an intuitive, lightweight editor. DAX Studio 是一个强大的开源工具,可用于 DAX 创作、诊断、性能优化和分析。DAX Studio, is a great open-source tool for DAX authoring, diagnosis, performance tuning, and analysis.


服务器资源管理任务,如创建服务器资源、挂起或恢复服务器操作,或更改服务级别(层),都要使用 Azure PowerShell cmdlet。Server resource management tasks like creating server resources, suspending or resuming server operations, or changing the service level (tier) use Azure PowerShell cmdlets. 用于管理数据库的其他任务(例如添加或删除角色成员、处理或运行 TMSL 脚本)使用 SqlServer 模块中的 cmdlet。Other tasks for managing databases such as adding or removing role members, processing, or running TMSL scripts use cmdlets in the SqlServer module. 有关详细信息,请参阅使用 PowerShell 管理 Azure Analysis ServicesTo learn more, see Manage Azure Analysis Services with PowerShell.

对象模型和脚本Object model and scripting

表格模型提供快速开发功能,其自定义程度可以很高。Tabular models offer rapid development and are highly customizable. 表格模型包括用于描述模型对象的表格对象模型 (TOM)。Tabular models include the Tabular Object Model (TOM) to describe model objects. TOM 通过表格模型脚本语言 (TMSL) 在 JSON 中公开,通过 Microsoft.AnalysisServices.Tabular 命名空间在 AMO 数据定义语言中公开。TOM is exposed in JSON through the Tabular Model Scripting Language (TMSL) and the AMO data definition language through the Microsoft.AnalysisServices.Tabular namespace.

支持最新的客户端工具Supports the latest client tools


利用新式的数据浏览和可视化工具(例如 Power BI、Excel、Reporting Services 和第三方工具),用户可以通过交互性强且视觉效果丰富的方式来了解模型数据。Modern data exploration and visualization tools like Power BI, Excel, Reporting Services, and third-party tools are all supported, providing users with highly interactive and visually rich insights into your model data.

监视和诊断Monitoring and diagnostics

Azure Analysis Services 与 Azure Monitor 指标集成,提供数量众多的资源特定指标来帮助你监视服务器的性能与运行状况。Azure Analysis Services is integrated with Azure Monitor metrics, providing an extensive number of resource-specific metrics to help you monitor the performance and health of your servers. 有关详细信息,请参阅监视服务器指标To learn more, see Monitor server metrics. 使用资源平台日志记录指标。Record metrics with resource platform logs. 监视日志并将其发送到 Azure 存储,将其流式传输到 Azure 事件中心,并将其导出到 Azure 服务 Azure Monitor 日志Monitor and send logs to Azure Storage, stream them to Azure Event Hubs, and export them to Azure Monitor logs, a service of Azure. 有关详细信息,请参阅设置诊断日志记录To learn more, see Setup diagnostic logging.

Azure Analysis Services 还支持使用动态管理视图 (DMV)Azure Analysis Services also supports using Dynamic Management Views (DMVs). DMV 基于 SQL 语法,能够与返回元数据和监视有关服务器实例的信息的架构行集相对接。Based on SQL syntax, DMVs interface schema rowsets that return metadata and monitoring information about server instance.


本部分列出了特定于 Azure Analysis Services 的文档。Documentation specific to Azure Analysis Services is included here. 使用浏览器屏幕左侧的目录可查找文章。Use the table of contents on the left side of your browser screen to find articles.

由于 Azure Analysis Services 中的表格模型在很大程度上与 SQL Server Analysis Services 和 Power BI Premium 数据集中的表格模型相同,因此可以参考 Analysis Services 文档中分享的大量数据建模教程、概念、过程、开发人员和参考文章。Because tabular models in Azure Analysis Services are much the same as tabular models in SQL Server Analysis Services and Power BI Premium datasets, there's an extensive library of shared data modeling tutorials, conceptual, procedural, developer, and reference articles in Analysis Services documentation. 共享的 Analysis Services 文档中的文章在标题下方的“适用于”段落中说明了它们是否也适用于 Azure Analysis Services。Articles in the shared Analysis Services documentation show if they also apply to Azure Analysis Services by an APPLIES TO banner beneath the title. 还可以使用“目录”上方的“版本”选择器,但只能查看适用于你所用的平台的文章。You can also use the Version selector above the table of contents to see only those articles that apply to the platform you're using.



与本文一样,Analysis Services 文档也是开放源代码的。Analysis Services documentation, like this article, is open source. 若要详细了解如何供稿,请参阅文档供稿指南To learn more about how you can contribute, see the Docs contributor guide.

后续步骤Next steps