Επεξεργασία

Κοινή χρήση μέσω


Disable or pause report and subscription processing

There are several approaches you can use to disable or pause Reporting Services report and subscription processing. The approaches in this article range from disabling a subscription to interrupting the data source connection. Not all approaches are possible with both Reporting Services server modes. The following table summarizes the methods and supported Reporting Services server modes:

In this article

Approach Supported server mode
Enable and disable subscriptions Native mode
Pause a shared schedule Native and SharePoint mode
Disable a shared data source Native and SharePoint mode
Modify role assignments to prevent access to a report (native mode) Native mode
Remove manage subscription permissions from role (native mode) Native mode
Disable delivery extensions Native and SharePoint mode

Enable and disable subscriptions

Tip

New in SQL 2016 Reporting Services, enable and disable subscriptions. New user interface options allow you to quickly enable and disable subscriptions. The disabled subscriptions maintain their other configuration properties such as schedule and can be easily re-enabled. You can also programmatically enable and disable subscriptions, or audit which subscriptions are disabled.

Screenshot of the Enable and Disable buttons of the Subscriptions page.

In the web portal, browse to the subscription from either the My Subscriptions page or the Subscriptions page of an individual subscription. Select one or more subscriptions and then choose either the disable button or enable button on the ribbon. The status column changes to either "Disabled" or "Enabled" respectively.

Reporting Services writes a row in the Reporting Services log when a subscription is either enabled or disabled. For example, in report server log file:

 C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\LogFiles\RSPortal_2019_06_20_00_49_22.log

You see rows similar to the following examples:

 RSPortal!subscription!RSPortal.exe!93!06/20/2019-01:16:47:: i INFO: Subscription 2b409d66-d4ea-408a-918c-0f9e41ce49ca disabled at 06/20/2019 01:16:47
RSPortal!subscription!RSPortal.exe!93!06/20/2019-01:16:51:: i INFO: Subscription 2b409d66-d4ea-408a-918c-0f9e41ce49ca enabled at 06/20/2019 01:16:51

Use Windows PowerShell to disable a single subscription: Use the following PowerShell script to disable a specific subscription. Update the server name and subscription ID in the script.

#disable specific subscription  
$rs2010 = New-WebServiceProxy -Uri "https://SERVERNAME/ReportServer/ReportService2010.asmx" -Namespace SSRS.ReportingService2010 -UseDefaultCredential;  
$subscriptionID = "subscription guid";  
$rs2010.DisableSubscription($subscriptionID);  
  

You can use the following script to list all subscriptions with their IDs. Update the server name.

#list all subscriptions  
$rs2010 = New-WebServiceProxy -Uri "https://SERVERNAME /ReportServer/ReportService2010.asmx" -Namespace SSRS.ReportingService2010 -UseDefaultCredential;  
$subscriptions = $rs2010.ListSubscriptions("/");  
$subscriptions | select subscriptionid, report, status, path  
  

Use Windows PowerShell to list all disabled subscriptions: Use the following PowerShell script to list all of the disabled subscriptions on the current Native mode report server. Update the server name.

#list all disabled subscriptions  
$rs2010 = New-WebServiceProxy -Uri "https://uetestb03/ReportServer/ReportService2010.asmx" -Namespace SSRS.ReportingService2010 -UseDefaultCredential;  
$subscriptions = $rs2010.ListSubscriptions("/");  
Write-Host "--- Disabled Subscriptions ---";  
Write-Host "----------------------------------- ";  
$subscriptions | Where-Object {$_.Active.DisabledByUserSpecified -and $_.Active.DisabledByUser } | select subscriptionid, report, status, lastexecuted,path | format-table -auto  

Use Windows PowerShell to enable all disabled subscriptions: Use the following PowerShell script to enable all subscriptions that are currently disabled. Update the server name.

#enable all subscriptions  
$rs2010 = New-WebServiceProxy -Uri "https://SERVERNAME/ReportServer/ReportService2010.asmx" -Namespace SSRS.ReportingService2010 -UseDefaultCredential;  
$subscriptions = $rs2010.ListSubscriptions("/") | Where-Object {$_.status -eq "disabled" } ;  
ForEach ($subscription in $subscriptions)  
{  
    $rs2010.EnableSubscription($subscription.SubscriptionID);  
    $subscription | select subscriptionid, report, path  
}  
  

Use Windows PowerShell to DISABLE all subscriptions: Use the following PowerShell script to list disable ALL subscriptions.

#DISABLE all subscriptions  
$rs2010 = New-WebServiceProxy -Uri "https://SERVERNAME/ReportServer/ReportService2010.asmx" -Namespace SSRS.ReportingService2010 -UseDefaultCredential;  
$subscriptions = $rs2010.ListSubscriptions("/") ;  
ForEach ($subscription in $subscriptions)  
{  
    $rs2010.DisableSubscription($subscription.SubscriptionID);  
    $subscription | select subscriptionid, report, path  
}  

Pause a shared schedule

If a report or subscription runs from a shared schedule, you can pause the schedule to prevent processing. All report and subscription processing driven by the schedule is deferred until the schedule is resumed.

  • SharePoint mode: In Site settings, select Manage shared schedules. Choose the schedule and select Pause selected schedules.

  • Native mode: In the web portal, select the Settings button from the menu bar at the top of the web portal screen, and choose Site Settings from the menu. Select the Schedules tab to display the schedules page. Select the checkbox(es) next to the schedule(s) you want to enable or disable, and then choose the Enable or Disable button respectively to perform the desired action. The status column updates to "Disabled" or "Enabled" accordingly.

Disable a shared data source

When you use shared data sources, you can disable it to prevent a report or data-driven subscription from running. Disabling a shared data source disconnects the report from its external source. While disabled, the data source is unavailable to all reports and subscriptions that use it.

Note the report still loads even if the data source is unavailable. The report doesn't contain data, but users with appropriate permissions can access the property pages, security settings, report history, and subscription information associated with the report.

  • SharePoint mode: To disable a shared data source in a SharePoint mode report server, browse to the document library that contains the data source. Select the data source and then clear the Enable this data source checkbox.

  • Native mode: To disable a shared data source on a native mode report server, open the data source in the web portal, and clear the Enable this data source checkbox.

Modify role assignments to prevent access to a report (native mode)

One way to make a report unavailable is to temporarily remove the role assignment that provides access to the report. This approach can be used on all reports regardless of how the data source connection is made. This approach targets only the report, without affecting the operation of other reports or items.

To remove the role assignment, open the Security page of the report in the web portal. If the report inherits security from a parent, you can choose Customize security and then select Confirm in the Item security dialog box to create a restrictive security policy that omits role assignments that provide widespread access (for example, you can remove a role assignment that provides access to Everyone, and keep the role assignment that provides access to a small group of users, such as Administrators).

Remove manage subscription permissions from role (native mode)

To prevent users from creating subscriptions, clear the Manage individual subscriptions task from the role. When you remove this task, the Subscription pages aren't available. In the web portal, the My Subscriptions page appears to be empty (it can't be deleted), even if it previously contained subscriptions. Removing subscription-related tasks prevents users from creating and modifying subscriptions, but doesn't delete existing subscriptions. Existing subscriptions continue to execute until you delete them. To remove the permission:

  1. Open SQL Server Management Studio.

  2. Connect to the Reporting Services report server.

  3. Expand the Security node.

  4. Expand the Roles node and select the desired role.

  5. Right-click the role and select Properties.

  6. Clear the Manage individual subscriptions and the Manage all subscriptions tasks.

  7. Select OK to apply the changes.

Disable delivery extensions

All delivery extensions installed on a report server are available to any user who has permission to create a subscription to a given report. The following delivery extensions are available and configured automatically:

  • Windows File Share

  • SharePoint Library (available only from a SharePoint site that is integrated with a SharePoint integrated mode report server)

E-mail delivery must be configured before it can be used. If you don't configure it, it isn't available. For more information, see E-Mail Settings - Reporting Services native mode (Configuration Manager).

If you want to turn off specific extensions, you can remove extension entries in the RSReportServer.config file. For more information, see Reporting Services configuration files and E-Mail settings - Reporting Services native mode (Configuration Manager).

After you remove a delivery extension, it's no longer available in the web portal or a SharePoint site. Removing a delivery extension can result in inactive subscriptions. Be sure to delete the subscriptions or configure them to use a different delivery extension before removing an extension.