Search code examples
sql-serverssisssis-2012sql-agent-job

How to check in SQL Job step whether SSIS package exists on the server or not?


I have a requirements to execute SSIS Package only if it is exists on the server where I am deploying all our SSIS packages.

Is there any way by which I can first check whether SSIS package exists on location from where SQL Job step is going to execute it and then execution of SQL Job step gets start?

I am deploying my package to Integration Services Catalogs.

Any help will be greatly appreciated.


Solution

  • After some research I was able to answer the question myself.

    For Integration Services Catalogs we have a separate database for SSIS Packages called SSISDB inside which we have a table named packages into which we can check whether the package exists on servers inside Integration Services Catalogs or not by below query.

    SELECT * FROM internal.packages WHERE name LIKE 'YourPackageName.dtsx'
    

    Hope this can help someone in future.