• Make the first step of the SQLAgent job a query against sys.fn_hadr_is_primary_replica to see if the database hosted locally is the primary or the secondary, and then use that result to either launch the SSIS package or to not do that.

    Thomas Rushton
    blog: https://thelonedba.wordpress.com