• Home
  • About
  • Blog
  • Speaking
  • Contact

Importing DLL into SSIS Integration Runtime

3 February 2021SQL StijnTroubleshootingNo Comments

I came across an issue this week when loading a DLL to the SSIS integration runtime. Loading MSI packages is quite straightforward however, loading a single DLL proved to be quite a challenge.

According to the documentation https://docs.microsoft.com/en-us/azure/data-factory/how-to-configure-azure-ssis-ir-custom-setup you should provide a blob container in which you put a CMD task called main.cmd, in this you can then run your packages/dll to import them.

What I would like to achieve today is import the DLL for Analysis Services, which is the Microsoft.AnalysisServices.DLL.

We start off by creating a blob container and in this blob container we place the DLL which we need.

Then we will have to create a main.cmd which will load the DLL, we cannot use regsrv32 for this or msiexec, the way to go is using gacutil, which is included in the vs SDK.

The code below is the content for main.cmd, you will need to alter this for your own dll’s

@echo off

xcopy /F /Y Microsoft.AnalysisServices.dll “%ProgramFiles%\Microsoft SQL Server\140\DTS\Tasks”

REM error handling

if %ERRORLEVEL% neq 0 (

echo Failed with ExitCode %ERRORLEVEL%

exit /b %ERRORLEVEL%)

echo “Complete copied to x64 folder”

xcopy /F /Y Microsoft.AnalysisServices.dll “%ProgramFiles(x86)%\Microsoft SQL Server\140\DTS\Tasks”

REM error handling

if %ERRORLEVEL% neq 0 (

echo Failed with ExitCode %ERRORLEVEL%

exit /b %ERRORLEVEL%)

echo “Complete copied to x86 folder”

gacutil\gacutil /i Microsoft.AnalysisServices.dll /f

REM error handling

if %ERRORLEVEL% neq 0 (

echo Failed with ExitCode %ERRORLEVEL%

exit /b %ERRORLEVEL%)

echo Successfully installed Analysis Services DLL Task.

One of the first mistakes I made was naming the file Main.CMD, the start of the script is case sensitive so make sure you explicitly write main.cmd

The next issue I had was that I need the folder for gacutil.exe, to get around this I have added the gacutil.exe and all dependent files to the container which will be doing the custom setup.

This is what your container should look like.

In the background, any content you add to the container will be copied to a folder (C:\setup) on the VM’s hosting the SSIS IR, so in the main.cmd you are able to manipulate the environment by moving files around or loading new dll’s.

After these steps, you can use the DLL you loaded into the SSIS IR.

Tags: Azure Data Factory, SSIS, SSIS Integration Runtime

Related Articles

Azure Synapse SQL Pools: Loading Staging Tables

16 December 2020SQL Stijn

Building a Modern Lakehouse Data Warehouse with Azure Synapse Analytics: Moving your Database to the lake

14 June 2022SQL Stijn

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Recent Posts

  • Building a Modern Lakehouse Data Warehouse with Azure Synapse Analytics: Moving your Database to the lake
  • Azure Synapse Dedicated SQL Pools: Workload Management
  • Synapse Spark – Playing with Data Frames with Python
  • Synapse Spark – Reading CSV files from Azure Data Lake Storage Gen 2 with Synapse Spark using Python
  • Azure Synapse Analytics – Serverless SQL Pools: Data Elimination

Recent Comments

    Archives

    • June 2022
    • December 2021
    • May 2021
    • April 2021
    • March 2021
    • February 2021
    • January 2021
    • December 2020
    • August 2016
    • July 2016
    • March 2016
    • February 2016
    • December 2015
    • October 2015
    • August 2015
    • March 2015
    • December 2014
    • November 2014
    • July 2014
    • February 2014
    • January 2014
    • December 2013

    Categories

    • Azure Synapse Analytics
    • Building a Modern Lakehouse Data Warehouse
    • Geen categorie
    • MS PDW
    • SQL 2016
    • SQL Maintenance
    • SQL Server Migration
    • SQL Server Misconfiguration Chronicles
    • SQL2014
    • Troubleshooting

    Contact Stijn now


    © SQL Stijn 2017 - Privacy Policy - Cookie Policy
    Manage Cookie Consent
    To provide the best experiences, we use technologies like cookies to store and/or access device information.
    Functional Always active
    The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
    Preferences
    The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
    Statistics
    The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
    Marketing
    The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
    Manage options Manage services Manage vendors Read more about these purposes
    View preferences
    {title} {title} {title}