SSIS and SSRS upgradation process
With the introduction of new MSBI versions, we get excited with new features and love to be upgraded with latest. But it’s not that easy to upgrade our ecosystem of MSBI applications. Below are few options to do the tech refresh (either version up-gradation or migrating to new environment with different version of application).
- In place – In this option, we keep the same physical system (hardware) and upgrade the software versions and upgrade the applications. During this time (software up-gradation in main system), the MSBI applications go offline.
- Side-by-side – In this option, we keep the existing system as is and get a new system with desired version and do the applications up-gradation and deploy to the new system. Once verification of new system completes, we make the new as primary system and decommission the old system.
SSIS 2014 supports both package and project deployment mode. Below are the brief features of both deployment mode.
Project deployment mode
- The packages are treated as part of a project and they are linked to the project and properties.
- This mode needs a special database SSISDB, to be used for deployment and execution. We cannot deploy packages as part of file system.
- The packages are deployed as a project instead of individual packages. All or none package deployment happen in this option. We cannot deploy selective packages (in SSIS 2016, even projects can deploy individual packages i.e. added feature of selectivity).
- The packages can share project properties, parameters, connections etc.
Package deployment mode
- Even packages are part of a project they are maintained individually.
- The packages can be deployed either in database (msdb) or file system.
- The advantage of file system deployment is, we can have separate maintenance strategy of packages than database.
Please refer online material for more details and comparison of above modes.
We are discussing the scenario of version up-gradation of MSBI version 2008r2 to 2014 (package deployment mode).We are using the option of side-by-side up-gradation. The prerequisite is SSDT for VS 2015 to be installed.
Step 1 – Get the final source codes of BI applications.
Step 2 – Prepare new solution/project for respective old application. We can use the old solution also, but if we need to keep a separate version of solution, this step is needed.
Step 3 – Verify the SSIS packages and SSRS reports.
Step 4 – Prepare for build and release plan.
Detailed process mentioned as below
- We should use proper version of BI editor which matches with our target version, otherwise, we will face run time issues while deploying the code.
- Since we are using the TFS with VS 2015, the team used VS 2015 to open the SSIS and SSRS packages to add them in TFS. When we open packages and reports in VS 2015 (it will prompt for auto-upgrade to new version), they by default refer the latest version of SQL 2016. But our target is 2014. This creates a problem when we run the SSIS packages or SSRS reports.
- We should create a new project in VS 2015 and change the project target version property to use proper version i.e. in our case SQL 2014 for SSIS packages.
- Now we need to add the required SSIS packages which need to be up-graded to the new project. If we have many packages, it will be difficult to add them one by one. We can edit the project file and add the package name. We can use command prompt to get the package names and then use MS Excel to add the required other values needed to complete the project file with all the package names.
- Now we need to open the packages and check for any error.
- If the target version is SQL 2016, the VSTA version would be 14. But in our case the target is SQL 2014, so we need to downgrade the target to SQL 2014 and it has VSTA version 3.
- We may not be in risk if the package does not have any script task or script component.
- We can open the package file in notepad and search for tag VSTA and verify the version.
- When we change the target version from 2016 to 2014, we get error for script task and script component.
- When we open the script task , we observe the readonly and readwrite variables are blank. The script component, is not editable. So need to rewrite them, by taking the code from original file.
- For SSRS reports, we need to create a new project and change the target to appropriate version.
- Now we can add the data source (rds) and report (rdl) files.
- Verify the reports.
- If we open the reports in VS 2015, we can find a tag in the report with 2016 version. xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/
- We need to build the project and go to the bin folder and get the rds and rdl files which would be referring to 2010.
- These are the ones (rds and rdl files) to be deployed in the target system.
Executing parent child SSIS packages
- Creating Parent Child relationship
- We can create a parent package and call other package as child (by referring execute package task in control file).
- But in this way we cannot use the child’s own external configuration (xml) file. We need to add all the child’s configured values to the parent’s and from child package, we need to use parent package variable configuration option.
- This way we are tightly coupling the packages and the child cannot run independently.
- Dynamically loading the package and its config file.
- Using a batch file
- Batch file inside parent package.
- We need to use execute process instead of execute package.
- The batch file will have the package name and the config file.
- Batch file as a wrapper (powershell script can be used for better handling).
- We need to create a single batch file which calls the packages in order.
- In this way there is no relationship maintained.
- We can use if else condition to make sure one package need to be run only when the other succeeds.
- Batch file inside parent package.
Hope it helps you to upgrade applications with desired MSBI versions.
Note : If the target version is SQL 2016 for us, we may not need to do all the above conversions. But still need to verify the VSTA scripts in SSIS package to verify the c# / VB codes. It might happen certain framework related code may be unsupported with new versions.