Can I store a batch file in Azure file share and execute it from there to call a SSIS package in Azure ?

Aarthi 20 Reputation points
2024-06-26T19:20:18.51+00:00

I have batch files that call SSIS pkgs that are currently in the same network file share in my on premise network . The batch file calls and runs the ssis pkgs. Can this be migrated to azure file services? can Azure file services store and execute batch files? will there be any issue connecting to the SSIS pkgs?

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,219 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andreas Baumgarten 103.5K Reputation points MVP
    2024-06-26T19:51:17.29+00:00

    Hi @Aarthi ,

    basically Azure Files works like a "serverless" file share with the same features like a file share of an on-premises server.


    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards

    Andreas Baumgarten

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Michael Taylor 51,016 Reputation points
    2024-06-26T19:52:07.1+00:00

    Can it store batch files? Sure it can store any files.

    Can it run them? No. In order to "run" a file (any file) it must be associated with a program that can run. A file server has no "programs to run" and therefore cannot do anything with the file other than store it. Of course if you were to open that file on a machine then it would download the file from the server and then run it on the local machine.

    So to "run a batch file" you'd need to have a machine that can connect to the file service, download the file and then run it in a console window. A VM could do it but that seems like overkill.

    Personally I don't know why you're using a batch file. If you need to run a "script" in order to execute the package then a scripting file like Powershell would be a better choice but it has the same restrictions. However if you can "run" the same commands from any language then an Azure solution would be to create a function app. But this would mandate understanding when you need to run the script and whether it requires user input.

    If you require user input then most options are off the table. If you need to run the script at certain intervals then can you not create a SQL job that runs on your SQL system that runs the SSIS package automatically? This is the best approach and eliminates anything outside SQL. This is traditionally how you'd run SSIS jobs on a schedule. If for some reason that isn't an option then an Azure function app that was timer based would also work. It is similar to having task scheduler running. But function apps don't run batch files so you'd need to convert it.

    If you need user input or you want to run it on demand then the only remaining Azure option that comes to mind is a trigger-based function app. Again, you'd have to convert it to an app and not a batch file but you could then at least trigger the app using HTTP and if you needed to pass data then you could pass that information to the function app as part of the request.

    0 comments No comments