Run an SSIS package from SSMS with Transact-SQL
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This quickstart demonstrates how to use SQL Server Management Studio (SSMS) to connect to the SSIS Catalog database, and then use Transact-SQL statements to run an SSIS package stored in the SSIS Catalog.
SQL Server Management Studio is an integrated environment for managing any SQL infrastructure, from SQL Server to SQL Database. For more info about SSMS, see SQL Server Management Studio (SSMS).
Before you start, make sure you have the latest version of SQL Server Management Studio (SSMS). To download SSMS, see Download SQL Server Management Studio (SSMS).
An Azure SQL Database server listens on port 1433. If you're trying to connect to an Azure SQL Database server from within a corporate firewall, this port must be open in the corporate firewall for you to connect successfully.
You can use the information in this quickstart to run an SSIS package on the following platforms:
SQL Server on Windows.
Azure SQL Database. For more info about deploying and running packages in Azure, see Lift and shift SQL Server Integration Services workloads to the cloud.
You cannot use the information in this quickstart to run an SSIS package on Linux. For more info about running packages on Linux, see Extract, transform, and load data on Linux with SSIS.
For Azure SQL Database, get the connection info
To run the package on Azure SQL Database, get the connection information you need to connect to the SSIS Catalog database (SSISDB). You need the fully qualified server name and login information in the procedures that follow.
- Log in to the Azure portal.
- Select SQL Databases from the left-hand menu, and then select the SSISDB database on the SQL databases page.
- On the Overview page for your database, review the fully qualified server name. To see the Click to copy option, hover over the server name.
- If you forget your Azure SQL Database server login information, navigate to the SQL Database server page to view the server admin name. You can reset the password if necessary.
Connect to the SSISDB database
Use SQL Server Management Studio to establish a connection to the SSIS Catalog on your Azure SQL Database server.
Open SQL Server Management Studio.
In the Connect to Server dialog box, enter the following information:
Setting Suggested value More info Server type Database engine This value is required. Server name The fully qualified server name If you're connecting to an Azure SQL Database server, the name is in this format:
Authentication SQL Server Authentication With SQL Server authentication, you can connect to SQL Server or to Azure SQL Database. If you're connecting to an Azure SQL Database server, you can't use Windows authentication. Login The server admin account This account is the account that you specified when you created the server. Password The password for your server admin account This password is the password that you specified when you created the server.
Click Connect. The Object Explorer window opens in SSMS.
In Object Explorer, expand Integration Services Catalogs and then expand SSISDB to view the objects in the SSIS Catalog database.
Run a package
Run the following Transact-SQL code to run an SSIS package.
In SSMS, open a new query window and paste the following code. (This code is the code generated by the Script option in the Execute Package dialog box in SSMS.)
Update the parameter values in the
catalog.create_executionstored procedure for your system.
Make sure that SSISDB is the current database.
Run the script.
In Object Explorer, refresh the contents of SSISDB if necessary and check for the project that you deployed.
Declare @execution_id bigint EXEC [SSISDB].[catalog].[create_execution] @package_name=N'Package.dtsx', @execution_id=@execution_id OUTPUT, @folder_name=N'Deployed Projects', @project_name=N'Integration Services Project1', @use32bitruntime=False, @reference_id=Null Select @execution_id DECLARE @var0 smallint = 1 EXEC [SSISDB].[catalog].[set_execution_parameter_value] @execution_id, @object_type=50, @parameter_name=N'LOGGING_LEVEL', @parameter_value=@var0 EXEC [SSISDB].[catalog].[start_execution] @execution_id GO