Automic Workload Automation

  • 1.  Get Response from SQL into a Automic Variable

    Posted Jan 22, 2018 02:55 PM
    The following SQL

           USE SSISDB;

           GO

            Declare @execution_id bigint, @environment_id bigint, @etl_status varchar(100)

           EXEC SSISDB.catalog.create_execution

           @package_name=N'TestAutomic.dtsx'

           , @execution_id=@execution_id OUTPUT

           , @folder_name=N'TestAutomic'

           , @project_name=N'TestAutomic'

           , @use32bitruntime=False

           , @reference_id=NULL

          

           EXEC SSISDB.catalog.set_execution_parameter_value

           @execution_id

           , @object_type=50

           , @parameter_name=N'LOGGING_LEVEL'

           , @parameter_value=1

             

           EXEC SSISDB.catalog.start_execution @execution_id;

           SELECT @execution_id

    How do i get the execution _id to be a automic variable please provide example

    Thanks

    Doug



  • 2.  Get Response from SQL into a Automic Variable

    Posted Jan 22, 2018 03:07 PM
    I'm not sure why you would need that, but if you need to execute SSIS packages from SSISDB you might find this useful: https://community.automic.com/discussion/4878/how-to-execute-sql-server-data-tools-ssdt-2012-package-synchronously-using-sql-job



  • 3.  Get Response from SQL into a Automic Variable

    Posted Jan 22, 2018 05:18 PM
      |   view attached

    we were given this customized include script by the automic consultant during our installation to store the SQL output into a VARA. This works when the sql returns just 1 value. You could store upto 5 columns as the VARA allows only 5.

    The SQL would contain'SUBVAR;VARA_NAME;VARA-KEY;'  Just add this part to any sql and then include the INCLUDE object in the post process.

     

    SELECT 'SUBVAR;VARA_NAME;VARA-KEY;'||to_char(count(1)) as A
    FROM (query which selects the data)

    You could get that into a VARA and reference that VARA in other processes.

    Attaching the include.

     

    Attachment(s)

    txt
    Subvar-Include.txt   876 B 1 version