HelloI have a instance of SSRS on 2012 and I need to migrate it to another server which has SSRS 2016. Can I use RS.EXE to migrate SSRS from one server on SSRS 2012 to another server on SSRS 2016 and is this the best method. Both will be Native Reports.
You can use rs.exe utility to do this. Microsoft has a migration script on GitHub to use with rs.exe. You can find information on this and a link to the script in the following documentation:
Sample Reporting Services rs.exe Script to Copy Content between Report Servers
The rs utility is a command-line s tool that comes with SQL Server. This utility compiles and runs a Visual Basic .NET script file that can be used for a variety of tasks. We will use it to specify how a report should be deployed to a Reporting Services environment. You can use it to publish reports, manage reporting services folders and report properties, as well as a number of other Reporting Services tasks. By using the rs utility and a Visual Basic .Net script, you can automate most, if not all, of your manual Reporting Services processes.
There are two components I will need to code in order to the use the rs utility to deploy the report. The first file that I need to create is a command-line batch script that executes the rs utility. This script will define some parameters and then executes the rs utility. This script also will define some parameters that will be passed to the second component of the rs utility, which is a Visual Basic .Net script file. This script file will contain the code needed to read in my report and then deploy the report to my reporting services instance. This code will be placed in a file with an .rss extension.
Note that if I were building a repeatable script I would replace the environment variables in the above script with parameters (%1, %2, %3 and %4). That way you could have a command shell script that could be driven with different parameters to make the process more flexible. Having this flexibility would allow you to call the script with different parameters and then based on the parameters the process would deploy a different report and/or deploy to different Reporting Services machine or directory. Alternatively, if you where familiar with some other scripting tool that could make calls to the Reporting Services2005 Class then you easily create an automated script to deploy reports.
Now that you understand how the command shell script is used to execute the rs utility, lets look at my Visual Basic .NET code that does the actual migration of my rdl file into a Reporting Services folder. Here is a copy of the Deploy1.rss code:
Most Reporting Services environments will be setup to have separate development, test and production locations on different servers, or in different folders on the same server. Development, test and production environments might also have different data source names. You can avoid these complications by creating a script with the ReportingService2005 class, to migrate reports from one server to another, or folder to folder. This will allow you to automatically switch a data source, or other reporting services properties as a report moves through your development life cycle.
You might have noticed that I got an error related to a missing shared data source with my DemoReport1.rdl file when I deployed into my /Dev/MyReports folder. To make sure that my report does not fail when I try to run it, I need to change the data source to a shared data source that lives in the target environment. I can do that by modifying my example slightly in two places. I must modify my shell script so I can pass another parameter to my Visual Basic .Net code that identifies my shared data source. I also need to modify my .Net code to set the data source in my report definition at some point during the deployment.
For my last example let me show how you can use the rs utility to copy all reports from one Reporting Services folder and another folder. Below is the VB Script code for this example. Before you look at this VB Script I probably should mention some of the limitations of this script:
Just like in my prior examples this code is executed by using a command shell script that passes parameters via the -v option of the rs utility. Here is the command shell script used to execute the VB script file above:
I have only shown you a few things that you can do with the rs utility and some Visual Basic .NET code. Just think what you could do with a full-blown desktop or server-based .NET deployment application.
If you are currently using a manually process to migrate your rdl reports between your Reporting Services folders or other environments, then you should consider how to exploit the Reporting Service 2005 class library and web service to perform those migrations. By using the ReportingServices2005 class library, you can create a number of different routines to migrate and backup your reports. Simplify your deployment processes by building an automated deployment process too, using the rs utility.
In setting up a new machine at work I had neither tool installed initially and the dependencies started to bug me. Looking at the SSRS web service I noticed a CreateReport method so I created the below function to deploy the reports using PowerShell alone:
What I am wondering now is why use the RS Utility at all if it is that easy to deploy reports using just PowerShell and the SSRS web service? My understanding is that rs.exe is just a thin wrapper around the web service, no? What does RS add? Using this method seemed to produce the same results without the extra dependencies but maybe I am missing something?
3a8082e126