In the article Report Subscription Changes in SQL Server Reporting Services 2016, I covered several changes to standard and data-driven subscriptions that were introduced in the release of SQL Server 2016. However all of those changes related to administering report subscriptions using a GUI (i.e. Report Manager Portal, SSRS Configuration Manager). The release of SQL Server Core, SQL Server on Linux and enhancements on Windows PowerShell, reinforces the growing shift by Microsoft to have SQL Server professionals adopt scripting as one of the ways to carry out their daily tasks. In this article we continue to explore SQL Server Reporting Services (SSRS) subscription feature by discussing some of the Windows PowerShell commands that can be utilised to administer report subscriptions.
在“ SQL Server Reporting Services 2016中的报告订阅更改”一文中 ,我介绍了在SQL Server 2016版本中引入的对标准订阅和数据驱动订阅的更改。但是,所有这些更改都与使用GUI管理报告订阅有关(即报表管理器门户,SSRS配置管理器)。 SQL Server Core,Linux上SQL Server以及Windows PowerShell的增强功能的发布,加强了Microsoft日益增长的转变,要求Microsoft SQL Server专业人士将脚本作为执行日常任务的方法之一。 在本文中,我们将通过讨论一些可用于管理报告订阅的Windows PowerShell命令,继续探索SQL Server Reporting Services(SSRS)订阅功能。
基本的PowerShell命令 (Basic PowerShell Commands)
Although latest releases of SQL Server usually introduce new T-SQL functions, they still support basic built-in functions that can be used across all versions of SQL Server i.e. SUBSTRING, REPLACE. Not surprisingly, there are PowerShell commands that can be executed against most versions of Reporting Services. Examples of such basic reporting services functionalities that can be administered using PowerShell includes the following:
尽管最新版本SQL Server通常会引入新的T-SQL函数,但它们仍支持可在所有版本SQL Server中使用的基本内置函数,例如SUBSTRING,REPLACE。 毫不奇怪,可以对大多数版本的Reporting Services执行PowerShell命令。 可以使用PowerShell进行管理的此类基本报表服务功能示例包括:
- Providing a list of subscriptions 提供订阅列表
- Change report subscription ownership 更改报告订阅的所有权
- Delete a report subscription 删除报告订阅
The ability to administer report subscriptions using PowerShell is made possible by the Report Server Web service. The Report Server Web service has several endpoints for administering a report server instance such as ReportService2005, ReportService2006 and ReportService2010. For the purposes of this discussion, we will focus on the ReportService2010. Figure 1 shows a preview of the XML file returned when you access the endpoint from a browser.
报表服务器Web服务使使用PowerShell来管理报表订阅的功能成为可能。 报表服务器Web服务具有多个用于管理报表服务器实例的终结点,例如ReportService2005 , ReportService2006</