SSISDB Catalog

I'm just getting started with Integration Services in SQL Server 2012, and am a bit confused as to how things work now, especially with the SSIS catalog.
So my question is does SSIS no longer use MSDB to store packages? My old projects all deploy to a folder in MSDB in SQL Server 2008 using BIDS Helper. What does the SSIS catalog actually do?
Specifically, I ran the upgrade wizard on my current SSIS packages. The first issue is tht I have a ton of Execute Package packages, and the upgrade wizard just chose a path for the child package being called, which was not what the path I wanted.
For example, the originl path for one of the packages being called by an Execute Package task was \OLSON BI\<package name>. The wizard just chose <package name> as the path. I'm going to have te same folder structure on the new instance of SQL
Server 2012. So now I have to go in and manually change every one of those packages.
After the wizard, I now have 275 packages sitting in the SSISDB database/catalog. So now how do I get those into MSDB?? 
Any hints would be appreciated!
A. M. Robinson

SSIS 2012 still has the"legacy" deployment model that allows to store packages in MSDB (http://technet.microsoft.com/en-us/library/hh213290.aspx).
See
a pic http://goo.gl/bPi6LO
Using the "Catalog" SSISDB is preferred. Catalog has many features. I suggest you pick a book to learn SSIS 2012 as it is a too broad of a topic to cover in a forum reply.
SSDT 2010 or Visual Studios 2010 to 2012 can be used to author SSIS 2012 packages
Arthur My Blog

Similar Messages

  • SSIS Service and SSISDB Catalog in SQL 2012

    I have currently production Server cluster (DB Engine / SQL Agent) with 2 nodes (active/active). It has SSIS installed on it.
    Also another server built in a VM environment dedicated to SSISDB with SSIS installed to move away all the ETL processing/load from the production server.
    We are facing some slowness in executing SSIS and looking at moving just the SSISDB from the VM machine to the production cluster. 
    Here are my questions and concerns
    1. What is the interaction between SSISDB and SSIS Service in the case of  package executions through the SSISDB Catalog ? Can I have just SSISDB and not have the SSIS service running to execute these packages?
    2. Can I scale out the SSIS with SSIS Service running on one host and the SSISDB in another host?
    Any input would be appreciated.
    Thanks

    Hi GiriATL,
    Question 2: No. We cannot create SSISDB catalog database without installing SSIS service. For more information, you can refer to the following blog:
    http://blogs.msdn.com/b/pfebi/archive/2013/07/25/can-i-use-ssdb-without-installing-ssis.aspx 
    Question 1: As said above, the SSISDB catalog database cannot be created or work without installing SSIS. To execute a package, both DTExec utility and SSIS runtime are required, and both of them are installed by SSIS service. However, during
    the execution of a package, the SSIS service is not required to be running. The SSIS service is a Windows service that monitors the SSIS packages that are running, and the SSIS service also manages the storage of SSIS packages. For more information, please
    see:
    http://support.microsoft.com/kb/942176 
    Saying you have to install the service is not 100% correct. You have to install Integration Services, which installs DTEXEC, the runtime and the SSIS service. The service itself is a byproduct necessary to support the package deployment model. You can disable
    the service without any issue.
    MCSE SQL Server 2012 - Please mark posts as answered where appropriate.

  • SSISDB.Catalog.executions

    Hello Everyone,
    When I try to run SSISDB.Catalog.Executions from the Management Studio, it runs with no problems.  My SSIS package executes.  However, when I try to run it from a stored procedure being Activated from Service Broker, nothing happens.  There
    are no entries in SQL Server Logs, either.  My account is a member of the SysAdmin role on SQL Server.
    Are additional permissions needed to run this job automatically as opposed to interactively?  Or am I missing something else?
    JamesNT
    ATTENTION MODERATORS: I do indeed mark responses as answers after I have had time to test said response and verify that it works. Please do NOT assume you speak on my behalf by marking responses to my questions as answers. Mass-proposing responses as answers
    gets on my nerves, too. Thank you.

    To execute catalog.Executions you need one of the following permissions
    READ permission on the instance of execution
    Membership to the ssis_admin database role
    Membership to the sysadmin server role
    Note: Row-level security is enforced; only rows that you have permission to view are displayed. 
    Source
    The service-broker procedure or executor needs to be authorized to execute these commands. if you are accessing it from different database then you need to enable Cross
    database chaining.

  • Migrate/Upgrade [SSIS Configurations] table 2005 to SSISDB Catalog in 2012

    Hi Everyone,
    Our SSIS are still in 2005 and we are using the SSIS Configurations table to store our parameters. Our set-up is based from this
    link .
    Now, we are moving to SSIS 2012 and wanted to maximize the SSISDB Catalog. 
    I just want to know how can we migrate this existing SSIS Configurations  table to the new SSISDB Catalog to minimize the impact.
    Also, if you guys could provide a detailed steps that would be awesome.
    Many thanks.

    Hi Vinxster,
    According to your description, you want to upgrade SSIS 2005 packages to SSIS 2012, right?
    After we upgraded SSIS 2005 packages to SSIS 2012, configurations are not upgraded. For example, a configuration file may reference an old driver that is no longer used in 2012, so we would have to manually upgrade these packages. For detail information,
    please refer to the step by step in the link that sathiya.s has provided as below:
    http://www.bidn.com/blogs/DustinRyan/bidn-blog/2610/upgrade-2005-2008-ssis-packages-to-2012-like-a-boss
    http://www.sqlservercentral.com/blogs/dknight/2012/05/16/upgrading-packages-to-ssis-2012/
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.
    Wendy Fu
    TechNet Community Support

  • SSIS Catalog views are not executing from PROC calling from a service broker

    Hi Exprets,
    I have a package deployed on SSISDB (the new concept in MS SQL 2012, SSIS catalogs). I have t-sql code in which i will be able to execute SSIS package in SSISDB with no problems. But if i place the same t-sql code inside of a procedure which will be called
    by a service broker , the code is not executing.
    I am using the following code to execute a package in the SSISDB catalog
    Declare @execution_id bigint
    EXEC [SSISDB].[catalog].[create_execution] @package_name=N'LoadToABC.dtsx',
    @execution_id=@execution_id OUTPUT, @folder_name=N'ABC', @project_name=N'LoadToABC',
    @use32bitruntime=False, @reference_id=Null
    DECLARE @var0 NVARCHAR(200)
    = N'D:\MyData\SampleText20120830100001.txt'
    EXEC [SSISDB].[catalog].[set_execution_parameter_value] @execution_id, @object_type=30,
    @parameter_name=N'strFileName', @parameter_value=@var0
    EXEC [SSISDB].[catalog].[start_execution] @execution_id
    This code executes if run it alone or placed in a regular stored procedure , but not executes if i palce this same code inside of a procedure which is being called/executed by a service broker call like this:
    CREATE QUEUE dbo.SampleQueue
    WITH STATUS=ON, ACTIVATION
    (STATUS = ON, MAX_QUEUE_READERS
    = 1,
    PROCEDURE_NAME = spMessageProcSample,  
    EXECUTE AS OWNER);
    The problem occurs if we call the SSIS catalogs inside a proc which will be calling through a service broker queue.
    I am running all these steps on my local instance of SQL SERVER 2012 in which i am the administrator.
    Please advice where i am doing wrong ?
    Thanks,
    Jyodhu.

    Hi ArthurZ,
    Thanks for reply. What i ment was i tried with all the "EXECUTE AS" options. but no luck.
    Can you please explain step by step if you can ? That would be great help.
    This is the error message from server log.
    Message
    The activated proc '[dbo].[spMessageProcSample]' running on queue 'FileTableDB.dbo.SampleQueue' output the following:  'The server principal "USA\cccsat1nmg" is not able to access the database "SSISDB" under the current security context.'
    I logged in with WIndows authentication (Admin) and i created all the objects including Integration services Catalog.
    Thanks,
    Jyodhu.

  • SSIS 2012: Integration Services Catalog not showing data for most recent executions

    Techies--
    Under a previous deployment of an SSIS package, I was able to go to the Integration Services Catalog, look under the  folder-->project--> package  then right click and request a standard report for all executions. The report would display
    the execution details.
    Today a colleague recently deployed a newer version of the same package to a test server... which is failing from a job set up via sql agent.  I went to look at the root cause by going to the Integration Services Catalog to review the report. No execution
    data appears.  I looked at the filter--compared it to the filter I have set on the production copy of the stable version. The folder name, package name and project name match. Both have a status of 'All'. The date range is the same (2/19 - 2/25). 
    In fact, I went back to the test deployment and changed the date range to the date of the last failure (1/30).  Now I see data only from 1/30 but none for today's execution.
    Something must have happened in the deployment process--but what? How do I debug this issue with the reports--but even more importantly,  how do I get to the raw execution data to see what the story is on the failed execution itself?

    @Arthur, thanks for responding. In a nutshell, I searched through the ssisdb.catalog.event_messages table to determine roughly the same thing you determined--an execution for that package (or for that matter, any misnamed package) with today's timestamp
    simply never occurred--even though the job agent log appeared to indicate it had.
    I re-deployed the package ... forced an execution with an interactive run from the catalog... and viola! The execution info appeared through the standard reports as expected.
    Any idea where I could/should look for a wayward deployment? (BTW, the report for validations showed no data either on that first deployment).

  • Sql Server 2012 Integration Services Catalog views - cpu usage history

    Hi,
    I am new to SQL Server 2012. I have deployed and executed a SSIS package on the Integration Services catalog.
    Now, to analyze the performance of the executed package I wish to query the SSISDB catalog views to retrieve the cpu & memory usage history. Please let me know in which catalog view/table I can find this info. 
    There is a column named "Process_Id" in the "catalog.operations" table. Can we tie this id to the Sql Server pid/kid and then retrieve the cpu
    usage history ?
    ** I am using Sql Server 2012 **
    Thanks

    Hi All,
    Thanks all for your inputs. One final question - 
    As I mentioned earlier, the Sql Server 2012 catalog views
    DO NOT  capture various performance metrics
    (e.g. cpu usage history, memory usage history etc) of
    an executing SSIS package . However, I am cognizant of the fact that it is possible to retrieve this exact info
    (ie. cpu usage history, memory usage history etc) for
    a Sql-Server internally generated SPID (present in [sys].[dm_exec_sessions]).
    The approach is to find a way to join/relate the catalog provided "Process_id" to the Sql Server generated internal SPIDs in a session. If I am successful in joining these 2 process ids together,
    it will allow me to gather all the information available from both sides - ie the catalog views + the sql-server internal process SPIDs of the session. Thus, by tagging the SSIS pprocess_id to
    its sql-server session it will allow to retrieve the resource usage details by the executed SSIS process.
    **Please also let me know if the above could be achieved by any other approach.
    Any help is appreciated.
    Thanks

  • SSISDB VS MSDB VS FILE SYSTEM

    Hi,
    Does SQL server 2012,no more prefer MSDB and File system deployments?
    If not migrated what are implications in future??
    is it really necessary to upgrade now??
    when I use Smo, why does my package executed using SSISDB resources rather than using client resources??
    Regards,
    Navin
    Navin.D http://dnavin.wordpress.com

    BOL: "The SSISDB catalog is the central point for working with Integration Services (SSIS) projects that you’ve deployed to the Integration Services server. For example, you set project and package parameters, configure environments to specify
    runtime values for packages, execute and troubleshoot packages, and manage Integration Services server operations.
    The objects that are stored in the SSISDB catalog include projects, packages, parameters, environments, and operational history.
    You inspect objects, settings, and operational data that are stored in the
    SSISDB catalog, by querying the views in the SSISDB database. You manage the objects by calling stored procedures in the
    SSISDB database or by using the UI of the SSISDB catalog. In many cases, the same task can be performed in the UI or by calling a stored procedure.
    To maintain the SSISDB database, it is recommended that you apply standard enterprise policies for managing user databases. For information about creating maintenance plans, see
    Maintenance Plans.
    The SSISDB catalog and the SSISDB database support Windows PowerShell. For more information about using SQL Server with Windows PowerShell, see
    SQL Server PowerShell. For examples of how to use Windows PowerShell to complete tasks such as deploying a project, see the blog entry,
    SSIS and PowerShell in SQL Server 2012, on blogs.msdn.com.
    For more information about viewing operations data, see Monitoring for Package Executions and Other Operations.
    You access the SSISDB catalog in SQL Server Management Studio by connecting to the SQL Server Database Engine and then expanding the
    Integration Services Catalogs node in Object Explorer. You access the
    SSISDB database in SQL Server Management Studio by expanding the Databases node in Object Explorer. "
    LINK: http://technet.microsoft.com/en-us/library/hh479588.aspx
    BOL reference: catalog.executions (SSISDB Database)
    Kalman Toth Database & OLAP Architect
    Free T-SQL Scripts
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Fetch SSIS error through SQL Server Agent JOB

    Hi,
    I am trying to fetch eventmessages from catalog.eventmessages view in SSISDB inside a sql job which executes a package. This utility is supposed to send an email with the description of failure reason and step whenever the JOB fails. But I could not find
    a way to reference a package in SSISDB with the corresponding JOB through SQL query.
    sysjobsteps stores the step info, but how can I refer to the SSIS package using the info from this table or any other table. Please provide an expert view for this problem.
    Regards
    Mohit

    sysjobsteps stores the step info, but how can I refer to the SSIS package using the info from this
    table or any other table
    Can you try like this? 
    SELECT e.package_name,e.message
    FROM msdb.dbo.sysjobsteps js
    inner join SSISDB.catalog.event_messages e
    On js.command collate database_default like'%\' + e.package_name collate database_default + '%'
    --WHERE e.event_name ='OnError'
    Uncomment the WHERE clause if you want to specifically look for errors
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How do I install (just the required assembles without server licence) client library to a client machine so that I can invoke SSIS/SSAS 2012 remotely?

    We are trying to figure the easiest way to install client lib on a machine to call SSIS/SSAS remotely (to a SQL Server 2012).
    We have some .net code referencing SMO/AMO and Microsoft.SqlServer.Management.IntegrationServices.
    1) For SMO, I found out this and it is quite clear about how to install on a client machine:
    Installing SMO (SQL Server Management Objects (SMO))
    http://msdn.microsoft.com/en-us/library/ms162189(v=sql.110).aspx
    2) For AMO (analysis management object), I found out this but I did not see a clear instruciton of what and how to install on the client machine:
    http://technet.microsoft.com/en-us/library/ms124924(v=sql.110).aspx
    3) For SSIS call, I did not find anything talking about the client installation.
    Can someone help us?
    Thanks.

    Hi Sofiya,
    Thank you so much for your help.
    For SSIS call, we are using 
    Microsoft.SqlServer.Management.IntegrationServices.dll
    to call package deployed to SSISDB catalog at remote server using some .net codes.
    I have few questions:
    1) What is the difference between
    Microsoft.SqlServer.Management.IntegrationServices.dll
    and the dll you mentioned:
    Microsoft.SqlServer.IntegrationServices.Server.dll
    2) If we install SSMS, can we also get Microsoft.SqlServer.Management.IntegrationServices.dll? Put another way, if we install SSMS, will Microsoft.SqlServer.Management.IntegrationServices.dll be registeredin GAC?
    3) If we install  Microsoft.SqlServer.Management.IntegrationServices.dll at client machine, I assume we don't need to licence it. (Note: SSIS package itself will be running from the remote server, NOT the client machine which is used to invoke
    the SQL 2012 packages).
    Best regards,
    Steven Rao
    Hi Steven Rao,
    Yes, you are right. When you want to start a SSIS 2012 package from a .Net application,
     you need to reference the assembly of Microsoft.SqlServer.Management.IntegrationServices .dll. The Microsoft.SqlServer.Management.IntegrationServices namespace contains the classes and interfaces to manage the Integration Services catalog
    on an instance of SQL Server. It is only available in the GAC. For more information, see:
    http://microsoft-ssis.blogspot.com/2013/01/call-ssis-2012-package-within-net.html
    I also do a test, if you  install the media of SQL Server Management Studio, usually, these assemblies are located in following folder as screenshot.
    In the folder,  C:\Windows\assembly
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • How to deploy parent child SSIS package to production/live server.

    Hi all I am very new to SSIS. I have got SSIS package developed by some other guy this package reads data from flat files and stores to database after mapping.
    Flow: 1) First package extract records from flat file and stores in table. 2) Then it calls child package using Execute package tasks. 3) Then child package do some calculations and update the database table.
    SSIS is using Environment variable to get database information.
    Every thing is working fine but now I want to deploy this package to my client's server.
    Ques: Do I need to copy and paste files from bin folder and paste on clients machine?
    What I Tried: I copy files from bin folder and placed on my local computer. Then I create a job in MSSQL and run the job. Package runs perfectly. But Later I changed location of my project and problem starts job stops working.
    Issue: Error says location of child package is not available(As I changed position of my project files)
    Kindly suggest what to do. 

    Hi Anuj,
    The issue occurs because the path of the child package is invalid once you change the location of the project. When configuring the child package reference for Execute Package Task, we can configure it to use Project Reference or External Reference:
    As for the Project Reference, it is used when the project is not deployed or the project to deployed to the SSISDB catalog in SSIS 2012.
    As for the SQL Server External Reference, it is used when the project or child package is deployed to the msdb database. The File System External Reference can be used no matter whether the child package is deployed or not.
    Since the SQL Server Agent job runs correctly after you copied the bin folder to the local computer, it seems that the Execute Package Task uses File System reference and reference to a mapped network driver which maps to the folder that contains the original
    IS project. Otherwise, the SQL Server Agent job should fail because of the invalid path of the child package even if you don’t change the location of the original IS project.
    In your scenario, after copying the bin folder to your local computer, it is recommended that you install the child package to the File System or msdb on your local server, and then edit the parent package in BIDS/SSDT to change the reference of the installed
    child package from the File System or SQL Server storage. After that, you can but don’t have to install the parent package.
    Regards,
    Mike Yin
    TechNet Community Support

  • Issue during Running Package using Sql Agent

    hi all
    I have an issue  when I deployed Package and Run package using sql agent.
    before a Successfully Run Package without Any error. but in job It gives me error.
    Executed as user: abc\sqlserver. Microsoft (R) SQL Server Execute Package Utility  Version 10.50.4000.0 for 64-bit  Copyright (C) Microsoft Corporation 2010. All rights reserved.    Started:  08:28:11  Error: 2014-02-12
    08:28:11.86     Code: 0xC0016016     Source:       Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified
    state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.  End Error  Error: 2014-02-12 08:28:11.97     Code: 0xC0202009    
    Source: PAckageNameReport Connection manager "....................."     Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E4D.  An OLE DB record is available. 
    Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80040E4D  Description: "Login failed for user .....".  End Error  Error: 2014-02-12 08:28:11.97     Code: 0xC020801C    
    Source: Import into Excel OLE DB Source [1]     Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "....................." failed
    with error code 0xC0202009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.  End Error  Error: 2014-02-12 08:28:11.97     Code: 0xC0047017    
    Source: Import into Excel SSIS.Pipeline     Description: component "OLE DB Source" (1) failed validation and returned error code 0xC020801C.  End Error  Error: 2014-02-12 08:28:11.97     Code: 0xC004700C    
    Source: Import into Excel SSIS.Pipeline     Description: One or more component failed validation.  End Error  Error: 2014-02-12 08:28:11.97     Code: 0xC0024107     Source: Import into Excel     
    Description: There were errors during task validation.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  08:28:11  Finished: 08:28:11  Elapsed:  0.14 seconds.  The package execution failed. 
    The step failed.
    I'm using Sql Authentication.
    Kindly Help.
    thanks

    Hi BI_group,
    According to the error message, the issue may occur due to two possible reasons: protection level of the package or the 32-bit/64-bit driver issue.
    For the first possible reason, it may be that package still uses the default protection level EncryptSensitiveWithUserKey after it is deployed, however, the SQL Server Agent job runs under a different user account. To avoid the issue, you can re-deploy the
    package and set the package protection level to EncryptSensitiveWithPassword or DontSaveSensitive during the deployment. If it is set to EncryptSensitiveWithPassword, we need to configure the Execution options of the job step to use the
    /decrypt password option in the DTexec utility command line to decrypt the encrypted data. If the package is deployed to the SQL Server or SSISDB catalog, we can set the protection level to Rely on server storage for encryption or ServerStorage.
    If it is not the case, check whether it is caused by the 32-bit/64-bit driver issue. For a 64-bit SSIS server, it uses 64-bit drivers by default, however, BIDS/SSDT uses 32-bit drivers unless the Run64BitRuntime property of the IS project is set to true.
    In the BIDS/SSDT, check the Run64BitRuntime property to see if it runs in 32-bit or 64-bit runtime. This enable us to judge whether we need to check the “Use 32 bit runtime” option for the job step.
    Regards,
    Mike Yin
    TechNet Community Support

  • SSIS-Execute Process task Error _File/Process "\\Servername\Foldername\batfile.bat" is not in path

    Hi Sir,
    I have designed the SSIS Package in 2012 Version. and i have deployed into the Integration Server,using Project Deployment Model.
    In the SSIS Pacakge we are calling the batch file using Execute Process task.
    when i am Executing the SSIS pacakge using Visual Studio(Sql Server Data tools) which is working fine.
    When i Execute the Pacakge uisng Sql server Management Studio,after the Deployment i am getting the below Error message.
    ExecProcess task:Error: File/Process "\\Servername\Foldername\batfile.bat" is not in path.
    Thanks for your time.
    Regards
    Prasad

    Hi Prasad,
    When you say executing the package in SSMS, I think you right click on the package and execute it manually rather than execute it through SQL Server Agent job, right? How did you execute the package from the SSMS on DEV server? Have your also deployed the
    SSIS project to the SSISDB catalog on DEV server or you used SSMS tool on DEV to connect to the QA server to execute the package?
    When you log into the Database Engine instance, make sure the credentials you used has access on the shared folder which hosts the .bat file. Besides, I think the issue may be caused by the Windows UAC feature which may lower the permissions level of an
    administrator to a standard user. So, I suggest that you run the SSMS as administrator to see if it works.
    Regards,
    Mike Yin
    TechNet Community Support

  • Problem with execute SSIS package from stored procedure

    Hi,
    I would like to execute SSIS package from stored procedure. Therefore, I implemented sp which exec SSISDB.CATALOG.CREATE_EXECUTION method. When I try to test it from SSMS on remote server, I got error that
    I was able to solve by adding “WITH EXECUTE AS …”. Then I got another error: The server principal "Domain\user" is not able to access the database "SSISDB" under the current security context. On Internet, I found a couple post that describe
    how to access SSIS catalog (one of them by Ke Yang -
    http://blogs.msdn.com/b/mattm/archive/2012/03/20/ssis-catalog-access-control-tips.aspx). It didn’t help. I’m still getting the error message.
    How to debug this issue?
    Any suggestion?
    Thanks
    SQL Server 2014 BI

    SSMS does not propagate user credentials thus the error
    Arthur
    MyBlog
    Twitter

  • DTEXEC does not fail when SSIS package fails

    I need to run my SSIS 2012 packages through the catalog with DTEXEC. This works very well, except that if my SSIS package fails, DTEXEC does not fail. I need DTEXEC to fail, so my scheduler knows that there is an error.
    I use the following command:
    dtexec /ISServer "\SSISDB\MyFolder\MyProject\MyPackage.dtsx" /Ser MyServer /Par $Package::Partition;201412 /Env 5
    When I check the status of the run in the Catalog, it is failed.
    When I used SSIS 2008, I had no problem getting DTEXEC to fail when the packages failed.

    I've had the same problem, and come up with the following prototype for a SQL Script which I run in our JAMS Enterprise Scheduler. It uses SSISDB stored procedures to start the SSIS package and polls every 5 seconds to report any messages, and final
    status code of the package. JAMS parameters are delimited by << >> symbols, and will need to be changed for your scheduler/batch process. I guess the script could be converted to a stored procedure. I'm also hoping it will work with SQL High
    Availability groups to ensure the SSIS package runs on the server that's hosting the active database.
    DECLARE @execution_id BIGINT
    DECLARE @status INT= 1
    DECLARE @Event_Message_id BIGINT= 0
    DECLARE @Last_Event_Message_id BIGINT= 0
    DECLARE @message_time DATETIME2(7)
    DECLARE @message NVARCHAR(MAX)
    --Create a SSIS execution for the required SSIS package and return the execution_id
    EXEC [SSISDB].[catalog].[create_execution] @package_name = N'<<pPackageName>>.dtsx',
        @execution_id = @execution_id OUTPUT, @folder_name = N'<<pSSISFolderName>>',
        @project_name = N'<<pSSISProjectName>>', @use32bitruntime = <<p32Bit>>, @reference_id = NULL
    RAISERROR('Starting SSIS package <<pPackageName>> with execution_id %I64d on server %s',0,0,@execution_id,@@SERVERNAME) WITH NOWAIT
    --Set the logging level 0-none, 1-basic (recommended), 2-performance, 3-verbose
    EXEC [SSISDB].[catalog].[set_execution_parameter_value] @execution_id,
        @object_type = 50, @parameter_name = N'LOGGING_LEVEL',
        @parameter_value = <<pLogging_Level>>
    --Start the package executing
    EXEC [SSISDB].[catalog].[start_execution] @execution_id
    WHILE @status IN ( 1, 2, 5, 8 ) --created (1), running (2), canceled (3), failed (4), pending (5), ended unexpectedly (6), succeeded (7), stopping (8), and completed (9).
        BEGIN
            WAITFOR DELAY '00:00:05'
        --Get the status to see later if we've finished
            SELECT  @status = status
            FROM    SSISDB.catalog.executions
            WHERE   execution_id = @execution_id 
        --Are there any event messages since we last reported any?
            DECLARE curEventMessages CURSOR FAST_FORWARD
            FOR
                SELECT  event_message_id ,
                        message_time ,
                        message
                FROM    SSISDB.catalog.event_messages
                WHERE   operation_id = @execution_id
                        AND event_message_id > @Last_Event_Message_id;
            OPEN curEventMessages
            FETCH NEXT FROM curEventMessages INTO @Event_Message_id, @message_time,
                @message
            WHILE @@FETCH_STATUS = 0
                BEGIN
            --We've found a message, so display it - watch out for % signs in the message, they'll cause an error if we don't replace them
                    SET @message = CONVERT(NVARCHAR(MAX), @message_time, 113)
                        + ' ' + replace(@message,'%',' percent')
                    RAISERROR(@message,0,0) WITH NOWAIT
                    SET @Last_Event_Message_id = @Event_Message_id --Make a note that we've reported this message
                    FETCH NEXT FROM curEventMessages INTO @Event_Message_id,
                        @message_time, @message
                END
            CLOSE curEventMessages
            DEALLOCATE curEventMessages
        END
    --@Status indicates that package execution has finished, so let's look at the outcome, and error if there's a problem
    IF @status = 7
        RAISERROR('Package Succeeded',0,0)
    ELSE
        IF @status = 9
            RAISERROR('Package completed',0,0)
        ELSE
            IF @status = 3
                RAISERROR('Package Cancelled',16,1)
            ELSE
                IF @status = 4
                    RAISERROR('Package failed (see error message above)',16,1)
                ELSE
                    IF @status = 6
                        RAISERROR('Package ended unexpectedly',16,1)
                    ELSE
                        RAISERROR('Package ended with unknown status %i',16,1,@status)

Maybe you are looking for

  • Cant copy and paste text or move by paragraph in email compose window

    Hi, win8, heaps of memory, TB 24.6.0, various add-ons The copy and paste just stops functioning sometime - when I select ctrl+c then ctrl+v nothing happens. Also, ctrl+ left /right arrows will move by word, but up/down arrows do nothing. Both the cop

  • Q10 sync with Microsft Outlook

    To replace my Tourch 9800, I bought a Q10 when they first came out, but I had to return it when I could not get it to sync with Outlook. (Unless I had and enterprose Server - which I don't). I understand that there is now Link software that will allo

  • Webdynpro java

    How to access SAP R/3 table in webdynpro java in nwds? can u pls tell me steps for that. Thanks,

  • Installing iPhone To New Computer

    I'm planning on getting a new computer this week, and wanted to know what I have to do, to be able to use my iPhone on it, as well as my iPod? Thanks

  • Production order transaction details...

    Hi, I want to know from where we can get the last posting details of a particular Production order. Like in which table we can get the last transaction details of goods movement or activity movemnt details for a production order. Regards, Shree j